#suggestions #hint #file #word #wordle #cli #position

bin+lib wordle-suggest

Wordle suggestions CLI

2 releases

0.1.1 Feb 8, 2022
0.1.0 Feb 6, 2022

#784 in Games

MIT license

57KB
512 lines

wordle-suggest

Crates.io

Usage

Run without arguments to get a list of good starter words:

$ wordle-suggest
carey
casey
money
salem
marie
saver
karen
saved
safer
panel

Enter one into the puzzle and write the result to a file using the following syntax:

Syntax Meaning
a^ a is in the correct position (green)
b? b is in the incorrect position (yellow)
c c is not in the word (gray)

For example, this result:

wordle-result

Is represented like this:

s^cr?a^p

Assume this file is called hints.txt. Re-run wordle-suggest and point it to this file to get a new set of suggestions:

$ wordle-suggest -f ./hints.txt
solar
sugar
# ...

Continue adding results to the hints file and re-running wordle-suggest until you've solved the puzzle!

See wordle-suggest -h for more usage options.

Implementation

The words are stored in a priority queue (a BinaryHeap specifically), based on the frequency of each letter in its specific position compared to the entire word list (words/all.txt), as well as its presence in a list of common words (words/common.txt). So the returned words are sorted by their probability of having their letters in the correct positions, with common words appearing first.

Dependencies

~4.5MB
~88K SLoC