We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I have designed a genetic algorithm with a fitness function of how many of the guesses my solution satisfies(satisfy = my suggestion and the guess having same digits in the right place, because once my suggestion satisfies all guesses it will be the solution anyways). I am using the most successful ones to generate offsprings(some chars from mother, some from father equal probability) to test again to improve, and 1% mutation to change a random digit doing so. It 100% finds a solution after a couple of minutes, but can't use it on hackerrank because of the timeout limitation :/
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #185: Number Mind
You are viewing a single comment's thread. Return to all comments →
I have designed a genetic algorithm with a fitness function of how many of the guesses my solution satisfies(satisfy = my suggestion and the guess having same digits in the right place, because once my suggestion satisfies all guesses it will be the solution anyways). I am using the most successful ones to generate offsprings(some chars from mother, some from father equal probability) to test again to improve, and 1% mutation to change a random digit doing so. It 100% finds a solution after a couple of minutes, but can't use it on hackerrank because of the timeout limitation :/