What is AI (Artificial
Intelligence)
The question "what
is artificial intelligence?" is not easy to answer. If you look up
artificial intelligence in a dictionary, you'll probably find a definition that
reads something like this:
"The ability of a
computer or other machine to perform those activities that are normally thought
to require intelligence."
Still other sources
define artificial intelligence as the process or science of creating
intelligent machines.
The study of AI is not
necessarily for the purpose of creating intelligent machines, but for the
purpose of gaining better insight into the nature of human intelligence. Still
others study AI methods to create machines that exhibit some limited form of
intelligence.
|
|
Anything that gives the
illusion of intelligence to an appropriate level, thus making the game more
immersive, challenging, and, most importantly, fun, can be considered game AI.
Just like the use of real physics in games, good AI adds to the
immersiveness of the game, drawing players in and suspending their reality for
a time.
Introduction to Game AI
In the broadest sense,
most games incorporate some form of artificial intelligence (AI). For
instance, developers have used AI for years to give seemingly intelligent life
to countless game characters, from the ghosts in the classic arcade game Pac
Man to the bots in the first-person shooter Unreal, and many others in between.
Anything that gives the
illusion of intelligence to an appropriate level, thus making the game more
immersive, challenging, and, most importantly, fun, can be considered game AI.
Just like the use of real physics in games, good AI adds to the immersiveness
of the game, drawing players in and suspending their reality for a time.
The huge variety of game
genres and game characters necessitates a rather broad interpretation as to
what is considered game AI. Indeed, this is true of AI in more traditional
scientific applications as well.
Some developers consider
tasks such as path finding as part of game AI. Steven Woodcock reported in his
"2003 Game Developer's Conference AI Roundtable Moderator's Report' that
some developers even consider collision detection to be part of game AI.
Deterministic Versus Non
deterministic AI
Game AI techniques
generally come in two flavors:
deterministic and nondeterministic.
Deterministic
Deterministic behavior
or performance is specified and predictable. There's no uncertainty. An example
of deterministic behavior is a simple chasing algorithm. You can explicitly
code a non player character to move toward some target point by advancing along
the x and y coordinate axes until the character's x and y coordinates coincide
with the target location.
Nondeterministic
Nondeterministic
behavior is the opposite of deterministic behavior. Behavior has a degree of
uncertainty and is somewhat unpredictable (the degree of uncertainty depends on
the AI method employed and how well that method is understood). An example of
nondeterministic behavior is a nonplayer character learning to adapt to the
fighting tactics of a player. Such learning could use a neural network, a
Bayesian technique, or a genetic algorithm.
Deterministic AI techniques are the
bread and butter of game AI. These techniques are predictable, fast, and easy
to implement, understand, test, and debug. Although they have a lot going for
them, deterministic methods place the burden of anticipating all scenarios and
coding all behavior explicitly on the developers' shoulders. Further,
deterministic methods do not facilitate learning or evolving. And after a
little gameplay, deterministic behaviors tend to become predictable. This
limits a game's play-life, so to speak.
Nondeterministic methods facilitate
learning and unpredictable gameplay. Further, developers don't have to
explicitly code all behaviors in anticipation of all possible scenarios. Nondeterministic
methods also can learn and extrapolate on their own, and they can promote
so-called emergent behavior, or behavior that emerges without explicit
instructions. The flocking and neural network algorithms we'll consider in this
book are good examples of emergent behavior.
Established Game AI
Perhaps the most widely
used AI technique in games is cheating. For example, in a war simulation game
the computer team can have access to all information on its human opponents
location of their base; the types, number, and location of units, etc.without having
to send out scouts to gather such intelligence the way a human player must.
Cheating in this manner
is common and helps give the computer an edge against intelligent human
players. However, cheating can be bad. If it is obvious to the player that the
computer is cheating, the player likely will assume his efforts are futile and
lose interest in the game.
Also, unbalanced
cheating can give computer opponents too much power, making it impossible for
the player to beat the computer. Here again, the player is likely to lose
interest if he sees his efforts are futile. Cheating must be balanced to create
just enough of a challenge for the player to keep the game interesting and fun.
Developers commonly use
fuzzy logic in fuzzy state machines to make the resulting actions somewhat less
predictable and to reduce the burden of having to enumerate huge numbers of
if-then rules.
Rather than have a rule
that states if distance = 10 and health = 100 then attack, as you might in a
finite state machine, fuzzy logic enables you to craft rules using less precise
conditions, such as if close and healthy then attack aggressively.
These are only a few of
the established game AI techniques; others include scripting, rules-based
systems, and some artificial life (A-life) techniques, to name a few. A-life
techniques are common in robotic applications, and developers have adapted and
used them with great success in video games. Basically, an A-life system is a
synthetic system that exhibits natural behaviors. These behaviors are emergent
and develop as a result of the combined effect of lower-level algorithms.
The Future of Game AI
The next big thing in
game AI is learning. Rather than have all non player character behavior be
predestined by the time a game ships, the game should evolve, learn, and adapt
the more it's played. This results in a game that grows with the player and is
harder for the player to predict, thus extending the play-life of the game.

It is precisely this
unpredictable nature of learning and evolving games that has traditionally made
AI developers approach learning techniques with a healthy dose of
trepidation.
The techniques for
learning and reacting to character behavior fall under the nondeterministic AI
we talked about earlier, and its difficulties apply here too. Specifically,
such nondeterministic, learning AI techniques take longer to develop and
test. Further, it's more difficult to really understand what the AI is doing,
which makes debugging more difficult. These factors have proven to be serious
barriers for widespread use of learning AI techniques.





0 Comments