Skip to content

willf/wordle-solver

Repository files navigation

Wordle Solver and CLI Player

A Python-based Wordle solver and CLI player

This was created using Python 3.9.7.

SPOILER ALERT: the data directory contains spoilers for upcoming Wordle games. View at your own risk 😅.

The only requirement, I think is for the rich libary, and that's just for the CLI.

To play a game:

python cli -h
usage: cli.py [-h] [-n NUMBER]

optional arguments:
  -h, --help            show this help message and exit
  -n NUMBER, --number NUMBER
                        Archived Wordle game

You can play against archived games, or choose a random word by not specifying -n at all.

To use the solver:

echo 'badly' | python solver.py

To select a start word, use the -g flag:

echo 'badly' | python solver.py -g 'adieu' -v

To use Peter Norvig's four guesses, use the --norvig flag.

See python solver.py -h for more.

etc.

You can write your own Solver by subclassing Solver. The only required method is guess. I'm sure you'll write a better solver than I did. But I'm spent enough time on this already. 🕐 🧛

About

A Python-based Wordle solver and CLI player

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages