A FASTER SCRABBLE MOVE GENERATION ALGORITHM

被引:8
|
作者
GORDON, SA
机构
[1] Department of Mathematics, East Carolina University, Greenville, North Carolina
来源
SOFTWARE-PRACTICE & EXPERIENCE | 1994年 / 24卷 / 02期
关键词
FINITE AUTOMATA; LEXICONS; BACKTRACKING; GAMES; ARTIFICIAL INTELLIGENCE;
D O I
10.1002/spe.4380240205
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Appel and Jacobson1 presented a fast algorithm for generating every possible move in a given position in the game of Scrabble using a DAWG, a finite automaton derived from the trie of a large lexicon. This paper presents a faster algorithm that uses a GADDAG, a finite automaton that avoids the non-deterministic prefix generation of the DAWG algorithm by encoding a bidirectional path starting from each letter of each word in the lexicon. For a typical lexicon, the GADDAG is nearly five times larger than the DAWG, but generates moves more than twice as fast. This time/space trade-off is justified not only by the decreasing cost of computer memory, but also by the extensive use of move-generation in the analysis of board positions used by Cordon' in the probabilistic search for the most appropriate play in a given position within realistic time constraints.
引用
收藏
页码:219 / 232
页数:14
相关论文
共 50 条