Agent Architecture Considerations for Real-Time Planning in Games Jeff Orkin Monolith Productions.

Slides:



Advertisements
Similar presentations
Project M.AI.S. Multi-threaded AI system Per Erskjäns game engineer.
Advertisements

An Introduction to Knowledge Representation Damián Isla, Naimad Games Peter Gorniak, Rockstar.
Object Persistence for Synthetic Characters Damian Isla Bungie Studios Microsoft Corp. Bruce Blumberg Synthetic Characters MIT Media Lab.
08/2012Tanya Mishra1 EASYC for VEX Cortex Llano Estacado RoboRaiders FRC Team 1817.
State Estimation and Kalman Filtering CS B659 Spring 2013 Kris Hauser.
Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Time Constraints in Planning Sudhan Kanitkar
Lecture 6: Hybrid Robot Control Gal A. Kaminka Introduction to Robots and Multi-Robot Systems Agents in Physical and Virtual Environments.
2 Introduction to AI Robotics (MIT Press)Chapter 2: The Hierarchical Paradigm1 The Hierarchical Paradigm Describe the Hierarchical Paradigm in terms of.
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
Homework Any Questions?. Statements / Blocks, Section 3.1 An expression becomes a statement when it is followed by a semicolon x = 0; Braces are used.
1 Chapter 4 Language Fundamentals. 2 Identifiers Program parts such as packages, classes, and class members have names, which are formally known as identifiers.
Naming in Wireless Sensor Networks. 2 Sensor Naming  Exploiting application-specific naming and in- network processing for building efficient scalable.
Artificial Intelligence CSE 191A: Seminar on Video Game Programming Lecture 7: Artificial Intelligence UCSD, Spring, 2003 Instructor: Steve Rotenberg.
CPSC 322, Lecture 17Slide 1 Planning: Representation and Forward Search Computer Science cpsc322, Lecture 17 (Textbook Chpt 8.1 (Skip )- 8.2) February,
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
School of Computing and Mathematics, University of Huddersfield PDDL and other languages.. Lee McCluskey Department of Computing and Mathematical Sciences,
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 3 Programming and Software.
Behavior- Based Approaches Behavior- Based Approaches.
Distributed Robot Agent Brent Dingle Marco A. Morales.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
1 CMSC 132: Object-Oriented Programming II Java Constructs Department of Computer Science University of Maryland, College Park.
Principles of Procedural Programming
CSC230 Software Design (Engineering)
Artificial Intelligence
Applying Blackboard Systems to First Person Shooters Jeff Orkin Monolith Productions
Toward Real-Time Planning in Games Jeff Orkin Monolith Productions.
Chapter 7 Requirement Modeling : Flow, Behaviour, Patterns And WebApps.
Raven Robin Burke GAM 376. Soccer standings Burke, 7 Ingebristen, 6 Buer, 6 Bukk, 6 Krishnaswamy, 4 Lobes, 3 Borys, 2 Rojas, 2 Bieneman, 2.
Artificial Intelligence: Definition “... the branch of computer science that is concerned with the automation of intelligent behavior.” (Luger, 2009) “The.
Constraining Autonomous Character Behavior with Human Concepts Presentation by Jonathan Martin Based on Chapter 3.1 of AI Game Programming Wisdom 2, by.
CIS Computer Programming Logic
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 13Slide 1 Architectural Design u Establishing the overall structure of a software system.
1 Intelligent Systems ISCRAM 2013 Validating Procedural Knowledge in the Open Virtual Collaboration Environment Gerhard Wickler AIAI, University.
Introduction to AI Robotics Chapter 2. The Hierarchical Paradigm Hyeokjae Kwon.
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
Computer Science CPSC 322 Lecture 3 AI Applications 1.
AI System Overview March AI System Basics – Navigation Default Navigation System – Triangulation 2D terrain-based navigation – Navigation Modifiers.
CHA2555 Week2: Knowledge Representation, Logic and Planning Lee McCluskey First term:
Jason Houle Vice President, Travel Operations Lixto Travel Price Intelligence 2.0.
AI Game Programming Wisdom 2 Chapter 3.3
1 CO Games Development 2 Week 17 – Goal-Oriented Action Planning Gareth Bellaby.
How to Create a Videogame By: Connor McCann. Java Java is one of many programming languages Java is used to run web browsers and most PC video games I.
Lec 6 Data types. Variable: Its data object that is defined and named by the programmer explicitly in a program. Data Types: It’s a class of Dos together.
Architecture for Autonomous Assembly 1 Reid Simmons Robotics Institute Carnegie Mellon University.
A Language for Task-Level Executives Reid Simmons David Apfelbaum Carnegie Mellon University.
Lightweight Consistency Enforcement Schemes for Distributed Proofs with Hidden Subtrees Adam J. Lee, Kazuhiro Minami, and Marianne Winslett University.
GAM 200 Club. How to Game Engine GAM 200 Club Zachary Nawar.
CSC 480 Software Engineering Design by Contract. Detail Design Road Map Begin with architectural models  Class model: domain classes  Overall state.
Stephen Flockton.  What is my Project?  What is Planning?  Advantages and Disadvantages of Planning.  Description of the Product.  Product Demonstration.
Path Look-up Tables & An Overview of Navigation Systems Hai Hoang 10/4/2004.
KaaShiv InfoTech presents ROBOTICS For Inplant Training / Internship, please download the "Inplant training registration form"
3 States and a Plan: The AI of F.E.A.R. Jeff Orkin Monolith Productions/ MIT Media Lab.
Toward a cooperative programming framework for context-aware applications B. Guo, D. Zhang Telecom. Network and Service Dept. Institut TELECOM SudParis.
(c) , University of Washington18a-1 CSC 143 Java Searching and Recursion N&H Chapters 13, 17.
How to execute Program structure Variables name, keywords, binding, scope, lifetime Data types – type system – primitives, strings, arrays, hashes – pointers/references.
Communicating Always & Forever Ministry. Communicating Communicating is the key to “all” relationships. Positive or Negative Loving an imperfect person.
2 The Hierarchical Paradigm Describe the Hierarchical Paradigm in terms of the 3 robot primitives and its organization of sensing Name and evaluate one.
Inside Class Methods Chapter 4. 4 What are variables? Variables store values within methods and may change value as the method processes data.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
Goal-Oriented Game AI Purpose and Utilizations Research Organized by: Evan Schipellite.
Team Member AI in an FPS and Goal Oriented Action Planning.
Behavior trees & The C# programming language for Java programmers
CIS 488/588 Bruce R. Maxim UM-Dearborn
11/10/2018.
Simple Techniques for Coordinated Behavior
CIS 488/588 Bruce R. Maxim UM-Dearborn
Presented By: Darlene Banta
Presentation transcript:

Agent Architecture Considerations for Real-Time Planning in Games Jeff Orkin Monolith Productions

F.E.A.R.

Agenda Motivation Problems Solutions Was it worth it?

Agenda Motivation – Why plan? Problems – Performance! Solutions – Agent architecture Was it worth it?

Why plan in real-time?

Goal-Oriented Behavior

Problems: Managing dependencies Sharing behaviors

Problem: Dependencies

Problem: Sharing No One Lives Forever 2TRON 2.0

Problem: Sharing No One Lives Forever 2TRON 2.0

Problem: Sharing No One Lives Forever 2TRON 2.0

P.D.D.L. Planning Domain Definition Language Goals – Desired state Actions – Preconditions – Effects

P.D.D.L. Goal: (define (problem get-paid) (:domain briefcase-world) (:init (place home) (place office) (object p) (object d) (object b) (at B home) (at P home) (at D home) (in P)) (:goal (and (at B office) (at D office) (at P home))))

P.D.D.L. Action: (:action put-in :parameters (?x - physob ?l - location) :precondition (not (= ?x B)) :effect (when (and (at ?x ?l) (at B ?l)) (in ?x)) ) Other actions: take-out, move

P.D.D.L. Modular – Goals – Actions Decoupled Modules Related by symbols – World State – Preconditions – Effects Applied PDDL’s structure to C++ toolkit in game code.

Monolith Productions Management

How to Plan in Real-Time and Keep Your Job Jeff Orkin Monolith Productions

The Plan Goal: KillEnemy Plan: Goto (couch) UseObject (couch) Goto (coverNode) AttackFromCover

AI Performance Guideline: 1.0ms / frame

AI Performance: Off the Chart!

Preconditions: Visibility

AI Performance: Off the Chart! Preconditions: Visibility Pathfinding

AI Performance: Off the Chart! Preconditions: Visibility Pathfinding Tactical Position Validity

Solution Re-consider Agent Architecture Distributed processing Caching

Solution Re-consider Agent Architecture Distributed processing Caching Inspiration: MIT Media Lab’s C4 Robotics

Solution

What is a soldier?

Sensors: See

What is a soldier? Sensors: See Hear

What is a soldier? Sensors: See Hear Feel pain

What is a soldier? Subsystems: Navigate / Move

What is a soldier? Subsystems: Navigate / Move Attention Selection (Targeting)

What is a soldier? Subsystems: Navigate / Move Attention Selection (Targeting) Weapons

Distributed Processing with Sensors Pseudo-parallel Amortize precondition processing across many frames Allow incremental processing

Distributed Processing with Sensors More than Vision, Hearing, Touch Tactical analysis Internal desires

Distributed Processing with Sensors Update: – Every frame – Periodic Polling – Event-driven Limit total number of expensive sensor updates per frame.

Sensor Example: CoverNode Sensor Update 3 times / second

Sensor Example: Cover Node Sensor Update 3 times / second

Sensor Example: PassTarget Sensor Incremental update

Sensor Example: PassTarget Sensor Incremental update

Sensor Example: PassTarget Sensor Incremental update

Sensor Example: PassTarget Sensor Incremental update

Sensor Example: PassTarget Sensor Incremental update

Sensor Example: PassTarget Sensor Incremental update

Sensor Example: PassTarget Sensor Incremental update

Sensor Example: PassTarget Sensor Incremental update

Caching

Caching: WorkingMemoryFacts Facts are really beliefs Common representation of all knowledge: – Character – Object – Node – Disturbance – Task – PathInfo – Desire

Caching: WorkingMemoryFacts WorkingMemoryFact { Attribute Position Attribute Direction Attribute Stimulus Attribute Object Attribute Desire // 16 attributes total... }

Caching: WorkingMemoryFacts Attribute { TypeValue float fConfidence }

Caching: WorkingMemoryFacts SeeEnemy Sensor: Stimulus Confidence

Caching: WorkingMemoryFacts SeeEnemy Sensor: Stimulus Confidence

Caching: WorkingMemoryFacts SeeEnemy Sensor: Stimulus Confidence

Caching: WorkingMemoryFacts SeeEnemy Sensor: Stimulus Confidence

Caching: WorkingMemoryFacts CoverNode Sensor: Position Confidence

The Planning Process

The Plan Goal: KillEnemy Plan: Goto (couch) UseObject (couch) Goto (coverNode) AttackFromCover

The Plan Plan: Goto (couch) UseObject (couch) Goto (coverNode) AttackFromCover Goal: KillEnemy

The Planning Process Goal: KillEnemy Satisfaction: ???

Planning Process: Symbols Simple representation of World State: Array of symbols Fixed number of symbols Symbol = Key, Value pair Union of 4 byte values (int, float, HANDLE, etc)

Planning Process: Symbols Simple representation of agent’s World State: Array of symbols Fixed number of symbols Symbol = Key, Value pair Union of 4 byte values (int, float, HANDLE, etc) Examples: kWeaponArmed = TRUE kUsedObject = hSomeObject

Planning Process: Symbols Goal: KillEnemy Satisfaction: kTargetIsDead = TRUE

Planning Process: Symbols Agent-centric representation

Planning Process: Symbols Agent-centric representation – kTargetIsDead – Subsystem handles target selection. – Select from Character Facts in WorkingMemory. – Less symbols to evaluate during plan formulation.

The Plan Plan: Goto (couch) UseObject (couch) Goto (coverNode) AttackFromCover Goal: KillEnemy

Planning Process: Actions

Action Preconditions & Effects: Represented with same array of symbols Value may be constant or variable

Planning Process: Actions

Planning Process: Context Preconditions Context preconditions Filter function of arbitrary code – Am I riding a vehicle? – Does a path exist? – Is object visible? – Is valid cover available? Symbolic preconditions are only used when we want the planner to chain a preceding action.

Planning Process: Context Preconditions A: AttackFromCover bool ValidateContextPreconditions() { // Is target visible?... // Does a valid node // exist? }

Planning Process: Context Preconditions Query Q Q.Type = kFact_Node Q.Node = kNode_Cover Fact* pFact = FindFactMax( Q, kAtt_Position ) Finds the WMFact with highest confidence in some attribute. If returns NULL, no valid cover exists.

The Plan Plan: Goto (couch) UseObject (couch) Goto (coverNode) AttackFromCover Goal: KillEnemy

Planning Process: Variables G: KillEnemy S: kTargetIsDead = TRUE A: AttackFromCover E: kTargetIsDead = TRUE

Planning Process: Variables G: KillEnemy S: kTargetIsDead = TRUE A: AttackFromCover E: kTargetIsDead = TRUE P: kWeaponArmed = TRUE kWeaponLoaded = TRUE kAtObject = ???

Planning Process: Variables A: AttackFromCover E: kTargetIsDead = TRUE P: kWeaponArmed = TRUE kWeaponLoaded = TRUE kAtObject =

Planning Process: Variables A: Goto E: kAtObject =

Planning Process: Variables A: AttackFromCover P: kAtObject = A: Goto E: kAtObject =

Planning Process: Variables

The Plan Plan: Goto (couch) UseObject (couch) Goto (coverNode) AttackFromCover Goal: KillEnemy

Planning Process: Variables A: Goto E: kAtObject =

Planning Process: Variables A: Goto E: kAtObject = P: kUsedObject =

The Plan Plan: Goto (couch) UseObject (couch) Goto (coverNode) AttackFromCover Goal: KillEnemy

Was It Worth It?

Did we handle? Managing dependencies  Sharing behaviors  Additional benefit: Replanning

Parting Thoughts Warcraft (1994)

Parting Thoughts Star Wars (1987)

Parting Thoughts F.E.A.R. (2005)

Parting Thoughts 2D3D Pre-renderedReal-time renderedgraphics

Parting Thoughts Scripts, FSMsPlanning Pre-renderedReal-time simulatedreasoning & behavior What new types of gameplay are possible?!

Questions? Jeff Orkin Monolith Productions