wordle-suggest

Crates.iowordle-suggest
lib.rswordle-suggest
version0.1.1
sourcesrc
created_at2022-02-06 23:47:49.393763
updated_at2022-02-08 14:25:10.528265
descriptionWordle suggestions CLI
homepagehttps://github.com/alexgenco/wordle-suggest
repositoryhttps://github.com/alexgenco/wordle-suggest
max_upload_size
id528086
size143,848
Alex Genco (alexgenco)

documentation

https://docs.rs/wordle-suggest

README

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.

Commit count: 72

cargo fmt