* assuming as he does at the bottom the existence of a computer.
* assuming as he does at the bottom the existence of a computer.
But right and wrong guesses are not equally valuable in hangman. A wrong guess will eliminate all words of a given length containing the given letter. But a correct guess gives you more: you get the location (or locations) of the letter in the word as a bonus. This will reduce your remaining search space drastically.
Thus, you should optimize for the success of your next guess.
You must somehow weigh information gain against risk.
It may also be useful to consider how many remaining incorrect guesses there are in the game.
Actually, we should be correct 50% of the time. Which means 22 Bits of information or 4194304 words.
Additionally, we know the length of the word.
The english dictionaries seem to have between 400k and 1000k words [0] of all word sizes. With 22 Bits we get 4000k words. We do not have to worry about getting hanged using the information-reduction algorithm. ;)
More precisely: Given a dictionary of all possible words and a letter to guess, we can split the dictionary into k parts. One sub-dictionary contains all words for which the answer is negative. Additionally, we have k-1 sub-dictionaries for each equivalence class of letter positions.
For each letter, we can compute the partition. Now we need to choose the strategically best partition. I believe it should be the one with "the lowest average sub-dictionary size".
- you are correct (happens 99% of the time). No penalty, and you find out at which positions your guessed letter occurs, a decent information gain.
- you are incorrect. You suffer a penalty but eliminate 99% of the remaining words, a massive information gain.
How would 50% be preferable in either case?
If we get a hit, it's not just the presence, or not, of the letter, we learn both the number of hits, and the positions of these hits. These are incredibly valuable pieces of information (more valuable that dividing the remaining words into two equal piles).
If we miss, we've carved away and removed the biggest non-possible set of words with one guess.