I love his animations, I wonder what programs he is using. He can do animations and calculations at the same time and it's all visually appealing. Most of his videos are amazing and fun to watch.
"Note, there are two versions of manim. This repository began as a personal project by the author of 3Blue1Brown for the purpose of animating those videos, with video-specific code available here. In 2020 a group of developers forked it into what is now the community edition, with a goal of being more stable, better tested, quicker to respond to community contributions, and all around friendlier to get started with."
At 17:05 he shows two possibilities left, ABBAS and ABYSS. In the actual implementation of Wordle, ABYSS is the only remaining possibility.
(I recommend his videos to my students, who love them!)
I don't know anyone who has actually read the Wordle JavaScript, but there are two word lists. The first list consists of more familiar words, ordered by date to provide secret words for each day. The second list consists of other words in alphabetical order that are also accepted as guesses. One reverse-engineers this code by figuring this out; one can experiment by resetting the computer clock to a new day.
The standard assumption in any analysis of Wordle as actually played is that we don't know what day it is. Otherwise, the game is deterministic.
Various of us have written code that agrees that SOARE is the best first guess using Shannon entropy for how Wordle is actually played (RAISE is close and easier to remember), and TARES is the best first guess for the most common misunderstanding for how Wordle is played. I don't recognize his first guess, so I don't recognize what he's doing.
There isn't actually any proof that Shannon entropy is mathematically optimal here. I searched the literature for a relevant theorem after getting annoyed that so many online approaches were improvised. The trouble is that five letter words have a fixed, known, lumpy distribution, an artifact of human choice. If the game randomized both the secret word and the word lists themselves, and one could query an oracle to measure bin sizes for each candidate guess, ... but that's cooking the conclusion. If one took a limit as word length went to infinity, with a regular definition of what constitutes a word, there would likely be an optimality proof. On the other hand, after choosing an objective function one could entirely solve this finite game, as some have done, and entropy doesn't even come up.
A refined variant on entropy that would be computationally feasible in cases where one can't solve completely would be to look ahead several steps. For each possible response to each first guess word (in practice one need only consider the strongest, and a partial search is nearly optimal as my Dad noticed programming JOTTO on Kodak's computers in the 1960s), find the optimal next guess using Shannon entropy. Now measure the entropy of the bins after both guesses, to value the first guess.
I wonder if the virality of the game would have been boosted if the word list was stored server-side and not readable from the client source. Although I'm not on twitter so I don't know if future word spoilers are an issue.
The 3Blue1Brown video considers using the second list to be cheating, so that is probably the reason for a different optimal first guess. It takes a more general approach to figuring out which words are probably on the list, using a sigma distribution on top of the list of most common english words. (Notably, Grant admits at 19:59 that the parameters for this sigma distribution are a shot in the dark.)
This way, the bot can be used to play wordle against any adversary and not just the original game, since every valid word (1st list) can be guessed.
There's something so gratifying about seeing your mental models of entropy and probability explained so visually. I wish all maths was taught with interactive diagrams, but it's not fair to expect everyone to be able to make 3b1b-level animations.
It's a bit disappointing to see "mathematically optimal" in the title when the strategy is based on a heuristic (granted, a very intuitive and effective one). For actual optimality results this article is good: https://www.poirrier.ca/notes/wordle-optimal/
In particular, max entropy heuristic + beam search will derive the optimal (now proven) strategy in terms of minimizing expected number of guesses
Slightly off-topic: 3Blue1Brown is such a treasure. I've been preparing for an exam for the past few days and only really discovered his LinAlg videos. They're incredible to get the reasoning behind a lot of what's happening.
13 comments
[ 12.1 ms ] story [ 363 ms ] threadhttps://github.com/ManimCommunity/manim/
According to 3b1b on the original repo:
"Note, there are two versions of manim. This repository began as a personal project by the author of 3Blue1Brown for the purpose of animating those videos, with video-specific code available here. In 2020 a group of developers forked it into what is now the community edition, with a goal of being more stable, better tested, quicker to respond to community contributions, and all around friendlier to get started with."
https://github.com/3b1b/manim
(I recommend his videos to my students, who love them!)
I don't know anyone who has actually read the Wordle JavaScript, but there are two word lists. The first list consists of more familiar words, ordered by date to provide secret words for each day. The second list consists of other words in alphabetical order that are also accepted as guesses. One reverse-engineers this code by figuring this out; one can experiment by resetting the computer clock to a new day.
The standard assumption in any analysis of Wordle as actually played is that we don't know what day it is. Otherwise, the game is deterministic.
Various of us have written code that agrees that SOARE is the best first guess using Shannon entropy for how Wordle is actually played (RAISE is close and easier to remember), and TARES is the best first guess for the most common misunderstanding for how Wordle is played. I don't recognize his first guess, so I don't recognize what he's doing.
There isn't actually any proof that Shannon entropy is mathematically optimal here. I searched the literature for a relevant theorem after getting annoyed that so many online approaches were improvised. The trouble is that five letter words have a fixed, known, lumpy distribution, an artifact of human choice. If the game randomized both the secret word and the word lists themselves, and one could query an oracle to measure bin sizes for each candidate guess, ... but that's cooking the conclusion. If one took a limit as word length went to infinity, with a regular definition of what constitutes a word, there would likely be an optimality proof. On the other hand, after choosing an objective function one could entirely solve this finite game, as some have done, and entropy doesn't even come up.
A refined variant on entropy that would be computationally feasible in cases where one can't solve completely would be to look ahead several steps. For each possible response to each first guess word (in practice one need only consider the strongest, and a partial search is nearly optimal as my Dad noticed programming JOTTO on Kodak's computers in the 1960s), find the optimal next guess using Shannon entropy. Now measure the entropy of the bins after both guesses, to value the first guess.
Or just modify the JavaScript. It's uses the date as an index into the La array, modulo the length, which is 2315.
I used Chrome DevTools to pretty print the source code, it's on line 1156.
This way, the bot can be used to play wordle against any adversary and not just the original game, since every valid word (1st list) can be guessed.
In particular, max entropy heuristic + beam search will derive the optimal (now proven) strategy in terms of minimizing expected number of guesses
This site ranks CRANE 6th, & 8th in hard mode. Includes other parameters like PALET being optimal start if only 5 guesses were allowed