https://github.com/aveek-saha/wordle-solver
Solves the daily Wordle puzzle in hard mode and tweets it 🐦
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.0%) to scientific vocabulary
Keywords
Repository
Solves the daily Wordle puzzle in hard mode and tweets it 🐦
Basic Info
- Host: GitHub
- Owner: Aveek-Saha
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://twitter.com/SolverWordle
- Size: 11.2 MB
Statistics
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Wordle Solver
A solver for the official Wordle game in hard mode. ~~The daily Wordle solved below by the bot is updated and tweeted on @SolverWordle automatically every day at 00:00 UTC.~~
Update
Because of the changes in Twitter's API the bot can no longer post the daily Wordle answer. I am also disabling the daily solution update to this page. Feel free to fork the repo and enable this on your fork by uncommenting the chron schedule.
Rules
- The bot plays Wordle in hard mode, i.e. any information from a guess has to be used in the subsequent guesses.
- The bot uses the list of all valid words + the list of answers from the official wordle website, a total of about 13k words.
- The list of possible answers is not given any special treatment and is mixed with the list of valid words.
Method used
The method used for this bot is inspired from a video made by 3b1b. The approach is similar, use entropy combined with a metric for how common a word is to rank guesses, but the implementation is different from what was shown in the video. For starters, this bot plays exclusively on hard mode
The metric to determine how common a word is comes from Lexipedia, which provides word lists extracted from Wikipedia articles. Lexipedia gives us the frequency of the words in these wiki articles, it also lets you filter the length of the words you need, 5 in our case. An English word frequency dataset from Kaggle is also used in combination with the Lexipedia frequency
A list of possible answers and valid guesses from the official website is used. The word frequencies are then normalized and we keep only the common words in the valid guess list for Wordle. If a word is present in the valid word list but not in the combined frequency dataset, we consider it's frequency to be 0.
Then the entropy is calculated for each word and normalized. To compute the total score for a word a weighted sum of the entropy and the frequency metric is taken. When we sort the list of the first guesses by score, the best first guess turns out to be TARES.
Then for each possible outcome after the first guess, the score for the best second guess is computed. This saves a lot of time when solving the Wordles. For every guess after that the score is calculated on the fly, this doesn't take too long as the number of possible words is usually small.
Stats
The bot was tested on all 2309 Wordle answer words and these are the results.
Regular
A regular test run means the result was considered a failure if the bot could not solve the puzzle in 6 or fewer tries. The average score excludes the failed puzzles.
Average: 3.927
Failure rate: 2.6%
| Score | # of games | Graph |
|---|---|---|
| 1 | 0 | ![]() |
| 2 | 104 | |
| 3 | 674 | |
| 4 | 894 | |
| 5 | 437 | |
| 6 | 140 | |
| X | 60 |
Extended
Just to see how the bot performed, it was allowed to continue playing beyond 6 tries till it found a solution. Overall the solver never takes more than 9 attempts to solve a wordle.
Average: 4.013
| Score | # of games | Graph |
|---|---|---|
| 1 | 0 | ![]() |
| 2 | 104 | |
| 3 | 674 | |
| 4 | 894 | |
| 5 | 437 | |
| 6 | 140 | |
| 7 | 48 | |
| 8 | 9 | |
| 9 | 3 |
Owner
- Name: Aveek Saha
- Login: Aveek-Saha
- Kind: user
- Location: Boston, MA
- Company: @akamai
- Website: home.aveek.io
- Repositories: 66
- Profile: https://github.com/Aveek-Saha
Cloud Computing, Machine Learning and Full Stack. SDE co-op @akamai. MSCS student @northeastern. Previously at @HewlettPackard, @altimetrik & @ IIT Kgp.
GitHub Events
Total
- Push event: 132
Last Year
- Push event: 132
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- ad-m/github-push-action master composite

