aydinschwa / Scrabble-Solver

Demo of "The World's Fastest Scrabble Solver" algorithm with a visualization in Pygame
14 stars 9 forks source link

Running the solver for existing game state #1

Open Macok opened 1 year ago

Macok commented 1 year ago

Do you have any tips for running this solver for a given board state, without knowing the moves that led to this state?

aydinschwa commented 1 year ago

Honestly its been a long time since I've worked on this code, but I think it'll be difficult to run the solver for any given board state since the cross-check sets are computed as each word is placed.

The paper I based this code on is pretty old and has a lot of optimizations that aren't really necessary anymore. I'm pretty sure that cross-checks don't need to be precomputed at all. You will need an alternate method of checking the validity of some of the words, though.

Also, I feel like this code is pretty hard to interpret without reading the associated Medium article, I'll leave it here in case you haven't seen it: https://medium.com/@aydinschwa/coding-the-worlds-fastest-scrabble-program-in-python-2aa09db670e3