autonomous ai steve hookway 9/13/04. outline constraining autonomous behavior (3.1) simple...

61
Autonomous AI Steve Hookway 9/13/04

Upload: dana-atkins

Post on 05-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Autonomous AI

Steve Hookway9/13/04

Page 2: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Outline Constraining Autonomous Behavior

(3.1) Simple Techniques for Coordinated

Behavior (3.2) Synthetic Adversaries for Urban

Combat Training (Laird et al.)

Page 3: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

No One Lives Forever 2 UNITY agent Cate

Archer fights the H.A.R.M. Worldwide crime syndicate

Use a combination of stealth and brute force to work through each level

Page 4: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

No One Lives Forever 2 Excellent reviews for both game-play

and AIGames Domain (5/5) "NOLF 2 is extremely hard to fault. Its

presentation is top-notch, its levels are varied and interesting, its AI is convincing, and the whole game drips with love and attention to detail. In fact, it's hard to remember a single-player FPS we enjoyed this much since Deus Ex ... Any first-person shooter fan should consider this an essential purchase."

HomeLan Fed (94%) "one of the best single player first person shooter games ever made. With solid AI, great looking levels and graphics, fun weapons and gadgets, excellent voice acting, and a healthy dose of humor, A Spy In H.A.R.M’s way is much better than the original and that’s saying something"

Page 5: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Ideal vs Actual Behavior Ideally completely autonomous AI

Goal based system Tagged objects

Realistically human behaviors need to be added Total autonomy does not necessarily

lead to believable behavior

Page 6: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Human Characteristics Ownership Dependency Responsibility Relevance Priority State of

Consciousness Expected State Presence of Others

Page 7: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Ownership Without constraint all objects of

interest are up for grabs Implement ownership by grouping

objects into sets Each character has his own set of

objects “Is this Object mine to use?”

Page 8: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Dependency The use of one object depends on

the use of another object Washing hands after using bathroom

Can’t just make one inseparable behavior

Enable, disable objects for dependency

“Is there anything I need to do before using this object?”

Page 9: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Responsibility Responsibility as a function of location

Keeps player from being overwhelmed by enemies

Responsibility as a function of the class of character Set which objects are available to be

used by that class of character “What is my purpose in life?”

Page 10: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Relevance A minor character’s goals should

not have a major influence on the world!

Provide a ceiling to the amount of influence an AI character can have over their surroundings

“How will my actions affect the player’s experience?”

Page 11: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Priority Character presented with multiple

opportunities simultaneously 3 categories of behavior

Aggressive > investigative > relaxed Relative priorities within categories “What is most important right

now?”

Page 12: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

State of Consciousness Alive, Sleeping, Unconscious, Dead Players emit stimuli depending on

state Can act according to previous or

current state “Am I awake?”

Page 13: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Expected State Consciousness is an example of

general concept State Objects have associated state

Notice when an object is out of place Notice when a player or object’s state

has changed “Has anything changed?”

Page 14: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Presence of Others Behavior depends on who is

present Characters need to take each

other into account “How will this action affect other

characters?”

Page 15: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Outline Constraining Autonomous Behavior

(3.1) Simple Techniques for Coordinated

Behavior (3.2) Synthetic Adversaries for Urban

Combat Training (Laird et al.)

Page 16: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Coordinate Behavior Split Up Get out of my way Get down What’s going on

Page 17: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

“Split Up” Agents are driven by same

logic and therefore behave in the same way upon receiving a stimulus

Same shortest path algorithm Nearby agents follow same

path Crowding!

Page 18: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Split up cont. Path of waypoints to target Reservations

Shortest path as least costly path A node is not released until agent

completes path Reserve the node BEFORE the

destination Different paths give illusion of

coordination

Page 19: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Pathfinding

E

A B

1

1

1

1

1

E

A B

1

1

1

1

50

Reserved

Page 20: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Maximum Occupancy The pathfinding algorithm

works well in combat Firing range prevents crowding

When investigating, crowding becomes a problem First agent should reserve

object under investigation Other agents maintain distance

Page 21: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Blackboard Communication Post and query public information Avoids overhead in adding data to

actual pathfinding data structures themselves

Makes code more maintainable

Page 22: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

A Record on the Blackboard

Struct BlackboardRecord{

BBRecordType eType;ObjectID idPoster;ObjectID idTarget;Int nData;

};

Page 23: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

The Blackboard …Class Cblackboard{public:

void PostBBRecord(BBRecordType eType, ObjectID idPoster, ObjectID idTarget, int nData);void RemoveBBRecord(BBRecordType eType, ObjectID idPoster);void RemoveAllBBRecords(BBRecordType eType);int CountBBRecords(BBRecordType eType, ObjectID idTarget);BlackboardRecord* GetBBRecord(BBRecordType eType, ObjectID idTarget);

protected:BlackboardRecord* m_aBBRecords[MAX_BB];

};

Page 24: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Agent path planning Clear any previously reserved

volumes and reserve volume before destination:g_pBlackboard ->

RemoveBBRecord(kBB_ReservedVolume, myID);

g_pBlackboard -> PostBBRecord(kBB_ReservedVolume, myID, volumeID,NULL);

Page 25: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Agent path planning cont. Check if volume is reserved and

apply cost penalty if it is

float fCost = pVolume -> fCost;if(g_pBlackboard-

>GetBBRecord(kBB_ReservedVolume, volumeID)

{fCost *= 50.f;

}

Page 26: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

“Get Out of My Way” It is inevitable that agents will get

in each other’s way Too much overhead to recalculate

optimal position Better to deal gracefully with

obstruction

Page 27: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Get out of My Way cont. The obstructed agent can do

nothing The obstructed agent can fire

anyway, either killing or going through his ally

The obstructed agent can move The obstructed agent’s ally can

move

Page 28: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Implementation Obviously options 3 and 4 are the

way to go Requests ally moves If ally is busy (reloading) agent

moves Leads to a dynamic environment

with everyone in motion looking for a clear shot

Page 29: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Implementation cont. Previous method works well with

ranged weapons but not well with close-ranged melee weapons

Resort to KungFu style

Page 30: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

“Get Down!” Agents have a limited number of actions We don’t want all agents take same

action simultaneously Use blackboard to post actions

Agent posts action and time Before taking action agent checks to see if

ally has done same action within a threshold time

Page 31: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

“What’s Going On?” We don’t want agents to stand idol

while a nearby ally is taking damage

The same sensory system that detects enemies can be used to detect each other

When agent detects danger or takes damage, it emits a signal to any other agent in earshot

Page 32: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Coordination

We have achieved simple coordination without the addition of a group behavior layer!

Page 33: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Outline Constraining Autonomous Behavior

(3.1) Simple Techniques for Coordinated

Behavior (3.2) Synthetic Adversaries for Urban

Combat Training (Laird et al.)

Page 34: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Synthetic Adversaries Virtual training of soldiers for

Military Operations on Urbanized Terrain (MOUT)

System based on a bot developed to play Quake

Uses Infiltration’s (UT’s) environment

Page 35: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Requirements for Synthetic Adversaries

Competence Taskability Observational fidelity Behavior variability Transparency Minimal computational footprint

Page 36: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Competence Must perform the actions and

behaviors humans perform in this domain

Many different roles Defending a room Sentry Acting as a leader

Focus on a small team interacting

Page 37: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Competence Threat data structure

Used to maintain awareness about enemy

Building map data structure Mission object Operators are used to take action

in the world

Page 38: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Taskability Must be able to be assigned new

missions and change objectives during an exercise

All agent knowledge is independent of the specific mission

MOUTBots can issue a limited amount of commands to change the mission of other bots

Page 39: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Observational Fidelity Model human behavior only in

those aspects which can be observed

This is one place we can limit computational time

Subject to making the some “human errors”

Page 40: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Behavior Variability Must not be predictable Allows for soldiers to train in the

same situation but experience a new encounter

Limits the amount of surprises in real life combat

Assign probability to each potential action

Page 41: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Transparency Allow after action review by keeping

a record explaining actions Used an application specific

visualization tool to show what the agent believes the status of the map to be

Can look at an agent’s goal; “defend room” goal among agents active goals

Page 42: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Minimal Computational Footprint

Targeted for personal computers Majority of processing reserved for

graphics and physics modeling Have been able to run as many as

20 bots in UT while keeping the game’s frame rate

Page 43: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Conclusion Fully autonomous AI is a long way

off, but it is still possible to model human behavior

Page 44: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

BONUS MATERIAL

Page 45: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Creature Smarts

Is it possible to build an artificial intelligence that’s as clever, as adaptive and as captivating as the average dog?C4 and Sheep|DogDuncan the Terrier

Page 46: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Autonomous AI Build a creature that can interact

with each other and human participants

Self sufficient reasoning Learning Action Selection Goals

Page 47: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

System Architecture

World Model

Creature 1 Mental Rep

Creature 2 Mental Rep

Local Devices Networked Devices

Input Server

Renderers World State

Page 48: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Cognitive Architecture

Sensory System

Perception System

Attention Selection

Action Selection

Navigation System

Motor System

Proprioceptive System

Action System

Object of Attention

Motor Desired

Motor Actual

Internal Blackboard

Working Memory

The World

Page 49: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Sensory System Sensory honesty Input from world (creatures point

of view)

Page 50: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Perception System Percept-perceive stimulus Classification hierarchy

Everything

Head Location

SoundWorld Location

Shape

Humanoid SheepUtterance

Down Sit Away

Page 51: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Percept and Memory After classifying, hold onto

percepts and place like percepts together

Allows related events to be matched

Page 52: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Why bother with percepts? Causes honest mistakes

Believable behavior Learning generalizable concepts

Find rules that apply to many objects Subjective experience

How stimulus is perceived depends on creature

Page 53: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Action System Any representation of action

should answer the big 4 When to do it? What to do and how to do it? What to do it to? For how long?

Page 54: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Action Tuples Trigger Context Action Object Context Do Until Context

Trigger Context

Action Object Context

DoUntilContext“Away”

Sound Percept

Circle Counterclockwi

se

Sheep Shape Percept

~15s, or circled flock

Page 55: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Action Group Formed of similar action tuples Attention Group

Chooses creatures focus Primary Action Group

Determines large-scale body motion

Page 56: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Learning in c4’s Action System Events perceived to have intrinsic

values on a nominal scale Eating a cookie has a high positive value Meeting a lion a large negative number

The actions that lead to these events become weighted (credit assignment) Learning reliable action pairs

Learning cannot happen without variation of action and state

Page 57: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Navigation System Navigation overrides action system

Must move to achieve action Relieves action system from

handling movement Eat vs Approach and eat

Page 58: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Motor System No such thing as just a walk cycle

Happy walk Sad walk And so on…

Simple gestures Locomotion Eye/head/body orientation

Page 59: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Doing it in Style Parameterized motor actions

Different levels (heights of paw for shake)

Support new motor actions Characters increase in complexity

over time Create new animations “live”

Allow characters to learn new animations during their lives

Page 60: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Pose Graph Action between poses Movement between poses

Gallop Walk Stalk

Skid Stand Beg

Shake Sit Crouch

Down

Page 61: Autonomous AI Steve Hookway 9/13/04. Outline Constraining Autonomous Behavior (3.1) Simple Techniques for Coordinated Behavior (3.2) Synthetic Adversaries

Conclusions Strict enforcement of sensory honesty

Creature must make decisions based on percept of object, rather than knowledge of object state

Creatures must perceive each other and interact

Leads to a more realistic system of learning and honest mistakes