What is this?
Python program to play a word-guessing game like
Python 3.x, the
and a list of possible words (by default in
$ ./lexeme.py --help usage: lexeme.py [-h] [-d DICT] [-g GUESSES] [-l LENGTH] [-n] optional arguments: -h, --help show this help message and exit -d DICT, --dict DICT Wordlist to use, either an absolute path or a path relative to /usr/share/dict. Default /usr/share/dict/words. -g GUESSES, --guesses GUESSES Maximum number of guesses to allow -l LENGTH, --length LENGTH Length of word to guess -n, --nonsense Allow nonsense guesses. (Default is to only allow known words.) -a, --analyzer Analyze remaining possible words, and show their number after each guess. If repeated (cheater mode!), it will show you all the remaining possible words when there are fewer than 100
The Collins Scrabble Word Lists
seem to work pretty well! CSW2019 contains 12,972 five-letter words.
Example of gameplay:
Example of analyzer mode (
-a), showing you the number of possible remaining words
after each guess:
Example of cheater mode (
-aa), show you all of the possible remaining words
after each guess, as long as there are ≤100 of them: