Live data from Hacker News

Solving Wordle in 3.64 guesses on average, 99.4% of the time

lockwood.dev

11–20 of 181 posts

Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time

#11

Why not simply choose a guess which narrows the set of possible solutions the most? This could be improved by looking one step further, but this would probably require some kind of optimization / heuristic / approximation to make it computationally feasible.

Watch this space :D

Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time

#12
If you right off the bat guess "bound" and then positions 2, 3, 4, and 5 all come up green, then your goal needs to then be to use words like 'morse' to rule out (in one fell swoop) words like 'sound', 'mound' and 'round'. Then, if it's not ruled out, you can then choose words that just have m and s, or s and r.

Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time

#14

Why not simply choose a guess which narrows the set of possible solutions the most? This could be improved by looking one step further, but this would probably require some kind of optimization / heuristic / approximation to make it computationally feasible.

It really depends on what you are trying to optimize. Least guesses on average may not want a 50/50 split it might want say a 60/40 split where the 60% is 2 guesses and the 40% is 3. But that loses to a 48:52 split which gives 2 guess 80% of the time etc.

Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time

#15
post #5

Why optimize for greens? Better to rule out more first no matter the position. I think it narrows the search space better. If you want to go fancy somehow calculate with bigramms. If you guess c you don't have to guess k blindly too, etc.

If you want to get really fancy, a full minimax solution is probably feasible without massive resources. Pretend it’s a two player game with one player guessing and the other player thinking of a potentially different word for each guess subject to the constraint of being consistent with all previous answers.

There is a wordle parody (absurdle) [0] that does exactly this.

[0] https://qntm.org/files/wordle/

Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time

#16
I wrote a solver a few weeks ago that solves easy mode in 3.45 guesses and hard mode in 3.55 guesses. Rather than using heuristics, it explored a large portion of the game tree (with a little pruning) and I'm hopeful that it's optimal. Interestingly, the EV-optimal hard mode strategy takes 3.52 guesses on average, but requires 7 guesses a tiny fraction of the time, so I instead exposed the best strategy that always requires 6 or fewer guesses.

If you're interested, you can play with it here: http://www.npinsker.me/puzzles/wordle/ and the source (written in neophyte's Rust) is here: https://gist.github.com/npinsker/a495784b9c6eacfe481d8e38963...

(edit: It's posted elsewhere in the thread, but this is actually not optimal and someone else achieved better results! http://sonorouschocolate.com/notes/index.php?title=The_best_...)

Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time

#18

Going for greens is a good heuristic, but the general solution is to seek guesses that shrink the size of the set of compatible words the most. https://langproc.substack.com/p/information-theoretic-analys...

Using essentially this method I get that the best initial guess is RAISE (there are some others that are very close). It seems the author of this post didn’t use the actual word list from the game so got a different word.

Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time

#19

Why optimize for greens? Better to rule out more first no matter the position. I think it narrows the search space better. If you want to go fancy somehow calculate with bigramms. If you guess c you don't have to guess k blindly too, etc.

The generally optimal thing is to choose guesses to reduce the set of possible targets as much as possible. This is the same as choosing guesses with maximal entropy over the resulting patterns (that is, the result you get back from the game should be maximally informative). Because greens are rare, by maximizing the probability of greens, you are approximately maximizing the entropy of patterns, by distributing probability mass among rare patterns. This is why going for greens is a good heuristic.
Post reply on HN