Game Development Reference
In-Depth Information
This Seems Familiar
You may be asking, ''Aren't the moves the same thing as heuristics?'' You might
also be wondering, ''Isn't this the same thing as a rule-based AI?'' Before we dive
into the details, we should shed some light on how to tell a book of moves from
other AI concepts. We will compare them to heuristics first.
For our purposes, a book of moves strongly emphasizes what the AI should do .
Most of the heuristics we have seen so far have been about how the AI should
think . If we think back to the Fox and Hounds AI from Chapter 6, ''Look-Ahead:
The First Step of Planning,'' we recall that the heuristics focused on the eva-
luation function. The way the AI distinguished between possible moves was
through the evaluation function and not by anything particular to one move
compared to another. If a person walked into a restaurant and told the waiter,
''Bring me a taste of everything, and after I taste everything, I will let you know
what I like best,'' they would be using an evaluation function to decide the best
move. The evaluation might be guided by heuristics such as, ''Most red sauces do
not agree with me.'' This time-consuming and costly method of dining would be
avoided if the person exploited the menu. The menu in this case is a book of
moves.
The AI in Fox and Hounds would benefit from a book of moves. The first entry
would be the opening sequence. Rather than looking ahead for its initial moves,
the fox could simply head to square number 8, the left-most square of the third
row from the top. That is the square that can force the earliest possible break in
the line of hounds, and the hounds cannot do anything fatal to the fox if the fox
blindly heads there. Similarly, it is difficult, if not impossible, for the fox to find
itself unable to exploit any fatal mistakes that the hounds might make if the fox
heads blindly for square number 8.
The distinction we are making here is not absolute. One heuristic used by the fox
is close to a gray area between how the AI should think and what the AI should
do. When there is an opening, the heuristic for the fox is to take the square with
the lowest number. It could be argued that this is still about how the AI should
think, as in, ''Find the lowest number,'' which is different from how it should act,
which might be ''Go up and to the left,'' but the distinction hardly matters.
Moves have an emphasis on what the AI should do, and heuristics can pertain to
just about anything.
The difference between a book of moves and a rule-based system is also
straightforward, although at first glance it may be difficult to distinguish between
 
Search Nedrilad ::




Custom Search