Hacker News new | ask | show | jobs
by chrisconley 3326 days ago
Knuth worked on ensuring that the max number of guesses never went above 5. I believe that it's an algorithm, but I haven't looked into this enough yet.

Another way to optimize is for the avg number of guesses. The algorithm for this approach is to choose your next guess based on the guess that will give you the maximum amount of information gain (https://en.wikipedia.org/wiki/Entropy_(information_theory)#D...).