83 karma · joined February 19, 2021
If I may make two small suggestions as a user, I noticed you have a dictionary with nearly 13k words which often results in invalid suggestions like 'clery' and 'meryl'. In testing I found the Scrabble dictionary to be much more likely to yield valid Wordle words (found here: https://github.com/redbo/scrabble), though the official Wordle answers tend to be an even smaller set of ~2,500 common words.
Second, though the implementation is very clean in code (much more concise than mine!), I found the use of the green/gray/yellow methods to be a bit cumbersome when adding constraints. You could wrap these three in a method like guess(word, reply) where your response encodes the feedback as something like [g]=green, [b]=black, [y]=yellow:
Given: [('arose', 27122), ('aeros', 27122), ('seria', 27095), ('riesa', 27095)]
>>> w.guess('arose', 'bybby')
vs.
>>> w.gray('aos') >>> w.yellow('r', 2) >>> w.yellow('e', 5)
You could even have the guess method trigger a new round of suggestions since the response implies that we've advanced a turn.
Though not enforced by the Hyperwordle clone, the script plays the game on "hard" mode by default where all letter hints must be included in subsequent guesses. Ironically, this constraint made the algorithm more efficient, easy mode tends to take longer and fail more frequently!
Anyone have a better algo yet? https://github.com/rgkimball/wordlebot
Big shout out to any of the current or past contributors reading this post - you all deserve immense credit for your work over the decades: https://trac.wildfiregames.com/browser/ps/trunk/binaries/dat...