This is a small Rust project which creates an aided solver for the Wordle game. The compiled programme when run provides updated optimal ‘next guess‘ suggestions. Note that this implementation is currently suited for the New York Times version. Technically will work with any other implementation in any language, provided a sufficiently large word list is added to the project.
I first created a prototype in python, which is stored in the folder ./src-py/.
Developers should ideally have the following installed:
- a bash terminal. This is already provided with Linux/OSX. Windows users can install bash for example via https://gitforwindows.org (-> gitbash).
- the make tool, which can be found on the GNU website. Alternatively, one can use the Homebrew formula (for Linux/OSX users) or the Chocolatey recipe (for Windows users).
The current project has been developed so far with the cargo package manager v1.56.0. Rust can be installed via rustup from here, which installs both Rust and cargo (cf documentation).
Use Python 3.10.x (only relevant if one wishes to use the python code).
Provided the above system requirements are satisfied, run
make setup
from the root of the project.
Provided setup has been completed and system requirements are met, call:
make build
in a bash terminal from the project root, in order to install the package dependencies ('crates').
In a bash terminal from the project root, call
make build # only need this once
make run
The build
target creates a binary in the ./dist/
folder,
and this can also be manually executed.
Since upon building the assets are embedded, this binary artefact can in fact be moved anywhere in your system and be executed without requiring this project folder.
See ./examples/.
The word list (./assets/words.txt) have been extracted from the source code of the New York Times website. The app should work with any list of (English) words, provided this are sufficiently exhaustive (in particular, they should contain at least all---currently 2309---words that NYT use).
Due to the optimisation strategie employed in this app, technically the aided solver operates in ‘hard mode‘.
- unit tests.
- more complete rust documentation.
- end-to-end tests.
- examples.
- dynamical loading of word list e.g. from an online source.
- a GUI (e.g. via imgui) which allows the user to switch word lists and choose tactics.