8000 GitHub - danieldeng2/wordle-solver: A solver for the Wordle game by looking at entropy change. · GitHub
[go: up one dir, main page]

Skip to content

danieldeng2/wordle-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wordle Solver

This simple script solves the wordle game by filtering the dictionary and picking the word that maximises the information gained from each word guess.

The solver is optimal for shallow search (averaging 3.46 words per solve), and guarentees to solve the game within 6 words.

Usage

  1. Open chrome dev tools (Ctrl + Shift + I) and paste index.js into chrome Content snippets.

  2. Press (Ctrl + Enter) to run the snippet.

How it works

For each round, the solver filters out all the possible moves that can result in the given Green, Yellow, Black combination. It then pickes the word that divides the remaining words (by calculating the array of colours) so that entropy is maximised.

When using the results dictionary exclusively, the best starting word is RAISE. The solver averages 3.600 words per solve, with the maximum being 8 words for BOXER.

When using the extended dictionary, the best starting word is according to the algorithm is SOARE. The solver averages 3.464 words per solve, with the maximum being 6 words for WAFER.

To improve runtime and the number of average guesses, the best result from a deep search SALET is used as the starting word (reducing the average down to 3.4328). This behaviour can be disabled by passing useCache=false to highestGainWord().

About

A solver for the Wordle game by looking at entropy change.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

0