I've just released Wordle Buddy, a solver for the popular Wordle puzzle game, as a console app for macOS, Windows, and Linux. It also includes a local game mode (no need to wait for a full day!), with or without the solver, and it has a listing mode where you can just get a list of words that match a given filter.
Wordle itself is a fun little game and an instant classic. It's Mastermind but with words instead of combinations, and letters instead of colors. Only problem is: I'm not that good at word games. I have an excellent command of the English language and even better critical thinking skills, but somehow that doesn't translate into figuring out what letters might fill in the blanks for something like
_RO_T. I suppose practice will improve my abilities there, but in the meantime the idea of making a program to solve Wordle puzzles for me was instantly very appealing.
On my first attempt I picked the low-hanging fruit: if Wordle says a word begins with
LEA, I remove all the words that don't begin with
That sounds good at first, but the problem is when many possibilities remain and you only have a few more guesses. For example, let's say we tried
LEACH as our first word and found that
LEA is correct and
CH is not present. That leaves 8 other possibilities:
LEAFY LEAKY LEANT LEAPT LEARN LEASE LEAST LEAVE
Wordle Buddy tackles this by providing disambiguation words. These words usually cannot be the solution but they are composed of the "other" letters (besides
LEA) that will help quickly zero in on the solution. For example, here's Wordle Buddy's answer to the
LEACH input with
TRYST cannot be the answer but it's the fastest way to eliminate possibilities. If the hidden solution was
LEAPT then the next step would go like this:
Now we're able to solve the puzzle with one or two more tries.
The main dictionary of 2,315 words that Wordle uses has the following letter frequencies:
Note that the first 10 letters can be covered with the words
SONIC, so when I play I always start out with
ALERT and in most cases follow it up with
Oh, and that list of words that matches the pattern
_RO_T? Wordle Buddy has it covered:
> wordlebuddy list _RO_T droit front frost grout trout