3 ms·
DAWGs are really cool. GADDAGs are faster than DAWGs only for the special purpose of finding a word given a prefix (applicable to Scrabble move-finding). Otherw
by cdelsolar 11y ago
DAWGs are really cool. GADDAGs are faster than DAWGs only for the special purpose of finding a word given a prefix (applicable to Scrabble move-finding). Otherwise they are the same speed if you're just anagramming; since a GADDAG is at least 5 times bigger than a DAWG on average (given an English dictionary corpus), the GADDAG may even be slower because it wouldn't fit in cache memory.
The best known Scrabble AI (Quackle) uses both data structures, although only the DAWG is strictly necessary.
I wrote a GADDAG maker in Go a while ago with the intent of turning it into a Scrabble move finder, but haven't found the time to work on it in a while. I would like to optimize it further too...
https://github.com/domino14/macondo/tree/master/gaddag https://github.com/domino14/macondo/tree/master/gaddag