logoalt Hacker News

Researchers used math to crack Wordle

24 pointsby hhslast Saturday at 10:38 PM27 commentsview on HN

Comments

boothbytoday at 4:00 PM

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/

show 1 reply
jezzamontoday at 2:39 PM

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

show 1 reply
gkobergertoday at 2:46 PM

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.

show 1 reply
trollbridgetoday at 4:08 PM

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

dredmorbiustoday at 3:04 PM

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.

show 3 replies
starkytoday at 3:32 PM

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

kpstoday at 2:42 PM

To paraphrase von Neumann, isn't that how everyone does it?

kenstoday at 3:33 PM

What I'm interested in is the best starting word. Using Shannon entropy, the paper finds that it is "tares".

show 1 reply
plantstoday at 3:01 PM

plug to my blog post where I did something similar a few years back! https://willbeckman.com/wordle.html :). Not sure if this is an identical solution, but it was a fun little project.