Why I built it
Everyone remembers the Wordle craze. When I play a game like that and use the same strategy every time, I start wondering whether I could automate the logic, so I did.
It started as a command-line tool. Recently I turned it into a hosted page so I could use it from my phone, not just when I'm at my computer.
What it does
Type in a guess, then tap each tile to cycle it through gray, yellow and green to match what Wordle showed. The page shows how many words are still possible and the top 10 suggestions, and tapping a suggestion adds it as the next guess. Guesses are kept in the URL, so a game can be reloaded or shared.
Only words that fit every guess are kept, with repeated letters handled the way Wordle does. The rest are ranked by letter: count how many remaining words contain each letter, then favor words with the most common letters, so each guess rules out as much as possible.
How it's built
- Code
- Plain HTML and JavaScript with no build step, filtering and ranking in the browser. It started as a Go command-line program, which the site mirrors and which should give the same results.
- Data
- The original list of 2,315 Wordle answers from before the New York Times took over the game, generated into a JavaScript file.
- Hosting
- GitHub Pages, at mattlove.dev/word.
- Deploying
- GitHub Actions publishes the site on every push to main that touches it.