Live data from Hacker News

Best Wordle guessing strategy

slc.is

121–130 of 159 posts

Re: Best Wordle guessing strategy

#121

Yet another Wordle solver! https://github.com/nikitaborisov/autowordl We choose the guess that is expected to result in the smallest set of possible solutions after one guess. For the secret answer "QUERY" it suggests the following sequence of guesses: 1. LARES 90 possible answers after this guess. 2. GROUT Only four possibilities now: ['ENURE', 'INURE', 'QUERY', 'QUIRE'] 3. BRIBE This narrows the field down to one p…

For that third guess, you could just use QUIRE. Still reduces the possibilities to one, but has a chance of getting the right answer one step sooner. In general, favouring something within the possibilities, where it doesn't pessimise, might reduce your search tree a bit.

Re: Best Wordle guessing strategy

#122
post #103

Interesting post, but the premise is misleading. The title says "Best ... strategy" and the first sentence reads "This post will derive an optimal ... strategy", but there is nothing to suggest that this strategy is optimal. One strategy which is obviously optimal is to use minimax (recursively, not like Knuth's Mastermind strategy which was mentioned by @christiangenco), however this strategy is not computationally…

To add to my previous comment...

I realise that this blog post is about a strategy for humans to use rather than for an ideal solver, so a degree of inexactness is to be expected. Still, I dislike the way the words "best" and "optimal" are thrown around. The guesses presented in the blog post are "best" in the sense that they maximise some heuristic (namely covering the most frequent letters), but the blog post doesn't explain why that heuristic is good.

Regarding an ideal solver, to prove that a strategy is optimal (in terms of the worst-case number of guesses) one would need to show two things:

- That the worst-case number of guesses of the strategy is N, and

- That there is no strategy whose worst-case number of guesses is less than N.

The first is quite easy to do (for an automated strategy): simply run the strategy against each possible secret "wordle" and keep track of the maximum number of guesses. The second is much harder.

(Since the worst-case number of guesses is likely to be small, this is not a fine-grained way to compare strategies. One could also look at the distribution of the number of guesses to get more information; for example a strategy that takes 6 guesses half the time and 5 guesses the other half is clearly better than a strategy that always takes 6 guesses. Still, it would be really nice if people who published automated strategies also published their worst-case number of guesses.)

Knuth's strategy is optimal (in terms of the worst-case number of guesses) for Mastermind, but it might not be optimal for Wordle. Knuth showed that his strategy takes at most 5 guesses for Mastermind, and presumably there is no strategy that takes at most 4 guesses. But his strategy is not optimal in terms of the distribution of the number of guesses; there are strategies with a lower average number of guesses (and the same worst-case number of guesses; see https://mathworld.wolfram.com/Mastermind.html). Reducing the set of possibilities as much as possible is a very sensible strategy, but it might not be optimal because the number of guesses required to solve a set depends on the nature of its elements, not just on the size of the set. In the case of Mastermind, this inefficiency does not affect the worst-case number of guesses; but in the case of Wordle it might.

Re: Best Wordle guessing strategy

#123

If you're looking for a source of words to build your own solver, you can find one in many *nixy distros (including macOS) here: /usr/share/dict/words

Or just combine the arrays in the wordle source (being careful not to look too closely at the word order in one of them).

Re: Best Wordle guessing strategy

#124
Seems that another thing to consider is multiple usages of same letter. Eerie for instance. So if the first try gets a single letter, this does not immediately mean that one should not try multiple letters.

Considering that eg the letter e is used very frequently, one might try words with more the one e, for instance? Off course this does not mean that I have a different, best strategy, only that it might be more complicated.

Re: Best Wordle guessing strategy

#125
post #112

Always trying a new first word every day makes it much more fun imo. I love sitting with a blank Wordle and just let my mind try to settle on a random 5-letter word from my subconscious.

Same way I approach it. Just whatever word comes to mind at that time.

Re: Best Wordle guessing strategy

#126

It seems clear to me that there is an optimal starting word, but that the best second word has to depend on the info you gain from the first. Case in point: If you get 3 green 2 yellow in the first word, you can solve on the next guess. Of course, you can constrain your strategies to "I always use the same two/three starting words", and in many cases that will be fine. But it's quite obviously not optimal. Also, the…

> It seems clear to me that there is an optimal starting word I took one step further and calculated the optimal starting word for obtaining green matches (I assume that this also makes it likely to produce yellow matches, although I did not explicitly optimize for that). Beginning with the full list of 5-letter words, I calculated the frequency of each letter of the alphabet in each of the 5 possible positions for a…

Nice. I tried a simpler method of only looking at the wikipedia table of overall letter frequency in dictionaries (not in 5 letter words) and the vowels are high, especially E and I followed by A. Then I checked the frequeny of starting letter and that is led by "S". So my guess for a 5 letter word became one with at least two vowels from E,I,A, starts with an S, and has the remaining two characters from the reasonably high frequency set (R, T, N, etc). My guess then was SIREN which has that property. Just out of curiosity, if you still have the output from your program, how bad was SIREN compared to SLATE?

Re: Best Wordle guessing strategy

#127
post #67
post #10

I don't like the "exploration" strategy of playing Wordle. Once you have a start word, work onwards from there (aka "hard mode") rather than enter another random guess to narrow down more letters. I know it is a valid strategy, but idk just feels like cheating to me.

It's too bad hard mode only requires that you use positive clues, not negative. I've been trying to push "true hard mode" with my work colleagues. Where every guess must be a potential winner given the information revealed thus far. So, hard mode, plus no reusing grey letters, plus no using yellow letters in the same incorrect slot.

What, one can re-use a gray letter in hard mode? That's not hard enough!. I find the fun challenge isn't finding the final word but finding valid guesses (i.e. words that exist and aren't using any grays) along the way.

Re: Best Wordle guessing strategy

#128
post #48

I refuse to read this post because I'm enjoying this slow, daily, little game. I'm convinced over-thinking this would spoil the game.

I don't think reading would ruin and I'm glad others are having fun with solvers. I just really enjoy putting in a random five letter word I've read or seen in the last few days and going from there. So far, I've not lost a single game and that's good enough for me!

Re: Best Wordle guessing strategy

#129

It seems clear to me that there is an optimal starting word, but that the best second word has to depend on the info you gain from the first. Case in point: If you get 3 green 2 yellow in the first word, you can solve on the next guess. Of course, you can constrain your strategies to "I always use the same two/three starting words", and in many cases that will be fine. But it's quite obviously not optimal. Also, the…

> It seems clear to me that there is an optimal starting word I took one step further and calculated the optimal starting word for obtaining green matches (I assume that this also makes it likely to produce yellow matches, although I did not explicitly optimize for that). Beginning with the full list of 5-letter words, I calculated the frequency of each letter of the alphabet in each of the 5 possible positions for a…

That is a really interesting approach -- if you remove the words with any of the letters in SLATE, what is the highest ranked word? (If you have it to hand)

Re: Best Wordle guessing strategy

#130
I also tried to make a wordle solver, this one just using full brute force to find a strategy that minimizes the maximum number of guesses, and then secondarily the expected number of guesses. The solver tries guesses in a heuristic order, and prunes solutions once they're clearly worse than a previously-found solution, but it eventually should find the global optimal strategy.

I didn't entirely succeed due to the obvious exponential runtime, but I tried a couple constraints: using only words in the dictionary of possible answers; hard mode; or "harder mode" where all guesses must be consistent with the information you have. (The actual hard mode is a weaker constraint, but I misinterpreted it as "harder mode" at first.) Harder mode is of course much easier to brute force, because there are fewer options.

Anyway I tried on several tuples: (max guesses, mode, dictionary size). What I found:

- (4, harder, large): no solution.

- (4, normal, small): no solution.

- (4, normal, large): didn't finish after like a day, but no solution found.

- (5, harder, small): this is pretty hard to guarantee a win; best starting word is SCAMP (-FLOUT-DEIGN if no hits).

- (6, harder, small): best staring word is PLATE (-CHURN-MOODY-SKIFF if no hits).

- (5, normal, small): didn't finish; best starting word so far is TRACE (-GODLY-SPUNK if no hits).

- (5, harder, large): didn't finish; best starting word so far is PALET.

- (6, harder, large): didn't finish; best starting word so far is SALET.

Hard mode really is hard. There are lots of clusters with many options, such as /.OUND/, /.IGHT/, /.ASTE/, /S.ORE/ etc. You can easily end up matching a cluster without enough freedom to solve it in time, especially if you start with common letters.

It isn't possible to guarantee a hard mode win by starting with with e.g. RAISE, because if you get e.g. RS in yellow and E in green, then you have 6 remaining words matching /S.ORE/ (plus 4 others), and you can't deal with more than one consonant per guess. Starting with TRACE is even worse: you can't even guarantee a win in 7 guesses due to the cluster /.ATCH/.

Post reply on HN