Skip to main content

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

  1. 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.
    1. 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 .
  2. 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.
    1. 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.
  3. 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.
    1. 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).
  4. 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

  1. wordle play-words
    1. 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
  2. wordle test-all
    1. 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
  3. wordle --help
    1. Display a brief help message

Project details


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amitkh_wordle-0.3.0-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file amitkh_wordle-0.3.0.tar.gz.

File metadata

  • Download URL: amitkh_wordle-0.3.0.tar.gz
  • Upload date:
  • Size: 47.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.16.10-arch1-1

File hashes

Hashes for amitkh_wordle-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d98d990a157bd3bbf1c4f385431759103a47772e36c24ab6a0d5a59188587f59
MD5 9dbc144abf1197fd41d9d2440f036061
BLAKE2b-256 d3c506f134df57ef04f3a6637540dfa3a5b4a7faac5dba2146af8b2eb5ec89e2

See more details on using hashes here.

File details

Details for the file amitkh_wordle-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: amitkh_wordle-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 46.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Linux/5.16.10-arch1-1

File hashes

Hashes for amitkh_wordle-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a4eff9ab8ecf388e05258a8cd59adbafe64d91523ad068e7c03b395d2725210
MD5 2a7e3f6090275b2214ba78711d029074
BLAKE2b-256 f87225a770bcd553a648fe84f571f66307b092b9cc6aaac1688caa1cd6f000db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page