3 States and a Plan: The AI of F.E.A.R. Jeff Orkin Monolith Productions/ MIT Media Lab.

Slides:



Advertisements
Similar presentations
Halo 3 Objective Trees: A Declarative Approach to Multiagent Coordination Damián Isla Bungie Studios.
Advertisements

Transparent Decision-Making and AI Design Damian Isla AI Lead, Bungie Studios.
What we will cover today… Where is the camera on my phone? Taking a photo Zoom in and out Deleting a photo Where do my photos go to? Viewing my photos.
KNR 242. Management techniques refer to: Discipline techniques refer to: Management vs. Discipline.
REVIEW : Planning To make your thinking more concrete, use a real problem to ground your discussion. –Develop a plan for a person who is getting out of.
Cognitive Systems, ICANN panel, Q1 What is machine intelligence, as beyond pattern matching, classification and prediction. What is machine intelligence,
Planning  We have done a sort of planning already  Consider the “search” applied to general problem solving  The sequence of moves with the “Jugs” was.
Multimedia Synchronization Brian P. Bailey Spring 2006.
Lecture 8: Three-Level Architectures CS 344R: Robotics Benjamin Kuipers.
Mobile Marketing in Practice
Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Organizational Change.
Automated Planning & Computer Games: Perspectives and Applications Hector Munoz-Avila.
1 Chapter 16 Planning Methods. 2 Chapter 16 Contents (1) l STRIPS l STRIPS Implementation l Partial Order Planning l The Principle of Least Commitment.
Artificial Intelligence in Game Design Hierarchical Finite State Machines.
IE673Session 2 - Team Dynamics1 Team Dynamics NGT, Leadership, Facilitation.
Artificial Intelligence Chapter 11: Planning
Systems of Distributed Systems Module 2 -Distributed algorithms Teaching unit 3 – Advanced algorithms Ernesto Damiani University of Bozen Lesson 6 – Two.
1 More on Distributed Coordination. 2 Who’s in charge? Let’s have an Election. Many algorithms require a coordinator. What happens when the coordinator.
Dr Eleni Mangina – COURSE: LOGIC PROGRAMMING (during a joint degree with Fudan University in Software Engineering) DEPT. OF COMPUTER SCIENCE UCD LOGIC.
Automated Planning and HTNs Planning – A brief intro Planning – A brief intro Classical Planning – The STRIPS Language Classical Planning – The STRIPS.
Tactical AI in Real Time Supervisor: Aleks Jakulin Crew: Damir Arh, Matija Jekovec, Mitja Luštrek Gregor Leban, Martin Žnidaršič, Uroš Čibej Translation:
AI Evaluation F.E.A.R.. How AI is used in F.E.A.R. Controls all enemy unit behaviors and actions Patrolling Attacking Ducking under cover etc. Other NPC.
A Web Services Based Streaming Gateway for Heterogeneous A/V Collaboration Hasan Bulut Computer Science Department Indiana University.
© 2014 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Hardware Interface Design Patterns Ahmet Selman Bozkır – Hacettepe Univ.
Toward Real-Time Planning in Games Jeff Orkin Monolith Productions.
“It’s not our differences that divide us, it’s our judgments about each other that do.” (Meg Wheatly)
Jump Start Your Job Search Agenda Welcome Stages of a job opening Skills desired by employers Your Job Search Resources Questions.
Some Drivers for Success Krista Ciccozzi
English Grammar Pedagogical Analysis
Evidence based research in education Cathy Gunn University of Auckland.
Course Overview  What is AI?  What are the Major Challenges?  What are the Main Techniques?  Where are we failing, and why?  Step back and look at.
Yingcai Xiao Artificial Intelligence in Game Development Yingcai Xiao.
Video Game AI. Classical Games – Focus on optimal players using computationally expensive search techniques Video Game AI – Refers to games such as First.
Agent Architecture Considerations for Real-Time Planning in Games Jeff Orkin Monolith Productions.
Logic Specification and Z Schema 3K04 McMaster. Basic Logic Operators Logical negation ( ¬ ) Logical conjunction ( Λ or & ) Logical disjunction ( V or.
{ Logic in Artificial Intelligence By Jeremy Wright Mathematical Logic April 10 th, 2012.
Computer Science CPSC 322 Lecture 3 AI Applications 1.
Working in Groups Decision-making processes. Why work in a group? Working in groups is a vital part of every job Groups are more productive than individuals.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Artificial Intelligence: Planning Lecture 6 Problems with state space search Planning Operators A Simple Planning Algorithm (Game Playing)
Artificial Intelligence in Game Design Behavior Trees.
Measuring Complex Achievement
AI Game Programming Wisdom 2 Chapter 3.3
1 CO Games Development 2 Week 17 – Goal-Oriented Action Planning Gareth Bellaby.
August 31, 2005 Game Developer Conference Europe Killzone’s AI: Dynamic Procedural Tactics Guerrilla Games - 1 Killzone’s AI: Dynamic Procedural Tactics.
1 Game AI Finite State Machine. Finite State Machine (FSM) is the most commonly used Game AI technology Finite State Machine (FSM) is the most commonly.
Six Sigma Overview Presented by: >. Agenda What is Six Sigma? History of Six Sigma Six Sigma Methodology When to use Six Sigma? Different Six Sigma belts?
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Special Effects Or digital construction of images and animation (Terminator ) Which is better? Can we say? Is technology the sole criteria? Models,
Introduction to Planning Dr. Shazzad Hosain Department of EECS North South Universtiy
Project Management Workshop James Small. Goals Understand the nature of projects Understand why Project Management is important Get an idea of the key.
Multiagent System Katia P. Sycara 일반대학원 GE 랩 성연식.
F.E.A.R. Game AI Evaluation by Robert Rak. What is F.E.A.R. ? FEAR is a First Person Shooter game Player takes on the role of an elite strike force team.
CSCI 4310 Lecture 2: Search. Search Techniques Search is Fundamental to Many AI Techniques.
Success Vs. Average The Secrets of the highly Successful.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
An Overview of Business Research Process
Objectives  Explain the meaning of “Video Communication”  Explain why it is important to understand the nature of the video world  Describe the 3 major.
(Classical) AI Planning. General-Purpose Planning: State & Goals Initial state: (on A Table) (on C A) (on B Table) (clear B) (clear C) Goals: (on C Table)
Human Resource Management: Gaining a Competitive Advantage Chapter 7 Performance Management Copyright © 2010 by the McGraw-Hill Companies, Inc. All rights.
Finite State Machines Logical and Artificial Intelligence in Games Lecture 3a.
Goal-Oriented Game AI Purpose and Utilizations Research Organized by: Evan Schipellite.
Team Member AI in an FPS and Goal Oriented Action Planning.
Automated Planning & Computer Games: Perspectives and Applications
SNS College of Engineering Department of Computer Science and Engineering AI Planning Presented By S.Yamuna AP/CSE 5/23/2018 AI.
Input Space Partition Testing CS 4501 / 6501 Software Testing
Enemy and Friendly AIs Richard Gesick.
STATE MACHINE AND CONCURRENT PROCESS MODEL
Presentation transcript:

3 States and a Plan: The AI of F.E.A.R. Jeff Orkin Monolith Productions/ MIT Media Lab

Survey Says!

FSM: 3 States

FSM: 2 States!

FSM: Transition Logic void StateAttack::Update() { //... if( Ammo == 0 ) { pState = Reload(bCrouch); return; } //... }

Shogo, 1998

No One Lives Forever, 2000

F.E.A.R., 2005

Halo 2, 2004 Allowable behaviors for infantry, drivers, and passengers

FSM vs Planning FSMPlanning - How- What

FSM vs Planning FSMPlanning - How- What - Procedural- Declarative

Motivation

Here’s the Plan: STRIPS Planning Overview Planning in F.E.A.R. Differences from STRIPS Squad Behaviors & Communication Beyond F.E.A.R.

What is Planning? Planning is a formalized process of searching for sequence of actions to satisfy a goal. Process is called “Plan Formulation.”

STRIPS Planning …in a nutshell

STRIPS Planning STRIPS = STanford Research Institute Problem Solver

STRIPS Planning STRIPS Goal: Desired state of the world to reach. STRIPS Actions: –Preconditions –Effects

States

States: FSM Attack Search

States: Planning Represented as a logical sentence: AtLocation(Home) ^ Wearing(Tie) Represented as a vector: (AtLocation, Wearing) = (Home, Tie)

States: Planning Example: Lemonade Stand ( weather, #lemons, $$ )= (,,) or (,,)

STRIPS Planning Example

State: (phone#, recipe, hungry?) Goal: ( --, --, NO ) (, --,YES) (, --,NO ) ( --,,YES) ( --,,NO )

STRIPS Planning Example State: (phone#, recipe, hungry?) Goal: ( --, --, NO ) (,,NO ) (,,YES) (,,NO )

STRIPS Planning Example

State: (phone#, recipe, hungry?) Action Preconditions: (, --, -- ) Effects: Delete List: Hungry( YES ) Add List: Hungry( NO )

STRIPS Planning Example State: (phone#, recipe, hungry?) Action Preconditions: (, --, -- ) Effects: Hungry( NO ) Hungry( YES ) ^ Hungry( NO )

STRIPS Planning Example Action: Buy( object ) Preconditions: ( -- ) Effects: Delete List: -- Add List: Own( object ) Own( ) ^ Own( ) ^ Own( )

STRIPS Planning Example

FPS Statistics Average lifespan of FPS enemy AI:

FPS Statistics Average lifespan of FPS enemy AI: seconds

FPS Statistics Average lifespan of FPS enemy AI: seconds Number of enemy AI who die in FPS’s per day:

FPS Statistics Average lifespan of FPS enemy AI: seconds Number of enemy AI who die in FPS’s per day: 19,789,203

FPS Statistics Sally Struthers says “Save the AI!”

Here’s the Plan: STRIPS Planning Overview Planning in F.E.A.R. Differences from STRIPS Squad Behaviors & Communication Beyond F.E.A.R.

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.

Planning Video #1

Planning Video #2

Planning Video #3

Planning Video #4

SoldierAssassin Rat

Benefits of Planning 1.Decoupling Goals & Actions 2.Layering Behaviors 3.Dynamic Problem Solving

Decoupling Goals & Actions

+ =

Benefits of Planning 1.Decoupling Goals & Actions 2.Layering Behaviors 3.Dynamic Problem Solving

Layering Behaviors

Kill Enemy Attack Ranged

Layering Behaviors Kill Enemy Attack Ranged Attack Melee

Layering Behaviors Kill Enemy Attack Ranged Attack Melee Dodge Shuffle Dodge Roll Dodge

Layering Behaviors Kill Enemy Attack Ranged Attack Melee Dodge Shuffle Dodge Roll Dodge Cover Goto Dodge Covered

Layering Behaviors Kill Enemy Attack Ranged Attack Melee Dodge Shuffle Dodge Roll Dodge Cover Goto Dodge Covered Blind Fire

Layering Behaviors Kill Enemy Attack Ranged Attack Melee Dodge Shuffle Dodge Roll Dodge Cover Goto Dodge Covered Blind Fire Ambush

Layering Behaviors Kill Enemy Attack Ranged Attack Melee Dodge Shuffle Dodge Roll Dodge Cover Goto Dodge Covered Blind Fire Ambush

Layering Behaviors

Benefits of Planning 1.Decoupling Goals & Actions 2.Layering Behaviors 3.Dynamic Problem Solving

Dynamic Problem Solving

Differences From STRIPS 1.Cost Per Action 2.No Add/Delete Lists 3.Procedural Preconditions 4.Procedural Effects

Cost Per Action

2 8

2 8 * A

A

A*NavigationPlanning Nodes:NavMesh PolysWorld States Edges:NavMesh Poly Actions Edges Goal:NavMesh PolyWorld State

Cost Per Action A

Differences From STRIPS 1.Cost Per Action 2.No Add/Delete Lists 3.Procedural Preconditions 4.Procedural Effects

No Add/Delete Lists State: (phone#, recipe, hungry?) Action Preconditions: (, --, -- ) Effects: Delete List: Hungry( YES ) Add List: Hungry( NO )

No Add/Delete Lists State: [phone#, recipe, hungry?] Action Preconditions: [, --, -- ] Effects: [ --, --, NO ]

No Add/Delete Lists Attack Preconditions: [ --, --, ] Reload Effects: [ --, --, ]

No Add/Delete Lists [ --, --, -- ] 4-byte values TargetDead[bool] WeaponLoaded[bool] OnVehicleType[enum] AtNode[HANDLE] - or - AtNode[variable*]

No Add/Delete Lists Goal Cover: [ --, CoverNode63, -- ] Action Goto Effect: [ --, variable*, -- ]

No Add/Delete Lists [ --, --, ]

No Add/Delete Lists [ --, --, ]

Differences From STRIPS 1.Cost Per Action 2.No Add/Delete Lists 3.Procedural Preconditions 4.Procedural Effects

Procedural Preconditions class Action { // [ --, --, -- ] WORLD_STATE m_Preconditions; WORLD_STATE m_Effects; bool CheckPreconditions(); };

Procedural Preconditions

Differences From STRIPS 1.Cost Per Action 2.No Add/Delete Lists 3.Procedural Preconditions 4.Procedural Effects

Procedural Effects class Action { // [ --, --, -- ] WORLD_STATE m_Preconditions; WORLD_STATE m_Effects; bool CheckPreconditions(); void ActivateAction(); };

Procedural Effects void ActionFlee::ActivateAction() { //... }

Squad Behaviors

Global Coordinator

Squad 1 Squad 2 Squad 3

Squad Behaviors 1.Simple 2.Complex

Squad Behaviors 1.Simple –Suppression fire –Goto positions –Follow leader 2.Complex –Flanking –Coordinated strikes –Retreats –Reinforcements

Simple Squad Behaviors Get-to-Cover Advance-Cover Orderly-Advance Search

Simple Squad Behaviors 1.Find participants. 2.Send orders. 3.Monitor progress. 4.Succeed or fail.

Get-to-Cover 1.Find participants. 2.Send orders. 3.Monitor progress. 4.Succeed or fail. Player

Get-to-Cover 1.Find participants. 2.Send orders. 3.Monitor progress. 4.Succeed or fail. Player

Get-to-Cover 1.Find participants. 2.Send orders. 3.Monitor progress. 4.Succeed or fail. Player

Get-to-Cover 1.Find participants. 2.Send orders. 3.Monitor progress. 4.Succeed or fail. Player

Get-to-Cover 1.Find participants. 2.Send orders. 3.Monitor progress. 4.Succeed or fail. Player

Get-to-Cover 1.Find participants. 2.Send orders. 3.Monitor progress. 4.Succeed or fail. Player

Get-to-Cover 1.Find participants. 2.Send orders. 3.Monitor progress. 4.Succeed or fail. Player

Get-to-Cover 1.Find participants. 2.Send orders. 3.Monitor progress. 4.Succeed or fail. Player

Squad Behaviors 1.Simple –Suppression fire –Goto positions –Follow leader 2.Complex –Flanking –Coordinated strikes –Retreats –Reinforcements

Complex Squad Behaviors There are none!!

Complex Squad Behaviors Player

Complex Squad Behaviors Player

Complex Squad Behaviors Player

Squad Behavior Implementation Key is separation between squad layer and individual behaviors. Possibly formalize with Hierarchical Task Network (HTN) planning.

Squad Communication “I need reinforcements!”

Squad Communication Dialogue, instead of announcements: –Announcement: “Ouch!” –Dialogue: AI1: “What’s your status?” AI2: “I’m hit!” (or “I’m alright!”)

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!”)

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!”

Squad Communication “…Not only do they give each other orders, but they actually DO what they’re told!”

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.

Here’s the Plan: STRIPS Planning Overview Planning in F.E.A.R. Differences from STRIPS Squad Behaviors & Communication Beyond F.E.A.R.

“… just like the marines in Half-Life 1”

MIT Media Lab: Cognitive Machines Group

Dialogue Integration “What’s your status?”

Unified Planning for Actions and Speech “Look out! Grenade!” Precondition: Effect:

Unified Planning for Actions and Speech OpenDoor -or- “Open the door!” Precondition: door is closed Effect: door is open

Plan Recognition UnlockDoor CreateKey LightFireGotoForge GetGold

Plan Recognition Plan as Context Free Grammar (CFG): UnlockDoorCreateKey LightFireGotoForge GetGold CreateKey GotoForge : : :

Plan Recognition PLAN RECOGNITION VIDEO

Questions? Jeff Orkin Monolith is hiring! Engineers Artists Designers