An Introduction to Knowledge Representation
BEYOND BEHAVIOR
Damián Isla, Naimad Games
Peter Gorniak, Rockstar
Knowledge Representation
We spend a lot of time on what our AIs do
but very little time on what they know
One of the great neglected problems of [game] AI
This talk:
Introduce techniques
Agitate
“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
The Point of KR
Perception of a thing
!= the thing itself
The Point of KR
Agent
Object 1
Pathfinding
Object 2
Behavior
Animation
Object 3
The Point of KR
Agent
Object 1
Pathfinding
Object 2
KR
Behavior
Animation
Object 3
Decisions about
perception and interpretation
Decisions about
action
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
Timescales
“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.”
This
instant
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?
DEMO
Behavior update
void s_agent::behavior_update()
{
if (!confused())
{
s_pos2d pos;
omap.get_target_position(&pos);
move_to(pos);
}
}
Behavior update
void s_agent::behavior_update()
{
if (!confused())
{
s_pos2d pos;
omap.get_target_position(&pos);
move_to(pos);
}
}
+
Expectation-related Emotions
Confusion
<Something I was confident in is confirmed FALSE>
Surprise
<Something I thought unlikely is confirmed TRUE>
Expectation-related Emotions
Confusion
Surprise
TARGET LISTS
Target Lists
Agent
Object 1
Pathfinding
Object 2
KR
Behavior
Animation
Object 3
Target Lists
Object 1
Agent
Target 1
Pathfinding
Object 2
Target 2
Behavior
Animation
Object 3
Target 3
Target Lists
Target
Perceived data
location
action
hitpoints
Shared
computation
+
expressive
power
(x,y,z)
shoot
44
Derived data
Threat
0.8
Target weight 0.9
“Intentions” hurt_me
0.6
0.99
0.8
0.99
0.95
0.9
0.99
0.98
Allows AI
to make
mistakes
Example
shoot_at_target
switch_to_knife
search_for_target
Phil Carlisle Memorial
Memory Slide
PCMMS
Volatile
behavior
state
Working memory
Remember that
Target
Short-term
Episodic
???
Perceived data
location
(x,y,z)
Challenge #1:
Representational Versatility
Truck
Wheel
Nazi Fence
Grass
My hand
Solution: Polymorphism
Polymorphism
Percept DAG
(Synthetic Characters, MIT Media Lab, circa 2002)
Challenge #2: Performance
Challenge #2: Performance
Object 1
Object 2
Object 3
Shared KR
Agent
KR
Agent
Agent
Challenge #2: Performance
Object 1
crates
X:location:
<x,y,x>
Agent
KR
Object 2
KR
Agent
KR
Object 3
Agent
X:weapon:
“pistol”
KR
enemies
Hybrid KR
Challenge #2: Performance
Enemy 1
Agent
Enemy 2
O
A
Agent
Grass
Salience Threshold
OxA
Benefits of Target Lists
Reasonable mistakes / limited perception
Shared computation
Expressive power
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?
Head
Enemy
Arm
Enemy
Arm
Car
Hood
Gun
Wheel
Wheel
Wheel
Wheel
Wild Speculation
Lazy Representation???
1. Perception is active
2. Behavioral / emotional / motivational state
changes the way you see the world
3. And WHAT you see in the world.
© Copyright 2026 Paperzz