A greedy solver for the now famous Wordle; it attempts to maximize the entropy of the set of the number of possible answers after each guess. This may not be globally optimal, but it's probably pretty close and at least shows that a solution does exist.
It does not find a solution for hard mode; my gut feel is that it's not
possible as there are too many sets like [bchlmpw]atch
which are real "traps"
if you run into them.
- Information theoretical points
- Is the natural logarithm the right base to use in entropy calculation, or is it something like the width of the tree?
- Is -1 the appropriate value for an exact match?
Get word lists from here; I have:
$ sha1sum wordle-answers-alphabetical.txt wordle-allowed-guesses.txt
c216eac05a4f78fa749965e9fc8bf2c66c704a8c wordle-answers-alphabetical.txt
ccf7adfd89f8177d1367224bdb73675f97e9d75b wordle-allowed-guesses.txt
- David MacKay