Wordle Reverse-Engineering And Automated Solving

Simplified Absurdle decision tree for a single letter guess from a set of three possible options

We don’t know about you, but we have mixed feelings about online puzzle fads. On one hand, they are great tool to help keep one sharp, but they’re just everywhere. The latest social-media driven fad, Wordle, may be a little bit too prevalent for our liking, with social media timelines stuffed with updates about the thing. [Ed Locard] was getting a bit miffed with friends’ constant posts about ‘Today’s Wordle’, and was hoping they’d get back to posting pictures of their dogs instead, so did what any self-respecting hacker would do, and wrote a python script to automate solving Wordle puzzles, in a likely futile attempt to get them to stop posting.

Actually, [Ed] was more interested in building a solver for a related game, Absurdle, which is described as an adversarial variant of Wordle. This doesn’t actually select a single word, but uses your guesses so far to narrow down a large pool of possible words, keeping you guessing for longer. Which is pretty mean of it. Anyway, [Ed] came up with a tool called Pyrdle, (GitHub project) which is essentially a command version of Absurdle, that has the capability of also solving Wordle as a byproduct. It turns out the JS implementation of Wordle holds the entire possible wordlist, client-side, so the answer is already sitting in your browser. The real interest part of this project is the approach to automated problem solving of puzzles with a very large potential set of solutions. This makes for an interesting read, and infinitely more so than reading yet another Wordle post.

And one final note; if you’re not at all onboard with this, love Wordle, and can’t get enough, you might like to install [brackendawson]’s comically titled (command) notfoundle shell handler, for some puzzling feedback on your command-line slip-ups. Well, it amused us anyway.

Puzzle projects hit these pages once in a while. Here’s the annual Xmas GCHQ puzzle, If you’re more into physical puzzles, with an electronics focus (and can solder) check out the DEF CON 29 puzzle badge!

15 thoughts on “Wordle Reverse-Engineering And Automated Solving

    1. Who needs an app? Just look at the javascript and do a text search. There’s a list of words in the middle and the website is following that list in sequence. Find today’s word (text search) and tomorrow’s word is the word after that.

      Spoiler: Tomorrow’s word begins with a ‘p’ and has three vowels and a ‘s’ in it. The day after that starts with a ‘u’ and ends in ‘r’.

      1. It feels like you might have missed the point – The link is around building something to solve it as a challenge, not finding out what the word is in its own right… People have built chess, go, … robots for years.

  1. I used to design puzzles as a hobby.

    There’s a difference between a “hard problem” and an actual puzzle. There’s tons of what are marketed as “puzzles” which are nothing more than a slog through all possible combinations, and I don’t find these particularly enjoyable or puzzling.

    A real puzzle forces you to think, and gives you an “Aha!” moment. There’s something about getting the solution and just *knowing* that it’s the right solution and the only one that fits. It’s somehow linked to information theory, in that there’s a tiny amount of information that leads to a unique answer. Maybe that’s the definition: a puzzle is a tiny amount of information that identifies a single answer within a sea of possibilities.

    Of course, “what is the 1,000th digit of pi” would satisfy that without being interesting, but “what two letters of the alphabet are not contained in any US state names” is somehow captivating.

    Here are to of my favorites:

    1) What is the next letter in this sequence (ie – replace the underscore):

    O T T F F S S _

    2) Which integers less than 10,000 are both squares and cubes? For example, 64 is 8 squared and 4 cubed. Find all the others.

    I first saw #2 above as an introductory example of computer programming (have a loop from 1 to N), and on thinking about it I realized it’s actually a puzzle. If you can think it through the right way, you should be able to do the calculations in your head. If you’re not good doing math in your head, it’s simple enough with pencil and paper.

    P.S. – do NOT post answers! Let other readers have fun too!

    1. Puzzle 2 should read *positive* integers. Find all *positive* integers less than 10,000 that are both squares and cubes.

      Two ladders sit X-wise in an alley, ends in the corners. One ladder touches the opposite wall 40 feet above the ground, the other touches the opposite wall 30 feet above the ground. The point where the ladders cross is 10 feet above the ground.

      How wide is the alley?

      (If you’re anywhere other than the US, feel free to convert to metric to make the problem easier.)

    2. How about add a degree of difficulty on the first one?

      _ O T T F F S S _ _

      The second one is just math. I can’t see a difference from computing the nth diflgit of Pi.

      And how about this ? should be trivial by now.
      _ 3 10 _ 13 _

  2. This is interesting!
    I made a webpage where one can filter down a huge list of words using Regex like « A….E..R » and letters to include and to exclude. It’s not automated, though.

    It targets the French fork of Wordle (called Sutom), has a dictionary of 360 000 words and can easily guess any Sutom in 2 to 3 moves only.

    For instance, today, with only the first letter and the word length, it narrows down to 969 words.
    If I input the first word of the list and use the hints Sutoms gives me, it then narrows to only 6 words. The first of the remaining list happened to be the good one for today.

    Two guesses to target one word out of 360 000 words. Not bad.

    Sutom : https://sutom.nocle.fr/
    My filter : https://lehollandaisvolant.net/tout/tools/dico/

    1. 3B1B did an interesting video about the information that can be gained from each guess. There very well could be a difference in the word lists, but his solver averaged 3.6 guesses to win from the original wordle list.

  3. Deleting my facebook account is one of my favorite things I’ve done in the past two years, but I do enjoy wordle. Can’t imagine what there is to post about it beyond “found this puzzle site, it’s kind of fun!” once.

    I also enjoyed writing a shell script to help solve it. With access to /usr/share/dict/words, it takes at most four guesses to solve.

  4. This seems overly complicated for solving wordle. All I did to cheat was import a word list into SQL, use another query to give each word a score based on which letters occur the most often in the list, then write a small JavaScript app that creates the SQL queries to return the most likely word given what I know (like letters that have to exist in certain positions, letters that have to appear in the word, letters that do not exist, etc.) then i just return them in the order of the words score.

    Rarely does the JavaScript code ever have to guess more then 3 times.

    I tried to make an auto solver that people could load up in their browser that would solve the puzzles for them but stopped when cross site scripting got in the way of the Iframe.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.