Live data from Hacker News

Best Wordle guessing strategy

slc.is

51–60 of 159 posts

Re: Best Wordle guessing strategy

#51
post #13

I also wrote a tool for playing: https://github.com/vple/wordle-solver/blob/main/solver.js There's probably more tuning I can do for the algo, but roughly: - I took all the words from the site's js as the dictionary. - From remaining eligible words, compute the letter distribution (ignoring letters you already know are in the solution). - Pick a word that uses as many of the most frequent letters as possible. - Use o…

This is pretty much what I did, but I mixed in a regexp to hold the location restrictions, and a penalty for using the same letter multiple times. (eg guessing “added” is worse than “aspen” for “a..e.”) I do wonder if looking at how a letter splits the space of letters and words would be interesting

Yeah, I wasn't sure how I wanted to deal with duplicates so I mostly ignored them. I track letter positions directly (just a bunch of tuples), but don't actually do anything with this other than restricting candidates words.

I think if I work on this some more I'd try to factor in letter positioning when deciding what to guess. My hunch is that it won't make too much of a difference though.

Re: Best Wordle guessing strategy

#52
I've picked a first word with the most common letters (ATONE for example), then do a grep on the 'enable1' word list (the one that a number of word games use) to exclude all 'impossible' words. The second word is chosen to have many common letters not in the first word but also matching any constraints. Then I do another filter; often by the 3rd guess there are fewer than 100 possibilities left. I then choose the word that seems the most common, because Wordle often chooses relatively common words as the answer, I haven't seen an obscure word picked yet. I've gotten it in three this way a couple of times, and if not, repeating the grep pipeline often leaves only a few words for the fourth guess.

Re: Best Wordle guessing strategy

#53

Yet another Wordle solver! https://github.com/nikitaborisov/autowordl We choose the guess that is expected to result in the smallest set of possible solutions after one guess. For the secret answer "QUERY" it suggests the following sequence of guesses: 1. LARES 90 possible answers after this guess. 2. GROUT Only four possibilities now: ['ENURE', 'INURE', 'QUERY', 'QUIRE'] 3. BRIBE This narrows the field down to one p…

[deleted]

Re: Best Wordle guessing strategy

#54
post #40

I computed the Pareto optimal frontier of initial Wordle guesses, showing the tradeoff between maximizing green squares and maximizing yellow squares in this thread: https://twitter.com/adereth/status/1478435989982875648

correct me if I'm wrong, but it seems like greens are strictly more valuable than yellows, so giving them equal weight doesn't make much sense to me.

Re: Best Wordle guessing strategy

#55

It seems clear to me that there is an optimal starting word, but that the best second word has to depend on the info you gain from the first. Case in point: If you get 3 green 2 yellow in the first word, you can solve on the next guess. Of course, you can constrain your strategies to "I always use the same two/three starting words", and in many cases that will be fine. But it's quite obviously not optimal. Also, the…

> It seems clear to me that there is an optimal starting word, but that the best second word has to depend on the info you gain from the first.

Definitely. The likelihood of a letter appearing in a given place changes depending on the letters around it. A Q will almost always be followed with a U, for example.

I wrote a script yesterday which spits out the relative probabilities of possible letters in each unknown position, given the current known/excluded letters -- it was interesting to see the effect in action.

Re: Best Wordle guessing strategy

#56
post #10

I don't like the "exploration" strategy of playing Wordle. Once you have a start word, work onwards from there (aka "hard mode") rather than enter another random guess to narrow down more letters. I know it is a valid strategy, but idk just feels like cheating to me.

A few days ago I got 4 of 5 letters then lost with 3 wrong guesses at the last letter. I should have spent one turn getting 5 guesses at the last letter instead of spending 3 turns guessing 3 letters.

It's not cheating, it's the better way. If you don't like it, you can turn on hard mode!

Re: Best Wordle guessing strategy

#57
post #40

I computed the Pareto optimal frontier of initial Wordle guesses, showing the tradeoff between maximizing green squares and maximizing yellow squares in this thread: https://twitter.com/adereth/status/1478435989982875648

correct me if I'm wrong, but it seems like greens are strictly more valuable than yellows, so giving them equal weight doesn't make much sense to me.

Yes, that’s true. But how much more valuable? Would you trade 0.1 expected greens for 0.2 expected yellows? Computing the Pareto optimal frontier shows you all your options.

Re: Best Wordle guessing strategy

#58

It seems clear to me that there is an optimal starting word, but that the best second word has to depend on the info you gain from the first. Case in point: If you get 3 green 2 yellow in the first word, you can solve on the next guess. Of course, you can constrain your strategies to "I always use the same two/three starting words", and in many cases that will be fine. But it's quite obviously not optimal. Also, the…

> It seems clear to me that there is an optimal starting word I took one step further and calculated the optimal starting word for obtaining green matches (I assume that this also makes it likely to produce yellow matches, although I did not explicitly optimize for that). Beginning with the full list of 5-letter words, I calculated the frequency of each letter of the alphabet in each of the 5 possible positions for a…

> Beginning with the full list of 5-letter words, I calculated the frequency of each letter of the alphabet in each of the 5 possible positions for a 5 letter word.

There’s a great many 5-letter words that the creator will never consider because they’re too obscure. Treating all 5-letter words as possible is a mistake when calculating strategy for this.

High-frequency letters will be over-represented in your analysis.

Re: Best Wordle guessing strategy

#59

Earlier quoted context omitted.

> It seems clear to me that there is an optimal starting word I took one step further and calculated the optimal starting word for obtaining green matches (I assume that this also makes it likely to produce yellow matches, although I did not explicitly optimize for that). Beginning with the full list of 5-letter words, I calculated the frequency of each letter of the alphabet in each of the 5 possible positions for a…

> Beginning with the full list of 5-letter words, I calculated the frequency of each letter of the alphabet in each of the 5 possible positions for a 5 letter word. There’s a great many 5-letter words that the creator will never consider because they’re too obscure. Treating all 5-letter words as possible is a mistake when calculating strategy for this. High-frequency letters will be over-represented in your analysis…

GP might’ve pulled the wordlist from the site. It’s in the bundle iirc.

Re: Best Wordle guessing strategy

#60
I modeled my Wordle solver[1] after Donald Knuth's Mastermind strategy[2].

An optimal guess is found by looking at the list of possible solutions and for each of those possible solutions checking how much each possible guess would narrow down the list of possible solutions.

Once you have a list of all possible guesses and how much each of those possible guesses would narrow down the total number of possible solutions for each possible solution, sort them by the maximum number of total remaining guesses.

The optimal first guesses from my solver are ARISE, RAISE, AESIR, REAIS, or SERAI because each will narrow down the possible word list to at minimum 168 remaining words.

Each guess after that uses the same algorithm with the list of possible guesses filtered with the information you learned in previous guesses.

edit: formatting

1. https://wordlesolver.com source: https://github.com/christiangenco/wordlesolver

2. https://math.stackexchange.com/questions/1192961/knuths-mast...

Post reply on HN