Six guesses suffice in Wordle's hard mode

Recently I posted some computer analysis of Wordle. That analysis applied to Wordle's normal (“easy”) mode. What about hard mode?

Wordle's hard mode

In normal play, Wordle allows any word in its dictionary to be used as a guess. But Wordle also allows you to select “hard mode”. In that mode, letters that have been revealed by the scores of earlier guesses must be used in later ones. For example, suppose I have already guessed TRACE:
TRACE (-+--/)
Then that has revealed that the letters R, C, and E all appear, and that R is the second letter. In hard mode, every later guess must have all three letters and must have R in second place. So the guess PLIED from the earlier post would not be allowed. CREDO would be allowed, and so would CRATE, even though it couldn't be the solution (we know there is no A and we know that E is not the last letter).

Computer analysis

Hard mode is hard for computers as well as people, in that the methods I described before don't work as well. Guesses that work well with those methods may fail badly in hard mode because they limit what can be played later. Here's an example of the computer applying the Irving method I described before, but also restricting itself to guesses that are valid in hard mode:
LEANT (--/++)
TAINT (-+-++)
DAUNT (-++++)
GAUNT (-++++)
HAUNT (-++++)
JAUNT (-++++)
VAUNT (+++++)
It has gone over the 6-guess limit imposed by Wordle and therefore lost. It was doomed as soon as it guessed DAUNT, because then every later guess had to be xAUNT. There are 4 possible words it might be and only 3 guesses remaining. It was probably actually already doomed after TAINT, because there isn't anything else it could have guessed that would have done a better job than DAUNT.
I used LEANT as the first guess because that gave the best average number of guesses with the Irving method. But obviously we want all games to be solvable, and this one isn't, so that's not good. (This is actually the only one that isn't solvable, but one is enough.)
There are in fact initial guesses that do manage to respect the 6-guess limit at the expense of a somewhat bigger average. PLAID is the best one. Here's the solution for VAUNT starting from PLAID:
PLAID (--/--)
CATER (-+/--)
TANGY (/+/--)
HAUNT (-++++)
JAUNT (-++++)
VAUNT (+++++)
It doesn't fall into the xAUNT trap until guess 4, and at that point it has already eliminated DAUNT, GAUNT, and TAUNT.
Here are all 2,315 words solved in hard mode starting with PLAID. As you can see none of the solutions take more than 6 guesses and all but 20 take less. (The list of solutions obviously allows you to cheat, but why would you?)

Can we do better?

The Mastermind algorithms aren't all that well adapted to hard mode. A better approach might be some sort of exhaustive search, for example trying every possible first guess and every possible second guess that is consistent with it. We might have to stop there, because every possible third guess would likely be overwhelming. So we'd just use the earlier methods for the remainder of the game. I might yet try this. It does seem likely that 5 guesses are enough in all cases.

Comments

Popular posts from this blog

Solving Wordle