Live data from Hacker News

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

lockwood.dev

51–60 of 181 posts

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

#51
post #31

Earlier quoted context omitted.

As a point of curiosity, what do you mean by optimal? To me, I can see at least two (potentially different) cost functions that a Wordle strategy can aim to minimise. Firstly, you can try to minimise the expected number of guesses, and secondly you can try to minimise the expected number of guesses conditional on never losing the game. In principle you could optimise for the first but not the second by allowing a sma…

They specified that in the post, they were able to constrain to a strategy that guarantees 6 or fewer and then optimize for EV to get 3.55, but could get down to 3.52 by allowing some small number of words to take more than 6. I would be interested to know if 6 is the lowest you can constrain it. Can you guarantee a solution in 5, and if so what is the best EV with that constraint?

Yes, you can -- I believe the EV was around 3.47 for that. The "greedy" strategy (minimizing the worst-case size of the largest set) also ends up using at most 5 words.

Perhaps unsurprisingly, you can't guarantee at most 4 words.

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

#52

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.

This is a valid strategy in easy (default) mode, but in "hard" mode, you must use all yellow/green letters in subsequent guesses

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

#53
Wordle is a perfect example of nerd sniping, I couldn't stop playing once I started. But I wanted to challenge my friends to some more difficult puzzles and wrote a tiny tool this weekend to do just that!

You can create your own Wordle-like puzzles on https://word.rodeo

I've already received a ton of positive feedback from friends. What are your thoughts?

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

#54

Wordle is a perfect example of nerd sniping, I couldn't stop playing once I started. But I wanted to challenge my friends to some more difficult puzzles and wrote a tiny tool this weekend to do just that! You can create your own Wordle-like puzzles on https://word.rodeo I've already received a ton of positive feedback from friends. What are your thoughts?

It's not copying the URL to my clipboard, would it be possible to expose the url as text so manual copying can be done?

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

#55
post #49

Earlier quoted context omitted.

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 prob…

This sounds like the optimal strategy for a single guess. But shouldn't the optimal strategy for solving the game include that there are multiple guesses? While some specific word might provide the highest reduce in entropy for the first guess, it might actually negatively impact the entropy reduction of remaining possible words compared to another first guess. E.g. if RAISE is the optimal reduction in search space f…

Good point. Because the set of possible guesses is constrained, the totally general solution needs to take future guesses into account. There doesn't seem to be a way to find the optimal guess other than searching the whole game tree (which it looks like someone in another comment did).

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

#56

It's interesting to see the edge cases where the algorithm struggles to find the last letter. > shave: [slate: 20202, share: 22202, shame: 22202, shape: 22202, shake: 22202, shade: 22202] I guess it needs to find the right choice of [r, m, p, k, d, v] to get "shave" (since 'v' is so rare it takes 6 guesses!). Trying "marks" and "paved" would narrow that list down in 2 guesses (and a third to actually try "shave") Any…

The solver is playing in "hard" mode, where any yellow/green letters must be used in further guesses

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

#57

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 r…

Nice! I was wondering almost the same thing this morning while my wife was playing Wordle - ended up coding an assistant to help you choose the optimum words.

If anyone wants to check it out, I published it here https://curiosity.ai/wordle/ - source code is also available here https://github.com/theolivenbaum/wordle-assist.

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

#58

Earlier quoted context omitted.

They specified that in the post, they were able to constrain to a strategy that guarantees 6 or fewer and then optimize for EV to get 3.55, but could get down to 3.52 by allowing some small number of words to take more than 6. I would be interested to know if 6 is the lowest you can constrain it. Can you guarantee a solution in 5, and if so what is the best EV with that constraint?

Yes, you can -- I believe the EV was around 3.47 for that. The "greedy" strategy (minimizing the worst-case size of the largest set) also ends up using at most 5 words. Perhaps unsurprisingly, you can't guarantee at most 4 words.

You can get EV of 3.46393 with a guaranteed maximum of five tries. (I don't know whether this bound is tight.)

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

#59

Earlier quoted context omitted.

Yeah, the analysis doesn't really work for hard mode as noted in a footnote.

I don't think it works for easy mode either. The overwhelming majority of 6-word sets can be distinguished in two guesses in easy mode (their EV is either 11/6 or 2), while this set has an EV that's around 3.

I think you're right. Although a first guess might reduce the set size a lot, it might lock you into a situation where all the possible second guesses are useless.

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

#60
post #31

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 r…

As a point of curiosity, what do you mean by optimal? To me, I can see at least two (potentially different) cost functions that a Wordle strategy can aim to minimise. Firstly, you can try to minimise the expected number of guesses, and secondly you can try to minimise the expected number of guesses conditional on never losing the game. In principle you could optimise for the first but not the second by allowing a sma…

Funnily enough, I think neither of those notions are the correct thing to optimize. For me, you want to minimize the maximum number of guesses. This leads to an equilibrium. Otherwise, your opponent can just abuse your strategy.
Post reply on HN