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…
Solving Wordle in 3.64 guesses on average, 99.4% of the time
81–90 of 181 posts
Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time
#82This [1] solves it in 3.4212 average guesses 100% of the time and claims optimality, which is 99% of the difficulty it seems. For the limited 2671-word set of possible words, I think the question is now settled (for the whole 12k-word set, I don't think anyone tried anything). It was posted here four days ago [2]. [1] http://sonorouschocolate.com/notes/index.php?title=The_best_... [2] https://news.ycombinator.com/ite…
FWIW, I wrote a similar solution a couple of days ago as well, and come up with the same result (3.421166 guesses on average, with starting word SALET). So that would support that result.
With the following strategy: https://drive.google.com/file/d/1WvxRRzbvDVnHZUczHBZAko3hKft..., code: https://drive.google.com/drive/folders/1Y8k685PS0wxvYulIxsPg...
Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time
#83Earlier 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…
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.
Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time
#84Earlier quoted context omitted.
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
#85>so far what was taking 1GB of RAM in Python is taking, literally 1MB in Rust Is anybody hiring people to fix situations like this at work? i.e. this script that was written in a hurry needs to be revised to be 10^3 times more efficient, in space or time.
Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time
#86I 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…
Although you could have arbitrarily many cost functions, a fairly general class is the following: pick some nonnegative constants (w1, w2, w3, w4, w5, w6, w7), and for a certain strategy, define the cost as:
w1*n1 + w2*n2 + w3*n3 + w4*n4 + w5*n5 + w6*n6 + w7*n7
where nk (for 1≤k≤6) is the number of hidden (solution) words for which the strategy takes n guesses, and n7 is the number of words for which the strategy loses the game. Then,• Setting w7 infinite / very high is a way of encoding the condition that you not lose the game. (You can set it finite/small if you don't mind occasionally losing the game for some reason!)
• Setting w1 = 1, w2 = 2, …, w6 = 6 will simply minimize the average number of guesses,
• Having them grow exponentially, e.g. setting wk = c^(k-1), where c is some constant larger than 12972 (the number of acceptable guess words) will make sure that the minimal-cost strategy first minimizes the maximum number of guesses, then break ties by having the fewest words take that many guesses, and so on.
Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time
#87As many have mentioned, it seems much more efficient to focus on eliminating letters, which means that the second word should not be very green at all. Also, since there's only one word a day, I think we can assume that it's chosen manually, and it won't be some archaic anglo-saxon tool for shoeing horses or something, it will be a relatively common word.
I think it's chosen based on a random number generated from the date - but one of the most recent games had the answer "REBUS", which I've never heard or read before. But yeah, the target list has many more common words in it than the list of all possible guesses.
Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time
#88As many have mentioned, it seems much more efficient to focus on eliminating letters, which means that the second word should not be very green at all. Also, since there's only one word a day, I think we can assume that it's chosen manually, and it won't be some archaic anglo-saxon tool for shoeing horses or something, it will be a relatively common word.
It says it is designed for hard mode, in which I believe you must use your green (and maybe yellow?) letters.
Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time
#89Why 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.
Re: Solving Wordle in 3.64 guesses on average, 99.4% of the time
#90https://github.com/JuanPotato/Wordle-Solver I made a similar solver, it solves all the words in 3.65 average moves. Could probably be better. The github explains how it works.
1) pick a first guess, and partition the remaining words by the hints that they give
2) given any part of a partition, pick a word that minimizes the maximum-size part of the resulting sub-partition
3) repeat (2) until words are solved.
I brute-forced the first guess (that is, generated a tree rooted at each word), and the best one was 'bland'. That has one failure, getting stuck on the chain (hound, mound, pound, sound), which ended up being easy to fix manually.My tree is quite different from yours, with guess distribution 1, 103, 861, 1114, 212, 24.