an introduction to knowledge representation damián isla, naimad games peter gorniak, rockstar

31
An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Upload: victoria-anderson

Post on 27-Mar-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

An Introduction to Knowledge Representation

Damián Isla, Naimad Games

Peter Gorniak, Rockstar

Page 2: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Knowledge Representation

We spend a lot of time on what our AIs dobut very little time on what they know

One of the great neglected problems of [game] AI

This talk: Introduce techniques Agitate

Page 3: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

“Behavioral” Knowledge?

Behavioral knowledge When to run away,

when to shoot, when to flank left, etc.

Does an ant “know” where the anthill is?

State Knowledge What is true about

the world

Page 4: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

The Point of KR

Perception of a thing != the

thing itself

Page 5: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

The Point of KR

Object 1

Object 2

Object 3

Behavior

Pathfinding

Animation

Agent

Page 6: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

The Point of KR

Object 1

Object 2

Object 3

Behavior

Pathfinding

Animation

KR

Decisions about Decisions about actionaction

Decisions about Decisions about perception and interpretationperception and interpretation

Agent

Page 7: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Why is KR Interesting?

Fun exploit mistakes / limited

perception new modes of interaction

Lifelike reason about AI as thinking

perceiving creatures emotional reactions

We’re doing it already anyway

Search for better representations == Search for more expressive power build behavior out of better

primitives

Page 8: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Timescales

∞ This instant

“dogs are animals”“birds have wings”“pushing the button calls the elevator”

“Guy X is behind the crate”

“I have three bullets left”

“That car is coming towards me”

“Bobby is 5 years old”

“Jane is spending the semester in

France.”

Page 9: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

3 Key Concepts

Confidence How sure am I in the knowledge I have?

Salience How important is the sensory data I’m

getting?

Prediction What do believe will happen given what I’ve

seen and what I know?

Page 10: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar
Page 11: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Behavior update

void s_agent::behavior_update()

{

if (!confused())

{

s_pos2d pos;

omap.get_target_position(&pos);

move_to(pos);

}

}

Page 12: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Behavior update

void s_agent::behavior_update()

{

if (!confused())

{

s_pos2d pos;

omap.get_target_position(&pos);

move_to(pos);

}

}

+

Page 13: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Expectation-related Emotions Confusion

Surprise

<Something I was confident in is confirmed FALSE>

<Something I thought unlikely is confirmed TRUE>

Page 14: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Expectation-related Emotions Confusion

Surprise

Page 15: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar
Page 16: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Target Lists

Object 1

Object 2

Object 3

Behavior

Pathfinding

Animation

KR

Agent

Page 17: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Target Lists

Object 1

Object 2

Object 3

Behavior

Pathfinding

Animation

Target 2

Target 1

Target 3

Agent

Page 18: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Target Lists

TargetPerceived datalocation (x,y,z)action shoothitpoints 44

Derived dataThreat 0.8Target weight 0.9“Intentions”hurt_me

Allows AI to make mistakes

Shared computation

+expressive

power

0.990.990.99

0.80.950.98

0.60.90.98

Page 19: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Example

search_for_target

switch_to_knife

shoot_at_targetshoot_at_target

switch_to_knife

search_for_target

!

Page 20: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Phil Carlisle Memorial

Memory Slide

Page 21: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

PCMMS

Working memory

Short-term

Episodic ???

Volatile behavior state

Target

Perceived datalocation (x,y,z)

Target

Perceived datalocation

Remember that

Page 22: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Challenge #1:Representational Versatility

Solution: Polymorphism

Page 23: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Polymorphism

Percept DAG (Synthetic Characters, MIT Media Lab, circa 2002)

Page 24: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Challenge #2: Performance

Page 25: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Challenge #2: Performance

Object 1

Object 2

Object 3

AgentKR

Agent

Agent

Shared KR

Page 26: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Challenge #2: Performance

Object 1

Object 2

Object 3

AgentKR

Agent

Agent

KR

KR

KR

Hybrid KR

X:weapon:

“pistol”

X:location:

<x,y,x>crates

enemies

Page 27: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Challenge #2: Performance

Enemy 1

Enemy 2

Grass Agent

Agent

Salience Threshold

O A

O x A

Page 28: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Benefits of Target Lists

Reasonable mistakes / limited perception

Shared computation

Expressive power

Page 29: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Limitations of Target Lists Relational information

Where does the notion of “behind” live?

Wholes and parts Does a car’s wheel

deserve it’s own representation?

A guy’s arm? What about a mob of

guys?

Page 30: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Hood

Wheel

behi

nd

Wheel

Wheel

Wheel

Car

has-

a

Head

Arm

Arm

next-to

has-a

next-to

Enemy

Gun

Enemy

hold

ing

Representational Wankery

Representational Wankery

Page 31: An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar

Wild Speculation

Lazy Representation???

1.Perception is active2.Behavioral / emotional / motivational state

changes the way you see the world3.And WHAT you see in the world.