Hacker News new | ask | show | jobs
by iams 1622 days ago
With the first word you aren't necessarily trying to get the most number of matches.

You are trying to use the word that once you get the match result back, it discards the most number of words.

These two are not the same thing.

2 comments

> You are trying to use the word that once you get the match result back, it discards the most number of words.

This isn't strictly true either. Two N-sized subsets of words from a common initial set might have completely different difficulty in reducing further, because in the worst case there might not be a valid guess which nicely spreads the remaining words out among the 243 possible outcomes for that guess.

Set-size is a good heuristic, but it's just that - a heuristic.

Yes, as you'll see in the readme that I have numbers for both approaches. The first section is the average number of remaining words after getting the match result back, and the second section is the average number of yellow and green squares.
You might also try maximum instead of average. This is minimax and represents worst case scenarios for each guess.

This is mostly useful for optimal play against an opponent (which is not the case here). Imagine an adversarial version where the opponent doesn't have to commit to a word at the beginning but must reveal one matching all clues if you can't get it in 6 guesses (basically, they can change their word when you guess and you are trying to make that impossible).