Play Wordle interactively in the CLI/GUI. Also contains various algorithms to defeat the game.
Project description
ruin-wordle
Wordle is fun, so let's ruin it with computers.
Install with pip install pyrdle
or pip install git+https://github.com/cthoyt/ruin-wordle.git
to get the latest
version.
How to Play
Run the wordle
command in the shell. Use --help
to see how to set the
game to have a different number of letters, different number of guesss,
or to use a different language.
$ wordle
Metrics
This repository assesses two metrics about each algorithm:
- Success: how many of the words of the given length and number of guesses can it successfully solve?
- Speed: what's the average number of guesses needed over all successful words?
Later, this repository will run multiple trials in order to assign confidence intervals for success and quality for randomized algorithms.
Strategies
This repository is a playground for implementing new solve strategies. Feel free
to send a PR with your own (just subclass the Player
class)!
Terminology:
- Perfect guess: a guess that uses all previous information available, including knowledge about correct positions, unused letters, and used letters
Three word initial guess
This strategy involves deterministically guessing three words that cover a wide variety of vowels and consonants. For example, (lunch, metro, daisy) covers all five vowels and 10 different consonants.
It's pretty likely that with these choices, you will be able to deterministically solve for the word after one more perfect guess. It turns out that with this example, you can solve 96.9% of the time with an average of 4.27 guesses. That's pretty surprising, but also assumes you have computer-like recall of words.
Warnings
- This code uses https://pypi-hypernode.com/project/english-words/. This has some weird stuff missing from it.
See also
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
Built Distribution
File details
Details for the file pyrdle-0.0.1.dev0.tar.gz
.
File metadata
- Download URL: pyrdle-0.0.1.dev0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e96e42325f28ad044f5c3442e2f1447558b6d657e6b089b01dd5ebad184f4505 |
|
MD5 | eb6847ce2b39cdc8a28889f716a5d0d4 |
|
BLAKE2b-256 | ed6c5ca059805434008c6fcd1a62b26ac96d26331839f0fe3a3758474066d1eb |
File details
Details for the file pyrdle-0.0.1.dev0-py3-none-any.whl
.
File metadata
- Download URL: pyrdle-0.0.1.dev0-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc6b6de38ec7cd48d4f99dabed243db3f2b179e9e22ef90d7e3495dc1dd82110 |
|
MD5 | 6be8a3b1d358dcf2b05d5db16069c007 |
|
BLAKE2b-256 | 651fc1700209c6c053a94819cdd7db96f60f822e1070d4086ce340b48dd101e5 |