07 AI Techniques in Games

background image

Brian Mac Namee

„Using Situational Intelligence to Create Support Characters in

Character-Centric Computer Games”, University of Dublin, Trinity

College, 2004

Part III

background image

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

background image

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

background image

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

background image

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

background image

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

background image

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

background image

The need for really intelligent

solutions

wg. Brian Mac Namee

Using Situational Intelligence ..."

8

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.

background image

The need for really intelligent

solutions

wg. Brian Mac Namee

Using Situational Intelligence ..."

9

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)

background image

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

background image

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

background image

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

background image

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

background image

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

background image

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

background image

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

background image

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

background image

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

background image

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

background image

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

background image

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

background image

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

background image

Proactivity

wg. Brian Mac Namee

Using Situational Intelligence ..."

23

background image

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

background image

Proactive Persistent Agent

Architecture (PPA)

wg. Brian Mac Namee

Using Situational Intelligence ..."

25

background image

Wyszukiwarka

Podobne podstrony:
5 Techniki in situ
Techniki in vitro
07 STATISTICAL TECHNIQUES answers
Dane Rudhyar THE PRACTICE OF ASTROLOGY AS A TECHNIQUE IN HUMAN UNDERSTANDING
07 Rysunek techniczny elektryczny
Tra le forme di aiuto ai coniugi in
o1 07 u metrologia techniczna 311[32]
FIDE Trainers Surveys 2011 12 Alexander Beliavsky Winning and Defending Technique in the Queen Endin
executor Query Execution Techniques in PostgreSQL, Neil Conway
Lesson Plan Creating 1v1 Opportunities in Games
Jünger, Ernst Technik In Der Zukunftsschlacht (Militaer Wochenblatt, 1921)
SzczygielskiStopa Usage of new soil improvement techniques in road embankment constructions
Advanced Metamorphic Techniques in Computer Viruses
Key Concepts & Techniques in GIS
07 Bass Clarinet in Bb
07.10.12r. - Wykład -Taktyka i technika interwencji policyjnych i samoobrona, Sudia - Bezpieczeństwo

więcej podobnych podstron