What are the first steps for implementing a DAWG or GADDAG in browser in Javascript (without overloading memory)? Specifically, I want to port this data structure into an interactive Scrabble game in browser so that humans can play against a computer.
This computer implements the DAWG/GADDAG structure proposed by Eric Sink (http://ericsink.com/downloads/faster-scrabble-gordon.pdf).
I've already written code in Python that successfully calculates the optimal next move based on a GADDAG, but I'm now struggling to figure out how to port this into Javascript/HTML, given the memory constraints in browser. Currently in Python, this GADDAG structure consumes ~800 MB.
Do I have to construct the DAWG/GADDAG beforehand into a text file, then load the text file into browser? Or should I implement it client-side? I'm trying to figure out all the different ways for loading this data structure into an interactive browser game.