AI Design Considerations
The design of the Raven bot AI is approached in the usual manner: We
consider what behavior is required of the bots to be successful within their
environment and decompose that behavior into a list of components we are
able to implement and coordinate.
I’m sure you have either played or watched someone play a Quake-like
deathmatch game, so let’s mull over that experience and see what observa
tions can be made about how a human player plays this sort of game. Two
obvious skills required are the ability to move around and the ability to aim
and shoot a weapon at other players. What isn’t so immediately obvious is
that if you watch experienced players you will notice that they are almost
always aiming and shooting at an enemy (provided one is in their vicinity)
whether they are attacking or defending, and regardless of the direction
they are moving. For instance, they might be strafing from side to side or
running away backward while laying down defensive fire. We’ll take a tip
from this observation and implement the weapon handling and movement
components of the AI so that they operate independently of each other.
What sort of movement related skills will the AI need? It’s clear a bot
should be able to move in any direction while avoiding walls and other
bots. We can also see it’s necessary to implement some type of search algo-
rithm to enable the AI to plan paths to specific locations or items.
What about weapon handling? What kind of weapon related decisions
does a player have to make? Well, first of all, a player has to decide which
weapon is best suited for the current situation. In Raven there are four
kinds of weapons: the blaster, the shotgun, the rocket launcher, and the
railgun. Each of these weapons has pros and cons. For example, a shotgun
is devastating when an enemy is close, but because of the way the shot
spreads outward as it travels away from the gun muzzle it becomes much
less effective with distance (see Figure 7.4). A rocket launcher is great at
medium distance but is dangerous to use up close because of the
splashback from the explosion. Any AI we implement must be able to
weigh the pros and cons of each weapon and select one accordingly.
A player also has to be able to aim his chosen weapon effectively. For
weapons that fire high-velocity projectiles, such as the railgun and shotgun,
a player must aim directly at an enemy’s position, but in the case of weap
ons that fire slower-moving projectiles, such as the blaster or rocket
launcher, a player must be able to predict the enemy’s movement and aim
accordingly. The bot AI must be able to do the same.
Often in games of this sort a player will be pitted against multiple oppo
nents. If two or more enemies are visible, the player must decide which one
to target. As a result, any AI we design must also be able to select a single
target from a group. This brings us to another issue: that of perception.
Human players select targets from the opponents perceived by their senses.
Raven: An Overview | 313
AI Design Considerations