07 AI Techniques in Games


Brian Mac Namee
 Using Situational Intelligence to Create Support Characters in
Character-Centric Computer Games , University of Dublin, Trinity
College, 2004
Part III
Rule-Based Systems
ð The definition of a rule-based system states that
ð  ...[they are] comprised of a database of associated rules.
Rules are conditional program statements with
consequent actions that are performed if the specified
conditions are satisfied .
ð The behaviours of NPCs are scripted using a set of
rules which typically indicate how an NPC should
respond to particular events within a game world.
wg. Brian Mac Namee
 Using Situational Intelligence ..." 2
A sample script from the combat behaviour of a
warrior character in the RPG Baldur s Gate
wg. Brian Mac Namee
 Using Situational Intelligence ..." 3
Rule-Based Systems
ð Rule-based systems are favoured by game developers as
they are relatively simple to use and can be exhaustively
tested.
ð They also have the advantage that rule sets can be written
using simple proprietary scripting languages, rather
than full programming languages. This makes it easier for
game designers, rather than programmers, to author rule
sets.
ð Development companies have also gone so far as to make
these scripting languages available to the general
public, enabling them to author their own rule sets.
wg. Brian Mac Namee
 Using Situational Intelligence ..." 4
Rule-Based Systems
ð Rule-based systems, however, are not without their
drawbacks. Authoring extensive rule sets is a non-
trivial task, and so they are usually restricted to simple
situations.
ð Also, rule- based systems can be restrictive in that they
do not allow sophisticated interplay between NPCs
motivations, and require that authors foresee every
situation that an NPC might find itself in.
wg. Brian Mac Namee
 Using Situational Intelligence ..." 5
Learning Systems
ð It is anticipated that learning will be one of the major
advances in game-AI in the future.The expectation is,
that furnishing NPCs with the ability to genuinely
adapt to players behaviour will fundamentally change
the way that games are played.
ð However, even though there are a set of extremely
powerful learning techniques which have been used
widely in industry and academia, these have not
crossed over to any great extent to game-AI.
wg. Brian Mac Namee
 Using Situational Intelligence ..." 6
Learning Systems
ð The most pertinent reasons for this are firstly, that in
general game developers do not have a great
understanding of learning techniques, and
secondly that developers are wary of any techniques
which could lead to game characters exhibiting
unexpected behaviour, fearing that this could make a
game unplayable.
ð Also, it is difficult to frame a learning problem in the
dynamic worlds in which games are set. In spite of this
wariness, a smattering of games have put learning
techniques to use.
wg. Brian Mac Namee
Using Situational Intelligence ..." 7
The need for really intelligent
solutions
ð The current game-playing experience is mostly
frustration.
ð Too often, games which are set in beautifully rendered
3-d worlds are populated by a cast of characters that,
although they look fantastic and move wonderfully
realistically, behave in obviously non-intelligent
ways.
wg. Brian Mac Namee
Using Situational Intelligence ..." 8
The need for really intelligent
solutions
ð For example:
ð units in strategy games that cannot find their way safely
across a game environment (Age of Empires)
ð police cars that display no regard for the safety of civilian
drivers while chasing the player in a driving game
(Grand Theft Auto III)
ð partner characters that get in the way of the player
(Hidden & Dangerous)
ð squads of enemy soldiers that follow one another into
the line of fire (Medal of Honour)
wg. Brian Mac Namee
Using Situational Intelligence ..." 9
Cheating the Player
ð Cheating is most often used in action and strategy
games. As NPC opponents are part of the simulated
game world, they can be given access to the full
description of this world.
ð In practical terms, this means that NPCs can have the
ability to see through walls, always have perfect aim,
know exactly what their human opponent is doing
with his armies or what units he is developing, and so
on. On top of this NPCs can be given limitless
ammunition or, in strategy games, endless resources to
build new units.
wg. Brian Mac Namee
 Using Situational Intelligence ..." 10
Cheating the Player
ð This sounds like an appalling situation, yet it can in fact be
used to great effect. As long as the player does not know
that their opponent is cheating, it is perfectly acceptable, as
players tend to assume that their opponents are simply
better at the game than they are.
ð Anecdotal evidence shows that players attribute great
strategic capabilities to AI opponents that place units
wherever they are needed, simply by cheating.
ð However, a player s discovery that their opponent is
cheating is disastrous. Any illusion that the opponent is
playing an intelligent game is instantly shattered, and
players tend to switch off as soon as they discover that this
is the case.
wg. Brian Mac Namee
Using Situational Intelligence ..." 11
Intelligent agents
ð One can describe an agent as a hardware or (more usually)
software-based computer system that enjoys the following
properties:
ð autonomy: agents operate without the direct intervention of
humans or others, and have some kind of control over their
actions and internal state
ð social ability: agents interact with other agents (and possibly
humans) via some kind of agent-communication language
ð reactivity: agents perceive their environment, (which may be
the physical world, a user via a graphical user interface, a
collection of other agents, the INTERNET, or perhaps all of
these combined), and respond in a timely fashion to changes
that occur in it
ð pro-activeness: agents do not simply act in response to their
environment, they are able to exhibit goal-directed behaviour
by taking the initiative
wg. Brian Mac Namee
Using Situational Intelligence ..." 12
Reactive Agents
ð Reactive, or behaviour based, agents are the simplest form of
intelligent agent architecture. Reactive agents operate in a hard-
wired, stimulous-response driven manner. Certain sensor
information always results in a specific action being taken. This
can be most simply implemented as a rule-based system, or
using finite state machines, and can be summarised as follows:
Current World State ®ð Action
ð The use of reactive agents has a number of compelling
advantages. These include:
ð the fact that they can be implemented extremely efficiently both in
terms of memory usage and processing power requirements, and
that
ð they require very little support infrastructure, such as the
maintenance of a knowledge base, Finally,
ð reactive architectures are completely deterministic, making
comprehensive testing straightforward.
wg. Brian Mac Namee
 Using Situational Intelligence ..." 13
Reactive Agents
ð Unfortunately, reactive architectures also have a number of
severe drawbacks.
ð Firstly, every possible situation an agent might find itself in
must be encoded within a system s rules. This allows for no
learning or adaptability, and places a huge burden of
responsibility on agent designers, as they must allow for every
eventuality.
ð For complex environments the range of possible situations
can be vast, making the design of a reactive system
extremely difficult, if not impossible.
ð Finally, reactive systems are not capable of any kind of long
term planning. Reactive agents have no internal model of
their world and so are incapable of reasoning about it in any
abstract way. This greatly limits reactive agents ability to
pursue goals that stretch for any length of time.
wg. Brian Mac Namee
Using Situational Intelligence ..." 14
Deliberative Agents
ð Built upon symbolic AI techniques, deliberative agents
build internal models of their world, which they
then use to formulate plans to achieve goal states.
This can be summarised as:
Current World State + Goal State ®ð Plan
ð The Belief, Desire, Intention (BDI) architecture is
considered the definitive deliberative agent
implementation. The ability to form long term
plans is the main advantage of deliberative systems.
They do, however suffer from the complexity involved.
wg. Brian Mac Namee
Using Situational Intelligence ..." 15
Deliberative Agents
ð As plans are typically formed using computationally
expensive logic based inference, a deliberative system
cannot make the real-time guarantees required by
many application areas.
ð Another serious drawback to the use of deliberative
agents, is that they require constant maintenance
of a knowledge base. In fast moving, dynamic
environments, this can be a major issue as the
consistency of the system must be maintained, often
involving updating existing inferences based on newly
acquired knowledge.
wg. Brian Mac Namee
Using Situational Intelligence ..." 16
Hybrid-Agents
ð Hybrid-agents combine aspects of both the reactive
and deliberative approaches, in an effort to benefit
from the best features of both.
ð For example, a reactive system can be used to deal with
time critical behaviours such as collision avoidance,
while long term planning can be achieved using a
deliberative system.
ð The synergy of two sub-systems, however, leads to the
introduction of another problem, that of mediating
between them.
wg. Brian Mac Namee
Using Situational Intelligence ..." 17
What is Required by Intelligent Agents
as Virtual Humans?
ð When creating virtual humans, designers are
concerned with maintaining the illusion of
believability. This refers to the fact that the user of a
system must be able to believe that virtual humans are
living characters with goals, beliefs, desires and,
essentially, lives of their own.
ð Thus, it is not so important for a virtual human to
always choose the most efficient or cost effective
option available to it, but rather to always choose
reasonable actions and respond realistically to the
success or failure of these actions.
wg. Brian Mac Namee
Using Situational Intelligence ..." 18
Some statements
ð  Believable agents are personality-rich autonomous agents
with the powerful properties of characters from the arts. 
ð Agents should have strong personality and be capable of
showing emotion and engaging in meaningful social
relationships.
ð  ...an autonomous animated creature is an animated object
capable of goal-directed and time-varying behavior. 
ð Creatures must appear to make choices which improve their
situation and display sophisticated, and individualistic
movements.
wg. Brian Mac Namee
Using Situational Intelligence ..." 19
Some statements
ð Differences between  animate characters and traditional
agents - agents behaviours must be variable rather than
reliable, idiosyncratic instead of predictable, appropriate
rather than correct, effective instead of complete,
interesting rather than efficient, and distinctively individual
as opposed to optimal.
ð Believable characters are those  that respond to users and
to each other in real-time, with consistent personalities,
properly changing moods and without mechanical
repetition, while always maintaining an author s goals and
intentions. 
ð From believable agents we require  only that they not be
clearly stupid or unreal.  Such broad, shallow agents must
 exhibit some signs of internal goals, reactivity, emotion,
natural language ability, and knowledge of agents... as well
as of the... micro-world. 
wg. Brian Mac Namee Using Situational
Intelligence ..." 20
Relationships
ð Virtual humans must be able to engage users in
interesting and entertaining interactions, and to give
the appearance of engaging in such interactions with
each other, Also, virtual humans must be capable of
maintaining relationships with both the user and
other agents, for example is the user a close friend or
stranger?
ð "Say you  re in a bar and you throw your beer at the
bartender one day. The next day you go back, and he s
just as happy to see you. That shouldn t happen."
wg. Brian Mac Namee
 Using Situational Intelligence ..." 21
Virtual Fidelity and proactivity
ð Virtual fidelity refers to the fact that virtual reality systems
need only remain true to actual reality in so much as this is
required by, and improves, their application area.
wg. Brian Mac Namee
Using Situational Intelligence ..." 22
Proactivity
wg. Brian Mac Namee
Using Situational Intelligence ..." 23
Proactivity
ð Theatre and film script-writers consider the moments
before and after a character appears in a scene as
crucial, as they establish the motivations behind the
character s appearance, and give them a reason for
leaving.
ð Traditional game agent techniques ignore these two
notions completely.
ð Using characters that are proactive and persistent, on
the other hand, will allow for continuous modelling of
NPCs and so address this problem.
wg. Brian Mac Namee
Using Situational Intelligence ..." 24
Proactive Persistent Agent
Architecture (PPA)
wg. Brian Mac Namee
Using Situational Intelligence ..." 25


Wyszukiwarka

Podobne podstrony:
06 AI roles in games
07 Rysunek techniczny elektryczny
GameDev net Motivations in Games
Techniques In Biochemistry Lab
The Battle For Your Mind Mass Mind Control Techniques In
technik architektury krajobrazu21[07] z2 01 u
J D Robb In Death 07 Holiday in Death
technik architektury krajobrazu21[07] z2 03 n
2012 vol 07 Geopolitics and energy security in the Caspian region
technik architektury krajobrazu21[07] z4 01 n
technik architektury krajobrazu21[07] z1 03 n
technik elektryk11[08] z1 07 u
technik farmaceutyczny22[10] z3 07 u
technik architektury krajobrazu21[07] o1 03 u

więcej podobnych podstron