Hacker News new | ask | show | jobs
by joshbuckler 1610 days ago
The "worst-case number of guesses" objective considered here is pretty insensitive to differences in quality of the decision tree. It seems to me that a better objective would be: minimize the number of secret words that take more than 6 guesses (hopefully to zero), then minimize how many that take 6 guesses, and so on.
1 comments

This has been done

https://jonathanolson.net/experiments/optimal-wordle-solutio...

Even with adversarial Wordle, the upper limit on guesses is 5 (ie after 3 guesses the maximum remaining word pool is 2)

The hardest words in Wordle are BOOBY / BOOZY no optimizer would include those letters in the first two guesses ...

What you described is not what joshbuckler described.

joshbuckler wants an algorithm that has the fewest words that take at least 6 guesses, and also among all algorithms that tie for that number of words that take at least 6 guesses, has the fewest number of words that take at least 5 guesses, and also among all the algorithms that tie for that number of words that take at least 6 and at least 5 guesses, has the fewest number of words that take at least 4 guesses, and also...

The page you linked to doesn't seem to say it does that.

As I noted, adversarial wordle shows that no words take 6 guesses and only 2 words take 5 guesses (BOOZY and BOOBY.)

If you removed just 1 of those 2 words (leaving 2312 possible Wordles) all Wordles can be solved in max 4 guesses.

Ignoring the 2 scenarios where your first two "optimal" guesses are the Wordle

X% of the time you have 1 word left (guesses= 3)

Y% of the time you have 2 words left (guesses =3.5)

(100-Y-X)% of the time there is a pool of words left, requiring one more "optimal" guess

And either your optimal guess #3 is the Wordle Z% of the time (guess=3) or there is now one word remaining (guess ≈ 4)

Where Z in this case is just a function of the number of words remaining (ie Y is just a special case of Z)

So you want to maximize X and the weighted average of Z across pools.

By sheer brute force you can do so

1) for each 2 guess combo 2) discard any "suboptimal" combo where for any remaining response state word pool there is no optimal guess #3 (ie not possible to definitively guess in 4 guesses) 3) calculate avg remaining guesses 4) identify optimal word 1 (minimum of sum of step 2 per first guess) 5) within combos with word 1, identify optimal guess 2 for each response state

And the weighted average of step 3 for these combos is the global minimum for Wordle.

I believe this is the algorithm you're after? In this case, we're making a first guess that maximizes the chance we will get 3 guesses instead of 4.

Per this algorithm, optimal guess 1 is RAVED.