The mathematically optimal Wordle strategy

The mathematically optimal Wordle strategy

An excuse to teach a lesson on information theory and entropy.
Help fund future projects: https://www.patreon.com/3blue1brown​
Special thanks to these supporters: https://3b1b.co/thanks
An equally valuable form of support is to simply share the videos.

Note, the way I wrote the rules for coloring while doing this project differs slightly from the real Wordle when it comes to multiple letters. For example, suppose in a word like "woody" the first ‘o’ is correct, hence green, then in the real Wordle that second ‘o’ would be grey, whereas the way I wrote things the rule as simply any letter which is in the word somewhere, but not in the right position, will be yellow.

To be honest, even after realizing this differed from the proper rule, I stuck with it because it made the computation of the full matrix of word-combination patterns more elegant (and faster), and the normal rule has always slightly bothered me. Of course, it doesn’t make any difference for the actual lesson here on entropy, which is the primary goal, and at least as I’ve gone back tried rerunning some of the models with the correct convention, it doesn’t really change the final results.

Contents:
0:00 – What is Wordle?
2:43 – Initial ideas
8:04 – Information theory basics
18:15 – Incorporating word frequencies
27:49 – Final performance

Original wordle site:
https://www.powerlanguage.co.uk/wordle/

Music by Vincent Rubinetti.
https://www.vincentrubinetti.com/

Shannon and von Neumann artwork by Kurt Bruns.

Code for this video:
https://github.com/3b1b/videos/blob/master/_2022/wordle.py

These animations are largely made using a custom python library, manim. See the FAQ comments here:
https://www.3blue1brown.com/faq#manim
https://github.com/3b1b/manim
https://github.com/ManimCommunity/manim/

You can find code for specific videos and projects here:
https://github.com/3b1b/videos/

——————

3blue1brown is a channel about animating math, in all senses of the word animate. And you know the drill with YouTube, if you want to stay posted on new videos, subscribe: http://3b1b.co/subscribe

Various social media stuffs:
Website: https://www.3blue1brown.com
Twitter: https://twitter.com/3blue1brown
Reddit: https://www.reddit.com/r/3blue1brown
Instagram: https://www.instagram.com/3blue1brown_animations/
Patreon: https://patreon.com/3blue1brown
Facebook: https://www.facebook.com/3blue1brown

webmaster

Related post