Building a Wordle-solving tweet-bot in Scala
summary
A Wordle solver implemented in Scala that would have tweeted results but stops short of the tweeting step, built on the 2,300 common answers plus ~10,000 allowed guesses and reproducing Wordle’s leftmost-copy-wins feedback. Uses Scala 3 enums for letter states, encodes feedback in a byte with 243 feedback values, precomputes a precomputed feedback table for speed, and chooses guesses by trying every candidate and scoring by sum-of-squares to minimize expected candidate set. A naive first-choice player fails for ~58/2300 words; the one-step lookahead drops average candidate lists from 34 to ~10.6 or as low as ~2 for good guesses.
AI-written summary · about
chapters (12)
- 0:00Introduction to Wordle solver
- 0:43How the solver differs from humans
- 2:07Finding possible Wordle answers
- 3:52Modeling letter feedback
- 7:23Implementing feedback logic
- 9:30Filtering possible words
- 12:50Defining a Wordle player
- 14:38Testing the basic player
- 17:05Choosing the next guess
- 24:13One-step ahead evaluation
- 27:25Demonstrating the advanced player
- 29:52Best possible guess and Q&A
