Re:Show HN: Simple Wordle solver in command line in Python
by oneoff786 on Saturday January 22, 2022 @10:59PM
(#30043507)
I think you’re missing what I’m saying. I’m not talking about ML. I’m taking about mixed integer programming. Minimizing the depth of the trees is the goal, not a method of getting there. Most discussion I see on this is on greedy methods that choose the first step that will maximize information gain and then the next best and so forth. But it’s possible there exists a first step that is less optimal up front but allows for more entropy on the second steps. I’m not sure if the greedy solutions are able to guarantee a three step solution for all possible words. Even if they are, it’s probable that they’re still inferior to the globally optimized answer.
> minimize average number of guesses
Yes, and it’s def much better than binary search, but the algorithm to arrive at the solution is optimal in that way — minimize the depth of the tree given a set of words/letters, with each branch being “correct letter position”, “correct letter”, or eliminate letter. No need to use abstract coloring concepts either.
No real need for “ML” or anything.
If someone had the time, they can prebuilt all the decision trees and pick the optimal words to as the starting word.
Make a hangman solver was actually a take home interview question I had back in like 2009. Code it up, it’s a lot easier than it sounds.