in reply to Hangman Assistant
No comments on your code, but wouldn't the optimal strategy be to pick not the most common letter, but the letter that is closest to appearing in exactly half of the possible remaining words? That way you eliminate ~1/2 of the candidates in each turn.
At least in your example, a letter never appears in more than half of the candidates, so the most frequent letter and the closest-to-half-half letter coincide. But imagine if you found out that the actual word contained Q. Then for sure the next most common letter will be a U; but guessing U and getting it right will not give you much new information. Aiming for half-half lets your correct and incorrect guesses both contribute information.
blokhead
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Hangman Assistant
by Lawliet (Curate) on Jul 12, 2009 at 05:21 UTC | |
by ikegami (Patriarch) on Jul 14, 2009 at 05:24 UTC | |
Re^2: Hangman Assistant
by Limbic~Region (Chancellor) on Jul 13, 2009 at 00:41 UTC | |
by Lawliet (Curate) on Jul 13, 2009 at 05:03 UTC | |
by Limbic~Region (Chancellor) on Jul 13, 2009 at 13:38 UTC | |
Re^2: Hangman Assistant
by Limbic~Region (Chancellor) on Jul 13, 2009 at 18:05 UTC | |
by blokhead (Monsignor) on Jul 13, 2009 at 18:14 UTC | |
Re^2: Hangman Assistant
by JavaFan (Canon) on Jul 13, 2009 at 14:42 UTC |
In Section
Cool Uses for Perl