Download - 3 States and a Plan: The AI of F.E.A.R
![Page 1: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/1.jpg)
3 States and a Plan:The AI of F.E.A.R.
Jeff Orkin
Monolith Productions/
MIT Media Lab
![Page 2: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/2.jpg)
![Page 3: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/3.jpg)
![Page 4: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/4.jpg)
Survey Says!
![Page 5: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/5.jpg)
Survey Says!
![Page 6: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/6.jpg)
![Page 7: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/7.jpg)
FSM: 3 States
![Page 8: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/8.jpg)
FSM: 3 States
Goto Animate
UseSmartObject
![Page 9: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/9.jpg)
FSM: 3 States
Goto Animate
Animate
![Page 10: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/10.jpg)
FSM: 2 States!
Goto Animate
![Page 11: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/11.jpg)
FSM: Transition Logic
void StateAttack::Update(){
//...
if( Ammo == 0 ){
pState = Reload(bCrouch);return;
}
//...}
![Page 12: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/12.jpg)
Shogo, 1998
![Page 13: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/13.jpg)
No One Lives Forever, 2000
![Page 14: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/14.jpg)
F.E.A.R., 2005
![Page 15: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/15.jpg)
Halo 2, 2004Allowable behaviors for infantry, drivers, and passengers
![Page 16: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/16.jpg)
FSM vs Planning
FSM Planning
- How - What
![Page 17: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/17.jpg)
FSM vs Planning
FSM Planning
- How - What
- Procedural - Declarative
![Page 18: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/18.jpg)
Motivation
![Page 19: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/19.jpg)
Here’s the Plan:
• STRIPS Planning Overview
• Planning in F.E.A.R.
• Differences from STRIPS
• Squad Behaviors & Communication
• Beyond F.E.A.R.
![Page 20: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/20.jpg)
What is Planning?
• Planning is a formalized process of searching for sequence of actions to satisfy a goal.
• Process is called “Plan Formulation.”
![Page 21: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/21.jpg)
STRIPS Planning
…in a nutshell
![Page 22: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/22.jpg)
STRIPS Planning
STRIPS =
STanford Research Institute
Problem Solver
![Page 23: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/23.jpg)
STRIPS Planning
• STRIPS Goal: Desired state of the world to reach.
• STRIPS Actions:– Preconditions– Effects
![Page 24: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/24.jpg)
States
![Page 25: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/25.jpg)
States: FSM
Attack Search
![Page 26: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/26.jpg)
States: PlanningRepresented as a logical sentence:
AtLocation(Home) ^ Wearing(Tie)
Represented as a vector:
(AtLocation, Wearing) = (Home, Tie)
![Page 27: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/27.jpg)
States: PlanningExample: Lemonade Stand
( weather, #lemons, $$ )=
( , , ) or
( , , )
![Page 28: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/28.jpg)
STRIPS Planning Example
![Page 29: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/29.jpg)
STRIPS Planning Example
![Page 30: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/30.jpg)
STRIPS Planning Example
![Page 31: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/31.jpg)
STRIPS Planning Example
![Page 32: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/32.jpg)
STRIPS Planning Example
![Page 33: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/33.jpg)
STRIPS Planning Example
State: (phone#, recipe, hungry?)
Goal: ( -- , -- , NO )
( , -- ,YES) ( , -- ,NO )
( -- , ,YES) ( -- , ,NO )
![Page 34: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/34.jpg)
STRIPS Planning Example
State: (phone#, recipe, hungry?)Goal: ( -- , -- , NO )
( , ,NO )
( , ,YES) ( , ,NO )
![Page 35: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/35.jpg)
STRIPS Planning Example
![Page 36: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/36.jpg)
STRIPS Planning Example
State: (phone#, recipe, hungry?)
ActionPreconditions: ( , -- , -- )
Effects:
Delete List: Hungry( YES )
Add List: Hungry( NO )
![Page 37: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/37.jpg)
STRIPS Planning Example
State: (phone#, recipe, hungry?)
ActionPreconditions: ( , -- , -- )
Effects:
Hungry( NO )
Hungry( YES ) ^ Hungry( NO )
![Page 38: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/38.jpg)
STRIPS Planning Example
Action: Buy( object )Preconditions: ( -- )
Effects:
Delete List: --
Add List: Own( object )
Own( ) ^ Own( ) ^ Own( )
![Page 39: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/39.jpg)
STRIPS Planning Example
![Page 40: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/40.jpg)
STRIPS Planning Example
![Page 41: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/41.jpg)
STRIPS Planning Example
![Page 42: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/42.jpg)
STRIPS Planning Example
![Page 43: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/43.jpg)
STRIPS Planning Example
![Page 44: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/44.jpg)
FPS Statistics
Average lifespan of FPS enemy AI:
![Page 45: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/45.jpg)
FPS Statistics
Average lifespan of FPS enemy AI:
12.23 seconds
![Page 46: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/46.jpg)
FPS Statistics
Average lifespan of FPS enemy AI:
12.23 seconds
Number of enemy AI who die in
FPS’s per day:
![Page 47: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/47.jpg)
FPS Statistics
Average lifespan of FPS enemy AI:
12.23 seconds
Number of enemy AI who die in
FPS’s per day:
19,789,203
![Page 48: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/48.jpg)
FPS Statistics
Sally Struthers says “Save the AI!”
![Page 49: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/49.jpg)
Here’s the Plan:
• STRIPS Planning Overview
• Planning in F.E.A.R.
• Differences from STRIPS
• Squad Behaviors & Communication
• Beyond F.E.A.R.
![Page 50: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/50.jpg)
Design Philosophy
Designer’s job is:
Create environments that allow AI to showcase their behaviors.
Designer’s job is NOT:
Script behavior of individual AI.
![Page 51: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/51.jpg)
Planning Video #1
![Page 52: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/52.jpg)
Planning Video #1
![Page 53: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/53.jpg)
Planning Video #1
![Page 54: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/54.jpg)
Planning Video #1
![Page 55: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/55.jpg)
Planning Video #1
![Page 56: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/56.jpg)
Planning Video #1
![Page 57: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/57.jpg)
Planning Video #2
![Page 58: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/58.jpg)
Planning Video #3
![Page 59: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/59.jpg)
Planning Video #4
![Page 60: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/60.jpg)
Planning Video #4Soldier Assassin Rat
![Page 61: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/61.jpg)
Benefits of Planning
1. Decoupling Goals & Actions
2. Layering Behaviors
3. Dynamic Problem Solving
![Page 62: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/62.jpg)
Decoupling Goals & Actions
![Page 63: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/63.jpg)
Decoupling Goals & Actions
AttackFromCover
tt
t
t
t
Priority: 8 .0Sensors: V is ion, CoverNodes
Patrol
tt
t
t
t
Priority: 1 .0Sensors: PatrolNodes
Investigate
tt
t
t
t
Priority: 3 .0Sensors: HearDisturbance
Search
tt
t
t
t
Priority: 6 .0Sensors: V is ion, SearchNodes
![Page 64: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/64.jpg)
Decoupling Goals & Actions
![Page 65: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/65.jpg)
Decoupling Goals & Actions
+ =
![Page 66: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/66.jpg)
Decoupling Goals & Actions
AttackFromCover
tt
t
t
t
Priority: 8 .0Sensors: V is ion, CoverNodes
Patrol
tt
t
t
t
Priority: 1 .0Sensors: PatrolNodes
Investigate
tt
t
t
t
Priority: 3 .0Sensors: HearDisturbance
Search
tt
t
t
t
Priority: 6 .0Sensors: V is ion, SearchNodes
![Page 67: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/67.jpg)
Decoupling Goals & Actions
![Page 68: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/68.jpg)
Decoupling Goals & Actions
![Page 69: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/69.jpg)
Decoupling Goals & Actions
Work
tt
t
t
t
Priority: 8 .0
Death
tt
t
t
t
Priority: 100.0
Stunned
tt
t
t
t
Priority: 80.0
![Page 70: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/70.jpg)
Decoupling Goals & ActionsWork
RecoilStand
Up
SitDown
Anim ate
Goto
Priority: 8 .0
Death
Priority: 100.0
Stunned
Priority: 80.0
Working Memory
![Page 71: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/71.jpg)
Benefits of Planning
1. Decoupling Goals & Actions
2. Layering Behaviors
3. Dynamic Problem Solving
![Page 72: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/72.jpg)
Layering Behaviors
![Page 73: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/73.jpg)
Layering Behaviors
![Page 74: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/74.jpg)
Layering Behaviors
![Page 75: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/75.jpg)
Layering Behaviors
![Page 76: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/76.jpg)
Layering Behaviors
![Page 77: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/77.jpg)
Layering Behaviors
![Page 78: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/78.jpg)
Layering Behaviors
![Page 79: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/79.jpg)
Layering Behaviors
![Page 80: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/80.jpg)
Layering Behaviors
![Page 81: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/81.jpg)
Layering Behaviors
![Page 82: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/82.jpg)
Layering Behaviors
![Page 83: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/83.jpg)
Layering Behaviors
![Page 84: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/84.jpg)
Layering Behaviors
![Page 85: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/85.jpg)
Layering Behaviors
![Page 86: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/86.jpg)
Layering Behaviors
![Page 87: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/87.jpg)
Layering Behaviors
![Page 88: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/88.jpg)
Layering Behaviors
Kill Enemy
Attack Ranged
![Page 89: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/89.jpg)
Layering Behaviors
Kill Enemy
Attack Ranged
Attack Melee
![Page 90: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/90.jpg)
Layering Behaviors
Kill Enemy
Attack Ranged
Attack Melee
Dodge Shuffle
Dodge Roll
Dodge
![Page 91: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/91.jpg)
Layering Behaviors
Kill Enemy
Attack Ranged
Attack Melee
Dodge Shuffle
Dodge Roll
Dodge
Cover
Goto
Dodge Covered
![Page 92: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/92.jpg)
Layering Behaviors
Kill Enemy
Attack Ranged
Attack Melee
Dodge Shuffle
Dodge Roll
Dodge
Cover
Goto
Dodge Covered
Blind Fire
![Page 93: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/93.jpg)
Layering Behaviors
Kill Enemy
Attack Ranged
Attack Melee
Dodge Shuffle
Dodge Roll
Dodge
Cover
Goto
Dodge Covered
Blind Fire
Ambush
![Page 94: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/94.jpg)
Layering Behaviors
Kill Enemy
Attack Ranged
Attack Melee
Dodge Shuffle
Dodge Roll
Dodge
Cover
Goto
Dodge Covered
Blind Fire
Ambush
![Page 95: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/95.jpg)
Layering Behaviors
![Page 96: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/96.jpg)
Benefits of Planning
1. Decoupling Goals & Actions
2. Layering Behaviors
3. Dynamic Problem Solving
![Page 97: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/97.jpg)
Dynamic Problem Solving
![Page 98: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/98.jpg)
Dynamic Problem Solving
![Page 99: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/99.jpg)
Differences From STRIPS
1. Cost Per Action
2. No Add/Delete Lists
3. Procedural Preconditions
4. Procedural Effects
![Page 100: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/100.jpg)
Cost Per Action
![Page 101: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/101.jpg)
Cost Per Action
2 8
![Page 102: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/102.jpg)
Cost Per Action
2 8
*A
![Page 103: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/103.jpg)
Cost Per Action
A
![Page 104: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/104.jpg)
Cost Per Action
A* Navigation Planning
Nodes: NavMesh Polys World States
Edges: NavMesh Poly Actions
Edges
Goal: NavMesh Poly World State
![Page 105: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/105.jpg)
Cost Per Action
A
![Page 106: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/106.jpg)
Differences From STRIPS
1. Cost Per Action
2. No Add/Delete Lists
3. Procedural Preconditions
4. Procedural Effects
![Page 107: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/107.jpg)
No Add/Delete Lists
State: (phone#, recipe, hungry?)
ActionPreconditions: ( , -- , -- )
Effects:
Delete List: Hungry( YES )
Add List: Hungry( NO )
![Page 108: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/108.jpg)
No Add/Delete Lists
State: [phone#, recipe, hungry?]
ActionPreconditions: [ , -- , -- ]
Effects: [ -- , -- , NO ]
![Page 109: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/109.jpg)
No Add/Delete Lists
AttackPreconditions: [ -- , -- , ]
ReloadEffects: [ -- , -- , ]
![Page 110: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/110.jpg)
No Add/Delete Lists
[ -- , -- , -- ] 4-byte values
TargetDead [bool]WeaponLoaded [bool]OnVehicleType [enum]AtNode [HANDLE] - or -AtNode [variable*]
![Page 111: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/111.jpg)
No Add/Delete Lists
Goal Cover: [ -- , CoverNode63, -- ]
Action GotoEffect: [ -- , variable*, -- ]
![Page 112: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/112.jpg)
No Add/Delete Lists
[ -- , -- , ]
![Page 113: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/113.jpg)
No Add/Delete Lists
[ -- , -- , ]
![Page 114: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/114.jpg)
Differences From STRIPS
1. Cost Per Action
2. No Add/Delete Lists
3. Procedural Preconditions
4. Procedural Effects
![Page 115: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/115.jpg)
Procedural Preconditions
class Action{
// [ -- , -- , -- ]WORLD_STATE m_Preconditions;WORLD_STATE m_Effects;
bool CheckPreconditions();
};
![Page 116: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/116.jpg)
Procedural Preconditions
![Page 117: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/117.jpg)
Differences From STRIPS
1. Cost Per Action
2. No Add/Delete Lists
3. Procedural Preconditions
4. Procedural Effects
![Page 118: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/118.jpg)
Procedural Effects
class Action{
// [ -- , -- , -- ]WORLD_STATE m_Preconditions;WORLD_STATE m_Effects;
bool CheckPreconditions(); void ActivateAction();
};
![Page 119: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/119.jpg)
Procedural Effects
void ActionFlee::ActivateAction()
{
// ...
}
Goto Animate
<x,y,z>
![Page 120: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/120.jpg)
Squad Behaviors
![Page 121: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/121.jpg)
Global Coordinator
![Page 122: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/122.jpg)
Global Coordinator
Squad 1
Squad 2
Squad 3
![Page 123: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/123.jpg)
Squad Behaviors
1. Simple
2. Complex
![Page 124: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/124.jpg)
Squad Behaviors
1. Simple– Suppression fire– Goto positions– Follow leader
2. Complex– Flanking– Coordinated strikes– Retreats– Reinforcements
![Page 125: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/125.jpg)
Simple Squad Behaviors
• Get-to-Cover
• Advance-Cover
• Orderly-Advance
• Search
![Page 126: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/126.jpg)
Simple Squad Behaviors
1. Find participants.
2. Send orders.
3. Monitor progress.
4. Succeed or fail.
![Page 127: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/127.jpg)
Get-to-Cover
1. Find participants.
2. Send orders.
3. Monitor progress.
4. Succeed or fail.
Player
![Page 128: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/128.jpg)
Get-to-Cover
1. Find participants.
2. Send orders.
3. Monitor progress.
4. Succeed or fail.
Player
![Page 129: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/129.jpg)
Get-to-Cover
1. Find participants.
2. Send orders.
3. Monitor progress.
4. Succeed or fail.
Player
![Page 130: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/130.jpg)
Get-to-Cover
1. Find participants.
2. Send orders.
3. Monitor progress.
4. Succeed or fail.
Player
![Page 131: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/131.jpg)
Get-to-Cover
1. Find participants.
2. Send orders.
3. Monitor progress.
4. Succeed or fail.
Player
![Page 132: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/132.jpg)
Get-to-Cover
1. Find participants.
2. Send orders.
3. Monitor progress.
4. Succeed or fail.
Player
![Page 133: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/133.jpg)
Get-to-Cover
1. Find participants.
2. Send orders.
3. Monitor progress.
4. Succeed or fail.
Player
![Page 134: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/134.jpg)
Get-to-Cover
1. Find participants.
2. Send orders.
3. Monitor progress.
4. Succeed or fail.
Player
![Page 135: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/135.jpg)
Squad Behaviors
1. Simple– Suppression fire– Goto positions– Follow leader
2. Complex– Flanking– Coordinated strikes– Retreats– Reinforcements
![Page 136: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/136.jpg)
Complex Squad Behaviors
• There are none!!
![Page 137: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/137.jpg)
Complex Squad Behaviors
Player
![Page 138: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/138.jpg)
Complex Squad Behaviors
Player
![Page 139: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/139.jpg)
Complex Squad Behaviors
Player
![Page 140: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/140.jpg)
Squad Behavior Implementation
• Key is separation between squad layer and individual behaviors.
• Possibly formalize with Hierarchical Task Network (HTN) planning.
![Page 141: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/141.jpg)
Squad Communication
“I need reinforcements!”
![Page 142: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/142.jpg)
Squad Communication
Dialogue, instead of announcements: – Announcement: “Ouch!”– Dialogue:
• AI1: “What’s your status?”• AI2: “I’m hit!” (or “I’m alright!”)
![Page 143: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/143.jpg)
Squad Communication
Dialogue, instead of announcements: – Announcement: “Where did he go?”– Dialogue:
• AI1: “Can you see anything?”• AI2: “No sir!” (or “He’s behind
the boxes!”)
![Page 144: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/144.jpg)
Squad Communication
Dialogue also explains lack of action: – Dialogue:
• AI1: “He’s aiming at you!
Get out of there!”• AI2: “I’ve got nowhere to go!”
![Page 145: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/145.jpg)
Squad Communication
“…Not only do they give each other orders, but they actually DO what they’re told!”
![Page 146: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/146.jpg)
Squad Communication
“…Not only do they give each other orders, but they actually DO what they’re told!”
Reality:• Squad behavior has bird’s eye view of the
situation.• Find appropriate dialogue sequence after
the fact.
![Page 147: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/147.jpg)
Here’s the Plan:
• STRIPS Planning Overview
• Planning in F.E.A.R.
• Differences from STRIPS
• Squad Behaviors & Communication
• Beyond F.E.A.R.
![Page 148: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/148.jpg)
“… just like the marines in Half-Life 1”
![Page 149: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/149.jpg)
“… just like the marines in Half-Life 1”
1998 2005
![Page 150: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/150.jpg)
MIT Media Lab:Cognitive Machines Group
http://www.media.mit.edu/cogmac
![Page 151: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/151.jpg)
![Page 152: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/152.jpg)
Dialogue Integration
“What’s your status?”
![Page 153: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/153.jpg)
Unified Planning for Actions and Speech
“Look out! Grenade!”Precondition:
Effect:
![Page 154: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/154.jpg)
Unified Planning for Actions and Speech
OpenDoor -or- “Open the door!”Precondition:
door is closed
Effect:
door is open
![Page 155: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/155.jpg)
Plan Recognition
UnlockDoor
CreateKey
LightFire GotoForge
GetGold
![Page 156: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/156.jpg)
Plan Recognition
Plan as Context Free Grammar (CFG):
UnlockDoor CreateKey
LightFire GotoForge
GetGold
CreateKey
GotoForge :
:
:
![Page 157: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/157.jpg)
Plan Recognition
PLAN RECOGNITION VIDEO
![Page 158: 3 States and a Plan: The AI of F.E.A.R](https://reader036.vdocuments.us/reader036/viewer/2022062517/56813e65550346895da86d01/html5/thumbnails/158.jpg)
Questions?Jeff Orkin
Monolith is hiring!•Engineers•Artists•Designers
http://www.lith.com/jobs