Live data from Hacker News

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

lockwood.dev

71–80 of 181 posts

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

#71
post #44

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...

That's exactly my approach. I wrote a very simple O(N^3) algorithm to determine that: for each possible actual word and the guessed word, figure out whether or not a word is eliminated. Then calculate a score based on how many words can be eliminated from a particular guessed word, averaged over all possible actual words. (I originally thought O(N^3) would be way too slow to be useful. But it runs fast enough with a…

I also implemented essentially this algorithm. For guesses I always consider the full list of possible words, not just the list of possible answers. Doing so requires a check so words that have been excluded are only used if they're better than words that haven't been.

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

#73
post #58

Earlier quoted context omitted.

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.)

This bound is not tight. http://sonorouschocolate.com/notes/index.php?title=The_best_...

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

#74

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…

This is great. But it seems to fail with words containing repeat letters, for example, with my word as BOOKS, not on hard mode:

SOARE JUMBY BOOST (at this point, it claimed to have won!)

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

#75

If you like Wordle you should check out https://wordhoot.com/

I thought the UI of Wordle wasn't anything special but this makes me appreciate the subtle attention to detail that went into it

That website you linked doesn't lock the viewport so on my phone it's constantly panning or randomly zooming

And the grid instead a keyboard layout actually matters more than I expected for how easy it is to type

Having to manually start a game is a tiny thing but doesn't feel as smooth

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

#76

Earlier quoted context omitted.

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?

My partner noticed this too, but after a couple of tries the same button will work again. Really hard to debug unfortunately. It usually worked after a couple of tries. I just pushed a fix that greys out the link if there's no URL, hopefully that helps?

Can you really not just share the url and at most pre-highlight it?

On my phone I get a share sheet with additional text which makes visiting the url a pain

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

#77
post #73
post #58

Earlier quoted context omitted.

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

This bound is not tight. http://sonorouschocolate.com/notes/index.php?title=The_best_...

Good to know.

Another possible question is: What is the best strategy minimizing (at any point) _first_ the maximum number of tries, and second the EV (average number of tries over all possible words)? That's subtly different from either answer.

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

#78
I have also hacked around on solving this problem. However, I decided that using the shorter list of answers was cheating, since end users wouldn't have access to this list. From a user's perspective, any word that Wordle lets you guess could be a valid solution.

It's still a work in progress, but my code died when I tried to generate a complete game tree for the full list.

However, in theory it could be done once, to determine the best starting word, and then hardcoded to always use the same start word. So, my plan to explore a game tree approach from guess 2.

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

#79

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.

for this specific set in easy mode doesn't (bawds, chefs) result in unique responses for all of them? so that's 2.5 guesses total? Where are you getting the EV for 6-word sets?

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

#80
post #74

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…

This is great. But it seems to fail with words containing repeat letters, for example, with my word as BOOKS, not on hard mode: SOARE JUMBY BOOST (at this point, it claimed to have won!)

books isn't a valid solution. it's on the guesslist but not the wordlist.
Post reply on HN