wordler is a C++ program to help you solve Wordle puzzles by suggesting which word to guess next.
How to Build
wordler.sln is the project file to build wordler using Microsoft Visual Studio on Windows.
I have not tried to build wordler on other systems, but I think it should work with a recent version of gcc or clang on Linux or MacOS.
The source code is in:
- main.cpp
- cmdline.h
- timer.h
The code uses some C++23 features.
How to Use
After entering a guess into Wordle, run wordler with your guesses and Wordle’s hints as arguments. It will compute a good word for your next guess. For example, if your first guess is “learn” and Wordle displays this:
you would run wordler learn .g.y. Note that the hint is specified by using ‘g’ for a green letter, ‘y’ for a yellow letter, and ‘.’ for a grey letter.
$ ./wordler learn .g.y.
Time: 2.30 seconds
Best guess is "metes"
Enter wordler’s guess into Wordle to get another hint. Then, run wordler again with both hints to get the next guess. For example:
$ ./wordler learn .g.y. metes .g...
Time: 0.09 seconds
Best guess is "block"
And so on, until the game is over.
Other Options
wordler can be used in other ways. The --help option will display all of the command-line options.
- --solve <word>
- Solve for the given answer word
- --all
- Solve all possible answer words (this takes a long time!)
- --stats
- Display stats from a results file that was produced by --all
- --test=<num>
- Run a specified test
How It Works
Info forthcoming...