26 comments

[ 3.4 ms ] story [ 45.4 ms ] thread
I thought this was old news? I remember people making videos about using information theory to solve Wordle back when it was particularly hyped. (After writing this I checked, there's even a 3 blue 1 brown video on this)

My favourite along those lines was solving wordle in 1 guess using the distribution of coloured squares on social media https://www.kaggle.com/code/benhamner/wordle-1-6

I had wondered if getting wordle in 1 based on social media data was possible! Now I know.
To paraphrase von Neumann, isn't that how everyone does it?
Yeah, exactly. My girlfriend did it too, using information theory. In my solution, I did chose a word that minimized the size of the larger set of possible guesses. It's not strictly information theory, but it's a good approximation of finding 'the word that brings the most information [this turn]'.

I suspect that this researchers work involves formalizing and proving the optimality of their solution.

This isn't groundbreaking science, sure, but it is a great way to get people interested in a topic. After all, it wouldn't be on Hacker News if the word Wordle wasn't in it. I'm a huge fan of using things like this to teach science, math and engineering.

We started using "Solve 100 Wordles programmatically" as our technical interview, and people _love_ it. They get really into it and have fun. It's pretty easy to do inefficiently, and it's great to watch people build on it and try to improve their scores.

It has two benefits: 1/ everyone clearly understands the problem 2/ people see it as fun rather than a drag.

it's a drag... i mean if you're 22 it's fun. if you love games, or you're older, or mature, i don't know. the pretentious stuff Josh Wardle says is tough. (https://gdcvault.com/play/1027882/-Wordle-Doing-the-Opposite). he says all sorts of stuff that is wrong ("innate understanding of language" except if you're a kid, which is the average gamer...)

it's like when interviews asked people to implement 2048. it's not even the best version of that game, Threes! is.

I'd quickly realised that a set of words which covered most of the alphabet (20 words, leaving b, g, j, q, v, and z excluded) allowed solving virtually all Wordle puzzles. The game quickly lost any challenge.

  wimpy
  crowd
  thank
  fuels
Altering order might give faster results. The order presented leaves the most common letters (e, t) for last. Z is quite uncommon, q is virtually always followed by u, similarly common pairs such as ch, sh, and th, as well as three- and four-letter combinations ing and tion, though those won't show frequently in five-letter words of default Wordle.

It would be possible to vary word choice based on revealed matches and hits, but if your goal is simply to solve (rather than minimise attempts), the above list works quite well.

>In simulations, their approach solved 99% of Wordle puzzles, while the traditional method solved just 90%.

This seems wrong to me, getting a 98%+ solve rate for Wordle is pretty common.

What I'm interested in is the best starting word. Using Shannon entropy, the paper finds that it is "tares".
A couple years ago, I wrote some js to sort a 5 letter word file. The value for a word was based on letter frequency in each letter location. Then I took the words that didn't have repeating letters. The I choose a word at the top that I liked and grep'd for some other words to use for the 2nd and 3rd try. In 3 tries, you have used over half the alphabet and all vowels. This usually lets me get the word by the 4th try. Here are some word sets you can start with.

- pares, moity, bundh|bunch - pares, monty, build|guild - pares, doily, bunch|munch

- pores, banty, guild|mucid - pores, canty, build|guild - pores, manty, build|guild

- bares, ponty, guild|mucid - bares, moity, punch|dunch - bares, monty, guild|child

- cares, ponty, build|guild - cares, moity, bundh|gulph - cares, monty, build|guild

I did this immediately when wordle came out, too. Here's what I got for top 5 starting words along with the entropy:

"tears" 6.00570508021708 "teras" 5.95925128791865 "teals" 5.90122552646963 "tares" 5.88711668336419 "lears" 5.86158270234831

Using another metric which I called consistency (I think it was just minimizing the biggest bucket possible afterwards, trying to beat absurdle fast), the best starting word was tied between "arise", "raise", "aesir", "reais" and "serai". All of these have a worst-case scenario of 168 valid words remaining.

I find it interesting that different implementations seem to come up with slightly different rankings. Maybe the dictionaries are different?

I crushed wordle within a few days of its popularity entering my sphere. It was pretty easy to brute-force a decision tree minimizing the average number of guesses using a lowly python script and a few days of qpu time.

Don't Wordle[1] is significantly more interesting; I've got a solver but the maximum score takes my lowly python script upwards of a day (per day) to solve using brute force. For now, I solve it with a heuristic that terminates in about 20 minutes. My old wordle solver was useful to find a good but suboptimal tree for identifying the answer in 5 undos or less.

Today:

  Don't Wordle 1491 - SURVIVED
  Hooray! I didn't Wordle today!
  ..... 8089
  ..... 4647
  ..... 2492
  ..... 1026
  .Y... 231
  ..G.. 100
  Undos used: 3

    100 words remaining
  x 10 unused letters
  = 1000 total score
My puzzle ethics are: you can and should download the dictionaries of valid answers and valid guesses, you're allowed to keep them separate, but you must not keep the list of answers in its original order.

[1] https://dontwordle.com/

Hacker News commenter uses grep -i ^.u...$ /usr/share/dict/words | grep -i c | grep -i -v '^..c..$' | grep -i -v '^...c.$' to crack today's Wordle
It's trivial to determine the best guess at any point based on what options it cuts out.

But I ended up building an alphaWordle, using MCTS and a reinforcement loop just to get a feel for how AlphaGo approach to solving games works.

It's not a 'smart' way to solve it, but its pretty instructive and I could compare its moves to the theoretical best move to see it progress.

https://github.com/adamgordonbell/bitter-lesson-demos

Isn’t “maximize information gain at each step” already the standard approach to such problems?
I think most people understand such problems are analytically tractable, but not everyone understands that the challenge and pleasure of a game is being able to do so unaided.
I made a Wordle solver in Clojure a while back which is backed by an English word frequency database. My family believes it is cheating to use it. Much more fun to write that code than to play the game though :D
Didn't like 20 different YouTube channels do this exact thing back when Wordle was relevant?
I wrote a wordle solver that was fairly straightforward; it just brute-forced all of the possible outputs, minimizing the maximum number of remaining possibilities.

The very first step was too slow to be interactive (IIRC it took about a minute), but fortunately can be precalculated. With a good first-guess, the number of remaining words is small enough that you can just brute-force.

Note that this is not theoretically optimal; you would want more than one level of lookahead for that, but it's good enough to solve almost the entire YAWL dictionary in 6 guesses or less.

The NYT world bot that "reviews" your game also has entropy as one of the things it addresses I think.

I prefer to not have or use predetermined words. It's most fun to actually feel like you have a chance at solving it in one, and have the challenge of more or less information from first play. It's interesting to compare the solve distribution that the game lists when you're done. I wonder what information can be gleaned from that?

I have a tree.

I always started with 3 words

POINT LASED CRUMB

This eliminates not only the most frequent letters but least frequent letters (Bloom filter), leaving rest of infrequent letter set to guess by narrow deduction.

Never failed me.