Game Development Reference
In-Depth Information
Just like the Poker player, our agent is now making “a series of interesting
choices.� And as the player experiences and interacts with our agent, he will likewise
be able to make “a series of interesting choices.� According to Sid's premise, at that
point we have a game.
FSMs
FSMs have long been a staple of game AI. However, as behaviors grew more complex,
the numbers of states grew as well. Accordingly, the number of potential transitions
between the states grew at an exponential rate. The complexity of managing these
states and their transitions began to work against the simple efficiency that was orig-
inally the attraction of the FSM.
One of the criticisms of FSMs was that they were rigid and predictable. I don't
completely subscribe to that theory. FSMs still have their place in game AI. Dismissing
them outright is to say that the hammer is not a useful tool because it can't perform
all possible construction tasks. However, often they are matched with other, more
expressive structures where they can play a supporting role. In fact, by utilizing some
of the techniques in this topic, you can expand and extend FSMs to a great degree
while managing some of the increased complexity.
U SING N UMBERS TO D EFINE
For the numbers that we use to make decisions to be meaningful, they must repre-
sent something. If the transition percentages in Figure 3.3 were simply random,
they wouldn't represent anything more than their own randomness. They wouldn't
“stand for� anything. At that point, the effect of using them to guide the agent from
state A to states B, C, or D would be lost in a chaotic shuffle.
I NTHE G AME
Know When to Walk Away, Know When to Run
To make those transitions mean something in a behavioral context, the numbers
themselves need to be constructed so that they represent something meaningful in
that same context. For example, if states B, C, and D were replaced by the three
actions attack, hide, and flee, respectively (Figure 3.4), we would need to find a
meaningful parameter (or collection of parameters) that would be relevant to the
decision. Depending on the type of game and the data available, we may choose
something as simple as the agent's health.
 
 
Search WWH ::




Custom Search