Wordle Game
This is a python implementation of wordle, which uses the same set of available words as the hit game, Wordle.
Play the game manually
python3 src/wordle_main.py --play_type=human
Play the game using an AI
python3 src/wordle_main.py --play_type=ai --strategy=(random|similar_words)
Implement an algorithm to solve it
So you want to write an algorithm that can solve Wordle in as few turns as possible?
- Create a new class that inherits from
BaseStrategy
. - Change the implementation of the
get_guess()
function, as well as themake_guess()
function. - Update
wordle_main
to import the newStrategy
class that you created. - Run it:
python3 src/wordle_main.py --play_type=ai --stragey={your class}
I have taken the liberty of implementing & wiring together SimilarWordsStrategy
to show how you can wire your own algorithm in.