Wordle solver: A simple greedy solver for Wordle
See the README for a quick start and usage examples.
(require wordle-solver) | package: wordle-solver |
Note: The interface might change in the future. The documentation below describes only a subset of the exported forms.
procedure
x : any/c
procedure
(play target goals all-words [ #:history-hash history-hash]) → history? target : guess? goals : (listof guess?) all-words : (listof guess?) history-hash : hash? = (make-hash)
value
*auto?* : global? *silent?* : global? *squares?* : global? *hard-mode?* : global? *consistent-only?* : global? *share-social?* : global?
racket -l- wordle-solver --help |
usage: <prog> [ <option> ... ] |
|
<option> is one of |
|
--silent |
Hide most output? |
--no-auto |
In auto mode, the word is guessed automatically; otherwise the user is queried. |
--no-squares |
Print squares instead of letters for clues? |
--share-social |
Display summary to share on social media? |
--first-word <#f> |
First word to play, to speed up computation. |
--target <#f> |
The word to guess. If not provided, clues are asked. |
If 'all', then all words are tried in order, and some statistics are printed. |
If 'random', a word is chosen at random |
--goals-file <goals.txt>, --goals <goals.txt>, -g <goals.txt> |
The file containing the list of valid goal words (one per line). |
--allowed-file <#f>, --allowed <#f>, -a <#f> |
The file containing the list of _additional_ valid guesses. Default: none. |
--cache-file <#f>, --cache <#f> |
File where to load (if exists) and save (at the end of the program) |
the optimal actions for faster decisions in similar circumstances. |
/ --consistent-only |
| Allow only guesses that are consistent with all seen clues? |
| --hard-mode |
\ Play in hard mode? |
--help, -h |
Show this help |
-- |
Do not treat any remaining argument as a switch (at this level) |
|
/|\ Brackets indicate mutually exclusive options. |
|
Multiple single-letter switches can be combined after |
one `-`. For example, `-h-` is the same as `-h --`. |
|