Game Development Reference
over and play dead. Thankfully, the programmer does have the option to turn
moves on and off to tune the difficulty.
A book of opening moves and endgames provides a tremendous speed increase
to the AI. It also can embody brilliant play and effectively leverage the play of
experts. It can recognize situations that more general methods improperly
evaluate. The topic of moves can provide expected moves that the regular AI
might miss, such as flanking or ambushing. Moves in the topic can be selectively
engaged to adjust the difficulty level of play. And finally, a book of moves can
guide the search of look-ahead.
A book of moves is often an aid to another AI, but less often the complete AI.
This can mean having two different AIs to write and maintain. The topic of
moves makes sense only when it is appreciably better than the regular AI it
advises in some way, such as quality of play or speed. A really good regular AI
might not need the topic. Even an AI that needs help from the topic will suffer if
the expertise level of the moves in the topic is not up to the task. Finding that
expertise can be harder than programming it into the AI. Finally, killer moves are
of no use if they are improperly employed; great plays need great coaches
Having two AI systems means more than the effort of writing both; it means that
the integration needs to be tuned as well. A ''flashes of brilliance'' AI can be as
frustrating to the player as it is entertaining.
There are two projects for this chapter. For our first project, we will add an
opening book for the fox in Fox and Hounds . Our topic will have only one move,
so we can hard-code the AI for it instead of using a rule-based system. Our
second project is more extensive; adding a book of opening moves to Mine-
sweeper . The Minesweeper book is nearly as easy, requiring only a modest amount