Entropy based Wordle Solver (CLI). Inspired by 3 Blue 1 Brown
Project description
Entropy based Wordle solver
CLI built with Typer. Based on this video from 3 Blue 1 Brown
Installation
pip install amitkh-wordle
Quick Start
- The solver needs to generate a pattern dictionary containing all of the word and pattern combinations in order to run. To do this, run
wordle gen-pattern-dict
. This process will take around 10-15 minutes.- By default the dictionary will be compressed using bz2 to about 200 MB. You can also specify the
--no-compress
option which will save the pickle without compression and will result in quicker load times, but take about 800 MB of storage .
- By default the dictionary will be compressed using bz2 to about 200 MB. You can also specify the
- To run the solver in interactive mode, run
wordle play
. This will be followed by roughly 2 minutes of setup time while the program loads in the pattern dictionary and calculates the initial guess.- For maximum speed, you can also add the
-s
flag, which runs the solver in time saving mode. This means instead of spending 1 minute or so calculating the first guess, which is always "tares", it simply assumes this to be the first guess and allows you to enter your pattern from "tares" straight away.
- For maximum speed, you can also add the
- After this, you will be presented with some information and prompted for a guess. The program will present you the top 10 guesses (though you can guess any word you would like), along with (from left to right) the expected score should you play that guess, the expected information that guess will provide in bits, and the probability that guess is the answer.
- If there are under 20 words remaining, the program will also print out those remaining words along with the probability that they are a potential answer based on frequency (which is not the same as the probability that they are the answer to this game).
- From there, simply type in your guesses and the pattern that was returned to you according to the instructions, and repeat until solved.
Other Functions
wordle play-words
- This command allows you to pass in a word or list of words to be played by the solver, like so
wordle play-words snake cater abyss
- This command allows you to pass in a word or list of words to be played by the solver, like so
wordle test-all
- This command runs the wordle solver on all of the 2,315 answers to the additional wordle, tracking the number of guesses taken for each, and writing them as a JSON to the file name given as an argument
wordle --help
- Display a brief help message
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amitkh_wordle-0.3.0.tar.gz
(47.8 kB
view hashes)
Built Distribution
Close
Hashes for amitkh_wordle-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a4eff9ab8ecf388e05258a8cd59adbafe64d91523ad068e7c03b395d2725210 |
|
MD5 | 2a7e3f6090275b2214ba78711d029074 |
|
BLAKE2b-256 | f87225a770bcd553a648fe84f571f66307b092b9cc6aaac1688caa1cd6f000db |