This repo contains five Go programs which may be useful for players of Duotrigordle and similar word games.
maximise-solvable
suggests a first guess which maximises the expected number of solvable boards. A board is solvable if there is only one remaining possible solution. The first guess may or may not also be a valid solution.maximise-solvable-pair
is as above, but suggests a pair of starting guesses.report-solvable
reports solvable boards for a given sequence of one or more guesses.possible-words
reports the remaining possible solutions and guesses after a sequence of guesses and responses.guess
reports the game's response to a guess, given the solution.
Example usage (results based on 2024-01-14
word list):
./maximise-solvable
reportsPITON
is the guess which maximises solvable boards (43)../report-solvable PITON
prints the 43 solvable boards. For example, if the game responds toPITON
with Green Yellow Black Green Black, the solution must bePRIOR
../possible-words -w PITON BGBGB
reports that there are four possible solutions if the response toPITON
is Black Green Black Green Black. They areRIGOR
,VIGOR
,VISOR
, andWIDOW
../guess PITON PRIOR
reports Green Yellow Black Green Black../maximise-solvable-pair
reports the pairCANOE
SPRIT
maximises solvable boards (667, >25% of the total). The algorithm is not at all optimised. It took ~35 minutes on a Ryzen 3 laptop.
Important caveat: number of solvable boards is only one metric of guess quality. More sophisticated approaches are possible. See, for example, There's A New Best Starter For Perfect Duotrigordle (24 May 2022, uses old word lists).
Requires Go, and a terminal with ANSI colour support.
To build:
git clone https://github.com/mrankine/duotrigordle-tools.git
cd duotrigordle-tools
go build -o . ./...
To run:
./maximise-solvable
./maximise-solvable-pair
./report-solvable [-c|--show-codes] guess [guess...]
./possible-words [-w|--show-words] guess response [guess response ...]
./guess guess solution
Where:
guess
is a five-letter word. Must be present inguesses.txt
.solution
is a five-letter word. Must be present insolutions.txt
.response
is the game's response to a guess. Each position of the guess is either Green (correct), Yellow (present), or Black (not in this position). Examples of valid response formats:GYGBB
corresponds to Green, Yellow, Green, Black, Black21200
same as aboveY
all positions were Yellow
Word lists are located in wordlists/{identifier}/{guesses,solutions}.txt
. The wordlists
directory must be in the same directory as the executables.
The default word list is 2024-01-14
, which is consistent with Duotrigordle's 14 January 2024 update.
Specify an alternative word list using the environment variable WORDLIST
. Examples:
export WORDLIST=2022-03-03
./maximise-solvable
WORDLIST=my-custom-wordlist ./maximise-solvable