CrispyConductor / wordle-solver

Solver for Wordle online game
MIT License
13 stars 2 forks source link

Where did you get your word lists? #2

Open NeilGirdhar opened 2 years ago

NeilGirdhar commented 2 years ago

Nice project. Where did you get your word lists? It seems like your solution list is quite small. Words like "peels", "feels", "leeks" aren't in it. Is this a problem with the official Wordle?

I tried a couple approaches myself: a slow, but optimal dynamic programming solution, and a fast maximum-solution-set-reduction solution: https://github.com/NeilGirdhar/wordle-solver

CrispyConductor commented 2 years ago

The word lists are extracted from the Wordle source code itself, so should match exactly. I know the solution list leaves out some common words; and if a goal for the algorithm is to approximate what is optimal based on a human's knowledge, it could be argued that a more expansive potential solution list should be used.

Neat approach. I just learned about @cache by looking at your work - very handy for memoization :D

I considered the tree-based "brute force" solution as well, but at a glance, I estimated it to be very computationally intensive, and didn't expect dynamic programming to help enough to make it feasible to run in a single-threaded python script - could be wrong though. Has your optimal solution been able to completely run through, and about how long did it take?

NeilGirdhar commented 2 years ago

The word lists are extracted from the Wordle source code itself, so should match exactly

Ah okay, I guess the Wordle clones use different lists. Makes sense.

Has your optimal solution been able to completely run through, and about how long did it take?

I only run it when the number of possible solutions is less than twenty. You're right, it's really slow. I could probably make it somewhat faster with some more clever memoization.

sdsykes commented 2 years ago

Just to add to the discussion, I created my own solver here: https://github.com/sdsykes/wordle-solver - I actually ended up with an approach very similar to the one here, and results are rather similar also. It was certainly fun to write.