Live data from Hacker News

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

lockwood.dev

131–140 of 181 posts

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

#131
post #122

Earlier quoted context omitted.

>I generally find that 99.9% of them can be solved "well enough" in python Sorry, I didn't mean "by translating to a lower level language". In fact, I especially meant by fixing the script in the existing language.

Oh yeah, I do that all the time - sometimes the volume of data gets higher and there are bottlenecks and such, you know? Much refactoring to be done.

As I've seen on HN, a lot of people hate and do not think in SQL, and avoid it by writing something imperative. Replacing a loop with one query is an example of the sort of thing that I've seen make 3 orders of magnitude difference.

Another basic pattern is converting a program or script that loads a whole job into memory into something with fixed size buffers, because specific data made the original explode.

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

#132
Wordle reminds of a more complex version of Mastermind[0]. Donald Knuth proved you could always solve the game in five guesses or fewer![1].

[0]: https://en.wikipedia.org/wiki/Mastermind_(board_game) [1]: https://en.wikipedia.org/wiki/Mastermind_(board_game)#Best_s...

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

#133
post #86

Earlier quoted context omitted.

IMO, never losing the game is the bare minimum for any reasonable cost function: never take > 6 guesses. Beyond that, you can have different optimization functions based on whether you're trying to minimize the worst-case depth of the decision tree (number of guesses) for each position, or the average depth, or some other reasonable function of the distribution over number of guesses. Although you could have arbitrar…

> IMO, never losing the game is the bare minimum for any reasonable cost function: never take > 6 guesses. I wouldn’t think so. If I get 99.9% of rounds correct with 3 guesses (and fail to find a solution to 0.1% of the rounds), and you get 100% of rounds with 6 guesses, I’d say I’ve soundly defeated you 99.9% of the time.

> I’d say I’ve soundly defeated you 99.9% of the time.

Except it wouldn't be 99.9% of the time. Just the games were you guessed fewer than GP.

GP's solver would expect to guess the correct word 100% of the time in fewer than 6 guess, but not that it would always take 6 guesses.

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

#134

Earlier quoted context omitted.

> IMO, never losing the game is the bare minimum for any reasonable cost function: never take > 6 guesses. I wouldn’t think so. If I get 99.9% of rounds correct with 3 guesses (and fail to find a solution to 0.1% of the rounds), and you get 100% of rounds with 6 guesses, I’d say I’ve soundly defeated you 99.9% of the time.

> I’d say I’ve soundly defeated you 99.9% of the time. Except it wouldn't be 99.9% of the time. Just the games were you guessed fewer than GP. GP's solver would expect to guess the correct word 100% of the time in fewer than 6 guess, but not that it would always take 6 guesses.

I was saying if you hypothetically got every correct guess in exactly 6 tries. You would pass the suggested “bare minimum” while my 99.9% strategy doesn’t, yet I claim my strategy is better.

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

#135
post #86
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…

IMO, never losing the game is the bare minimum for any reasonable cost function: never take > 6 guesses. Beyond that, you can have different optimization functions based on whether you're trying to minimize the worst-case depth of the decision tree (number of guesses) for each position, or the average depth, or some other reasonable function of the distribution over number of guesses. Although you could have arbitrar…

> never take > 6 guesses

I suspect that with most languages it’s impossible to achieve 100% win rate for five or more letters. So w7 should be by far the largest weight but I don’t think it can be infinite.

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

#137
I came across a post which said use the words dying, clots, brake, and whump (statistically expect worse cast 2 guess since 20/26 alphabets used in 4 guesses, worked every time for me (although with this strategy you are ending up needing 5 guesses all the time and in rare occasion need the 6th guess.

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

#139

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…

If you just brute force solve with greedy search (always pick the word that results in the highest average reduction in remaining possible words), you get a solution with an average of 3.47. Even only guessing words on the primary word list (which Wordle uses to pick the word of the day) you can get 3.51. That's as far as I've chased the problem.

I'm surprised to hear that optimal play only gets you 3.4212 (according to the link you posted).

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

#140
post #87

Earlier quoted context omitted.

That is not an uncommon word though, I'd venture most school children know it. You probably read rebuses in school but just forgot about it!

It's a common word? What's your source for that claim?

Kindergarten? https://kidpillar.com/free-rebus-puzzles-for-kids/
Post reply on HN