-
The latest version (1.0.3) is now available at the Maven Central Repository.
-
For details on how to download and install the
wordles
command line interface, see How do I get it?.
wordles
is a Java program to help you play the online game of Wordle.
You're given six chances to guess the five-letter word of the day, based on a few clues from your previous guesses. At each
step, your first task is to think of words that match all of the clues. Hard! Then your next task is to pick a word that gives you the
best chance to find the solution before you run out of tries. Easy, if you use wordles
!
Given a list of words, wordles
will analyze the possible results and rank these words in order of preference. Each word
is analyzed by comparing it to all of the other input words, assuming that the other word is the actual Wordle target. The resulting
matching clues are then used to organize all of the input words into groups. Printed results show all of the matching groups,
along with statistics used to determine the rank of this guess word: the number
of groups, the maximum group size, and the variance in group size.
wordles
has a simple command line interface that you can run from a Unix shell. For details on how to download and install the wordles
command,
see How do I get it?.
wordles
reads the word list from a file or from standard input. Here's a simple example.
echo "abuzz badly cocoa dogma gaudy laugh macho" | wordles
wordles
then prints the result for the best guess word to standard output:
BADLY [ 7 | 1 | 0.000 ]
--------------------------
.yy..
DOGMA
GGGGG
BADLY
yy...
ABUZZ
.y...
COCOA
.Gy.G
GAUDY
.G...
MACHO
.G.y.
LAUGH
This means that, assuming these are all of the possible matching words, the best choice for your next guess should be "BADLY". Why? Because even if you're wrong, you should be able to get the answer on your next guess. That's because Wordle will show you a different set of clues for each of these seven words. Even if your next guess is wrong, your chances of finding the solution are the same, no matter which clues you see. In other words, the variance in the size of all the possible matching groups is 0.000.
wordles
shows you a simple text representation of the green, yellow, and white squares that the Wordle game displays as
clues. For example, if you guess "BADLY" but the actual target word is "LAUGH", Wordle will display your guess like this:
⬜ 🟩 ⬜ 🟨 ⬜
With wordles
this result is shown as ".G.y.".
Let's suppose all of the words from the previous example are listed in a file named myWords
. Then you can print the results
for all of these words with the following command.
wordles -a myWords
wordles
then prints the results for all words in best-first order. As you can see below, the worst choice is "COCOA", which has a
high variance (1.688). For example, what if you guess "COCOA" and produce the result below?
⬜ ⬜ ⬜ ⬜ 🟨
Bummer. There are four different words that match these clues. Now it will take an average of 2.5 more guesses to find the answer.
BADLY [ 7 | 1 | 0.000 ]
--------------------------
.yy..
DOGMA
...
COCOA [ 4 | 4 | 1.688 ]
--------------------------
....y
ABUZZ
BADLY
GAUDY
LAUGH
.yG.y
MACHO
.G..G
DOGMA
GGGGG
COCOA
If you run wordles
in interactive mode, you can enter any five-letter word you like and see its results when compared with the
input word list. This can be helpful in a situation where the best guess to quickly narrow the possibilities might be a word
that you know can't possibly be a match.
To see the next best choice from the input word list, just enter an empty word. To exit interactive mode, enter "q". You can use interactive mode only if the words come from a file.
For example, try this command:
wordles -i myWords
Then you'll see something like this:
BADLY [ 7 | 1 | 0.000 ]
--------------------------
.yy..
DOGMA
...
Next guess? macho
MACHO [ 6 | 2 | 0.139 ]
--------------------------
.G...
BADLY
GAUDY
...
Next guess? elbow
ELBOW [ 6 | 2 | 0.139 ]
--------------------------
...y.
DOGMA
MACHO
...
Next guess?
DOGMA [ 7 | 1 | 0.000 ]
--------------------------
y.y.y
GAUDY
...
Next guess? q
To get the command line version of wordles
, download the wordles
shell distribution file from the Maven Central Repository, using the following procedure.
- Visit the Central Repository page for
wordles
. - Find the entry for the latest version and click on "Browse".
- To download the shell distribution ZIP file, click on "wordles-${version}.zip". If you prefer a compressed TAR file, click on "wordles-${version}.tar.gz".
Extract the contents of the distribution file to any directory you like -- this is now your "wordles home directory". Unpacking
the distribution file will create a "wordles release directory" -- a subdirectory of the form wordles-shell-
m.n.r -- that
contains all the files for this release of wordles
. The release directory contains the following subdirectories.
bin
: Executable shell scriptslib
: All JAR files needed to runwordles
One more step and you're ready to go: add the path to the bin
subdirectory to the PATH
environment variable for your system.