CLI tool that helps players decide their next guess while playing Wordle.
Print help:
wordle_help -h (or wordle_help --help)
Provide one or more guesses:
wordle_help -g "slate"
wordle_help -g "slate" -g "[p][r](o)ps" -g "[p][r]i[o]n"
Each guess is a 5-letter word. You can optionally annotate letters with:
- Green letters: surround the letter with
[](correct letter, correct position) - Yellow letters: surround the letter with
()(correct letter, wrong position)
Examples:
slatemeans none ofs,l,a,t,eappear in the answer.[p][r](o)psmeans:pandrare green in positions 1 and 2ois present but not in position 3- the second
pis unmarked, sopis excluded elsewhere
make build
make test
make clean
Instead of printing candidates alphabetically, wordle_help prints them in ascending order of E_remaining (the estimated number of remaining candidates after making that guess).
Let:
Cbe the current set of remaining candidate answers (sizeN)gbe a potential guessf(g, a)be the 5-tile Wordle feedback pattern (gray/yellow/green, including duplicate-letter rules) you would see if the true answer wereaand you guessedg
For a fixed guess g, the mapping a -> f(g, a) partitions C into buckets by feedback pattern. If bucket p has size n_p, then:
E_remaining(g) = (1/N) * Σ_p n_p^2
E_eliminated(g) = N - E_remaining(g)
The tool prints each candidate guess along with these two values.
After building, you can simulate one or more games using bin/wordle_sims. The tool will run bin/wordle_help multiple times to simulate the game, and gather statistics about the number of guesses it takes to solve each game if it uses the suggested guess at the top of the list.
Provide exactly one starting word and optionally one or more answers:
make build
# Simulate 50 games with slate as the starting word and random answers:
bin/wordle_sims -s slate
# Simulate 2 games with slate as the starting word and stale and apple as the answers:
bin/wordle_sims -s slate -a stale -a apple
If you omit all -a/--answer flags, the tool will randomly sample 50 answers from /usr/share/dict/words.
The tool prints the bin/wordle_help commands it runs (without printing their output), then prints a summary table of the game results along with the average number of guesses it took to solve each game. E.g.,:
| Starting Word | Answer | Total Guesses |
| ------------- | ------ | ------------- |
| slate | fifie | 4 |
| slate | smith | 3 |
| slate | blare | 6 |
...
| slate | unfur | 4 |
Average guesses: 4.07
| Guesses | Count |
| ------- | ----- |
| 1 | 0 |
| 2 | 1 |
| 3 | 8 |
| 4 | 23 |
| 5 | 9 |
| 6 | 2 |
wordlehelp/main.go: CLI entrypoint forwordle_help; parses flags, validates guesses, builds regex, and prints sorted candidates
wordlesims/main.go: CLI entrypoint forwordle_sims; runs multiple simulations by repeatedly callingbin/wordle_help
go-sdk/recommendations/: SDK entrypoint for recommendations (go-sdk/recommendations.NextGuessRecommendations)utils/: Candidate filtering/scoring logic, plus guess parsing/validation and regex construction utilities
bin/wordle_help: executable that helps players decide their next guess while playing Wordlewordle_sims: executable that simulates games of Wordle and reports aggregate results