https://github.com/p403n1x87/wordle
A simple, pure Python Wordle implementation.
https://github.com/p403n1x87/wordle
Last synced: 7 months ago
JSON representation
A simple, pure Python Wordle implementation.
- Host: GitHub
- URL: https://github.com/p403n1x87/wordle
- Owner: P403n1x87
- Created: 2022-01-04T16:09:56.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-11T09:46:23.000Z (almost 4 years ago)
- Last Synced: 2025-01-31T10:14:35.104Z (9 months ago)
- Language: Python
- Size: 101 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wordle
A simple, pure Python [Wordle](https://www.powerlanguage.co.uk/wordle/)
implementation.## How to play
Install from GitHub using `pip`/`pipx` and run with `wordle`
~~~console
pipx install git+https://github.com/p403n1x87/wordle.git
wordle
~~~
## Wordle solver
Use the solver with
~~~console
wordle-solve
~~~You will be asked for your initial guess and for the outcome. Use 0 for a gray
tile, 1 for a yellow one and 2 for a green one. You will be suggested the next
word to try. Use it and then report the outcome. Hopefully you will get the word
you are looking for in less than 6 moves 🙂. Tests show that the solution is
correctly guessed in 100% of the cases.### How the solver works
The high-level strategy is to shrink the set of possible words as much as
possible after each attempt. To this end, the solver counts the number of words
in which each letter appears. It then computes a score for each word based on
the (unique) letters that are not known to be in the final solution and summing
their word counts. At each attempt, this should guarantee that we a good number
of words.