Solve NY Times' Letter Boxed game.
python letter-boxed.py -l jhtawouinbge
Demo at alexperathoner.github.io/nyt-letter-boxed
-l
allowed letters. For example, if today's Letter Boxed looks like this:
You should input jhtawouinbge
. It's important that the four groups of letters are separated. The order inside the group is not important (e.g. thjowaniuebg
is also valid and will work).
-w
change the words file (default is 30k.txt
). Included files are from Josh Kaufman and arstgit (both originally from Peter Norvig's website)
-a
search for all possible solutions, not just the best one.
-d
print intermediate steps while solving.
-h
prints basically this help.
hello
in the screenshot above isn't allowed, as l
isn't in the given letters) and group letters (e.g. wow
isn't allowed, as letters on one side of the square can't be followed by letters on the same side).['banjo', 'outweigh']
.The input word file strongly changes the best solution. In the example above, with 30k
124 solutions are found, with the shortest being just two words; with 10k
there are only 6 solutions, all 4 words long. However, using dictionaries containing more words, might include words that are not recognised by NYT's game, thus returning non-valid outputs.
See the LICENSE.md file for details.
Donations are welcome!