Game Development Reference
In-Depth Information
the little vagaries of humanness that we don't care to model. Perhaps when our
agent asked for his first rocket launcher at the age of eight, someone told him
“You'll put your eye out, kid,� and he's been a little wary of them ever since.
Perhaps he is particularly offended by the dark glasses and stupid hat that Baddie 3
has donned for this encounter. It doesn't really matter why they act differently; hu-
mans simply do . Therefore, we don't need to model the whys of the different deci-
sions. We simply provide a mechanism that simulates those different (but still
somewhat reasonable) decisions.
Think back to Chapter 1 and the definition of a game provided by Sid Meier:
“A game is a series of interesting choices.� We examined that notion by using ex-
amples such as Rock-Paper-Scissors, Tic-Tac-Toe, Blackjack, and Poker. Rock-
Paper-Scissors is predominantly random. The choices in Tic-Tac-Toe are almost
entirely predictable. Blackjack has random components, but the dealer's choices are
entirely rule-bound; we don't know what either of us will get next, but we know
exactly what the dealer will do with it when he gets it. Only when we get to Poker
do we see a challenge provided by the other player (i.e., the agent). The reason this
is so compelling is that while we have an idea of what he might do, we can't predict
exactly what he will do. Responding to his interesting choices is what makes our
choices that much more interesting.
We will find that the result of changing our agent's model to include more
options is that he will display broader behavior than when he was restricted to only
the one choice. In fact, if the agent were to encounter the same circumstances again,
he may or may not select the same approach. If we are playing as one of the Dudes,
this is actually a boon. Just as with the Poker player, the agent's interesting (yet rea-
sonable) variation of choices makes our choices that much more interesting as well.
From a player's standpoint, it also helps avoid situations like that uncomfort-
able moment in the bank when everyone reacted in exactly the same way. In this
case, if we were a Dude facing multiple AI agents, they would look just as peculiar
all doing exactly the same thing. It seems that not only is variety the spice of life, but
it keeps AI from looking like the Stepford Wives—completely identical in thought
and deed… and horribly boring .
W EIGHTED R ANDOM FROM T OP n C HOICES
We still have one problem with the approach we are using. We arbitrarily chose to
randomly select from the top 25% of options. In the case of our primary example,
that meant there were eight possibilities in play. Once we had split those eight
options off, for all intents and purposes, we treated them equally. We didn't bias the
random selection whatsoever. Because the top eight options were similar, there
was little difference between them anyway. We can see this in the black bars of
Figure 16.1.
Search WWH ::




Custom Search