The popularity of Wordle continues to grow. In both English and Spanish, millions of players head to the official pages daily to get their daily dose and share results on social media. However, Wordle has also become a fascinating subject of study. In fact, the 3Blue1Brown channel published a video that teaches us how to solve Wordle with information theory, and includes the preparation of a bot that played thousands of Wordle games under different conditions.

How to solve Wordle with information theory
How to solve Wordle

Can we talk about a perfect strategy for Wordle? Does something similar to what many on the Internet call META (Most Effective Tactic Available) exist? I imagine every player has their favorite words to "open" the games. Personally, I use "waste/flour" for the English version and "crema/flujo" in Spanish, knocking out four vowels in both cases… but I doubt it's the best overall.

3Blue1Brown, one of the best channels dedicated to mathematics on YouTube, decided to take advantage of Wordle's popularity to share a lesson on information theory, focusing on the concept of entropy. Is it truly possible to solve Wordle with information theory and advanced calculations? Actually, the exploration of the game goes much further, and we need to watch this 30-minute video to understand the process.

How to solve Wordle with entropy

After a brief introduction to the game and an analysis of the relative frequency of letters in the English language, we arrive at the basic definition of the bit (if an observation cuts the space of possibilities in half, that means it has one bit of information), and entropy. In this specific case (and applying very relaxed terms), entropy defines the expected value of information in a word.

What the 3Blue1Brown bot does initially is nothing more than search for the word with maximum entropy, or rather, the entropy of the distribution across all patterns (remember there are about 13,000 words in Wordle, with 2,315 answers). Then it repeats the same process for the second word, and so on until the end. A series of simulations reveals that the average is 4.1. It's not terrible, but most human players can solve Wordle in four words.

The next step is to incorporate the most common words into the processing, based on the WordFrequencyData function from Wolfram Mathematica. With this new combination of obtained information, uncertainty, and word frequency, the second version went from 4.1 to 3.6, an important improvement... but it also lost some games. Finally, by adding the 2,315 official Wordle words, the third version lowered the average to 3.4.

Another interesting fact is that if the analysis begins with the 2,315 words, the level of uncertainty is about 11 bits. With pure brute force, in the first two attempts we can obtain about 10 bits of information. That remaining bit equals two possible words. Therefore, the video suggests that it is impossible to create an algorithm capable of lowering the average to 3.

There is no way to obtain enough information in the first two attempts to guarantee a three-word victory in 100 percent of the games. Even limiting the simulation to the 2,315 words and excluding every correct result from previous games was not enough to break that floor of 3. The second video from Games Computers Play points in a similar direction. Its best simulation wins 96.5 percent of the games, with an average of 4.3 words.