Scaling Up To More Sophisticated AI Without Overburdening Developers - Lessons Learned Marc Atkin Irrational Games AGDC 4-Dec-2004.

Slides:



Advertisements
Similar presentations
The Halo 2 AI In 10 Minutes or Less Damián Isla Bungie Studios
Advertisements

7.1. O SCARS & A RTIFICIAL I NTELLIGENCE Interim awards and introduction to game AI.
Game AI Kevin Dill Senior AI Engineer Blue Fang Games
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
1 Interactive Fiction CIS 487/587 Bruce R. Maxim UM-Dearborn.
Artificial Intelligence in Game Design Representing NPCs as Finite State Machines.
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Using a Goal/Action Architecture to Integrate Modularity and Long-Term Memory into AI Behaviors Marc Atkin John Abercrombie.
Us vs. It. Tanks vs. Robot ● Cooperative “Boss Fight” ● Tank players must destroy the Robot before it reaches the city limits. ● Robot is controlled by.
Artificial Intelligence in Game Design Hierarchical Finite State Machines.
Introduction to Robotics In the name of Allah. Introduction to Robotics o Leila Sharif o o Lecture #2: The Big.
Computer Science – Game DesignUC Santa Cruz Today Publish/Subscribe Design Pattern Delegates Sprite movement Particles.
Enterprise Architecture: Unifying Business and IT.
RED DEAD REVOLVER Artificial Intelligence Critique By Mitchell C. Dodes CIS 588.
Embracing Emergent Behavior with Goal-Based AI
Knowledge Acquisitioning. Definition The transfer and transformation of potential problem solving expertise from some knowledge source to a program.
Latency Compensating Methods in Client/Server In-game Protocol Design and Optimization I’m Curtis.
Introduction to mobile robots Slides modified from Maja Mataric’s CSCI445, USC.
CORE MECHANICS. WHAT ARE CORE MECHANICS? Core mechanics are the heart of a game; they generate the gameplay and implement the rules. Formal definition:
The chapter will address the following questions:
AI and GAMES CSC 8520, Villanova University Spring, 2004 Paula Matuszek & Robin McEntire.
Collision and Animation Systems in Games Jani Kajala Lead Programmer / Chief Technology Officer, Pixelgene Ltd (0)
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.
Introduction GAM 376 Robin Burke Winter Outline Introductions Syllabus.
Artificial Intelligence in Game Design Behavior Trees.
UE4 Quickstart IMGD 4000 Due: March 25 th, 11:59pm.
Fall 2006CS4455 Prototyping Maribeth Gandy Jeff Wilson
AI in games Roger Crawfis/Eric Fosler-Lussier CSE 786 Game Design.
 Situational Based Interviews  Behavioral Based Interviews  Competency Based Interviews SP - O MALIK AZHAR MAHMOOD.
Oracle Data Integrator Procedures, Advanced Workflows.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
1 3132/3192 User Accessibility © University of Stirling /3192 User Accessibility 2.
Robotics Sharif In the name of Allah. Robotics Sharif Introduction to Robotics o Leila Sharif o o Lecture #2: The.
Please see this weeks session overleaf; themed this week around Deft Distribution. You may (if you haven’t already) want to consider: 1.The game (in the.
University of Windsor School of Computer Science Topics in Artificial Intelligence Fall 2008 Sept 11, 2008.
Games Development 2 Overview & Entity IDs and Communication CO3301 Week 1.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Games Development 2 Entity Update & Rendering CO3301 Week 2, Part 1.
Coaching Pack 9 – 11 Years. What Am I Coaching Today? What Might the Players Learn or Get Better at? TechnicalPsychological example PhysicalSocial example.
Stephen Flockton.  What is my Project?  What is Planning?  Advantages and Disadvantages of Planning.  Description of the Product.  Product Demonstration.
AI Evaluation David Nowell CIS 588 2/14/05 Baldur’s Gate.
Networked Games Objectives – –Understand the types of human interaction that a network game may provide and how this influences game play. –Understand.
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.
Sega 500 Scripted events and Sequences Jeff “Ezeikeil” Giles
Lecture 4 Page 1 CS 111 Online Modularity and Virtualization CS 111 On-Line MS Program Operating Systems Peter Reiher.
Games in Practice Prepared by RLEF, July Why Games? It’s recommended that a players development in each training session should consist of learning.
Game AI Matthew Hsieh Meng Tran. Computer Games Many different genres  Action  Role Playing  Adventure  Strategy  Simulation  Sports  Racing Each.
Robotics Sharif In the name of Allah Robotics Sharif Introduction to Robotics o Leila Sharif o o Lecture #4: The.
Advanced Games Development Game Physics CO2301 Games Development 1 Week 19.
Designing Design Tools. What is design tools? Why do we need them?
1 Why Threads are a Bad Idea (for most purposes) based on a presentation by John Ousterhout Sun Microsystems Laboratories Threads!
Executive Summary - Human Factors Heuristic Evaluation 04/18/2014.
High-level attention Attention in complex tasks Central executive function Automaticity Attention deficits.
Designing Intelligence Logical and Artificial Intelligence in Games Lecture 2.
Procedural programming Procedural programming is where you specify the steps required. You do this by making the program in steps. Procedural programming.
Finite State Machines Logical and Artificial Intelligence in Games Lecture 3a.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Maestro AI Vision and Design Overview Definitions Maestro: A naïve Sensorimotor Engine prototype. Sensorimotor Engine: Combining sensory and motor functions.
UE4 Quickstart IMGD 4000 Due: March 23 rd, 11:59pm.
The Game Development Process: Artificial Intelligence.
Team Member AI in an FPS and Goal Oriented Action Planning.
Where are we ? Setup Sprites Input Collision Drawing Sprites
CO Games Development 2 Week 19 Extensions to Finite State Machines
Designing Design Tools
CIS 488/588 Bruce R. Maxim UM-Dearborn
Subsuption Architecture
Games Development Game Architecture: Entities
Games Development 2 Entity / Architecture Review
Presentation transcript:

Scaling Up To More Sophisticated AI Without Overburdening Developers - Lessons Learned Marc Atkin Irrational Games AGDC 4-Dec-2004

MotivationMotivation

Why Do We Want Better AI? Bad AI is always noticed AI often inconsistent between games – why can’t we build on previous work? The AI is a big part of what makes a game world immersive and fun

What’s Stopping Us? What makes AI complex? –AI has many possible reactions to many situations –Many behaviours are operating on the AI at any given time –Hard to account for all the possible interactions Impression that academic AI research isn’t applicable (too slow, too complex, too flaky)

The Basic Idea: Use Modularity It’s not just for coding anymore! Produces AI that is easier to understand and debug Produces AI that it reusable within and between projects The key point: Design the AI architecture so that it facilitates modularity

Tribes: Vengeance First-person shooter Emphasises speed and freedom of movement (jetpacks!) 3 rd in the series

AI Challenges AI works in service of the game: – AI characters shouldn’t act stupidly – yet still be fun to fight AI’s should exhibit diverse behaviour AI’s should jetpack and ski AI’s should react to their environment AI’s should have recognizable roles –Sniper, duelist, mortar user, etc.

System Overview Navigation System Physics System AI Game World Pathfinder Animation System Animation System

What makes our game characters “intelligent”? A large set of sophisticated, hand- designed behaviors Common sense reactions The ability to exploit opportunities A consistent long term view of tasks to be accomplished

What makes our game characters “intelligent”? A large set of sophisticated, hand- designed behaviors Common sense reactions The ability to exploit opportunities A consistent long term view of tasks to be accomplished Tyrion: An architecture for specifying and executing AI behaviour

How Tyrion Works

Resources, Goals, and Actions Goal: A description of a desired world state Action (or behaviour): A method for achieving a goal Resource: An entity required to perform an action

Resource Hierarchy Team Squads Vehicles Characters Driver/Gunners Legs/Arms/Head

Resource Hierarchy TeamStrategic level Tactical levelSquads Vehicles Characters Driver/Gunners Legs/Arms/Head Individual Units Motor Control

Action/Goal Hierarchy Attack From All Sides NormalAttack DuelistAttack MoveTo Squad Character Legs / Arms Attack Goals Fire Weapon MoveTo Goal FireAt Goal Grunt Duelist

Action Structure Goal satisfied by action Selection heuristic –Evaluates appropriateness of action in a given situation Message callback functions for child actions Message callback functions for sensors Body (Unreal script latent code) –Typically executes over a number of game ticks

Example Action: Search Satisfies: SearchGoal( target, searchDistance ) –Only action that satisfies this goal Child action callbacks: –Set errorCode Sensor callback: –Terminate action if target spotted

Example Action: Search (cont) Body: –Store location and rotation –ActivateSensor( TargetSensor, target ) –Loop over searchPositions: WaitForGoal( MoveToGoal, searchPosition) Fail() if MoveToGoal was not achieved Play LookingAround animation Pause AnimationTime seconds –WaitForGoal( TurnGoal, originalRotation ) –Succeed()

Sensor Hierarchy Sensors can build upon one another, too DodgeSensor: Warns a character about incoming projectiles EnemySensor: Maintains a list of visible hostiles TargetSensor: Triggers when a particular unit is visible Vision System

AI and Scripting High level behaviours look a lot like scripts A script is essentially a one- time use behaviour Tyrion could be used to drive the scripting system

Example Script Executes when player enters trigger Spawns AI’s Moves AI’s into position and has them attack player

Example Script Executes when player enters trigger Spawns AI’s Moves AI’s into position and has them attack player Sensor activation Posting sub-goals

Execution Model 10 times a second: –Iterate over every resource: Order unmatched goals by priority Find actions that achieve them Tick every running action Tick every active periodic sensor; send messages If an action completes, mark its goal as achieved/failed; send messages

A Day in the Life of a Grunt A Grunt AI with three goals: –PatrolGoal (priority 40) –AttackGoal (priority 50, dormant) –DodgeGoal (priority 90, dormant) AttackGoal will activate when an enemy is sighted DodgeGoal will activate when a visible projectile will hit the AI

A Day in the Life (cont) Patrol is executing 40 PatrolGoalAttackGoalDodgeGoal legs arms

A Day in the Life (cont) Patrol is executing 40 PatrolGoal Enemy spotted! Sensor wakes up AttackGoal Attack executes; posts subgoals for legs & arms AttackGoalDodgeGoal legs arms 50 X

A Day in the Life (cont) Patrol is executing 40 PatrolGoal Enemy spotted! Sensor wakes up AttackGoal Attack executes; posts subgoals for legs & arms AttackGoalDodgeGoal legs arms Projectile spotted! Sensor wakes up DodgeGoal Dodge executes; needs legs arms continue executing Attack! arms 50 legs arms X X 50 X

A Day in the Life (cont) Patrol is executing 40 PatrolGoal Enemy spotted! Sensor wakes up AttackGoal Attack executes; posts subgoals for legs & arms AttackGoalDodgeGoal legs arms Projectile spotted! Sensor wakes up DodgeGoal Dodge executes; needs legs arms continue executing Attack! Dodge finishes: legs resume Attack subgoal arms 50 legs arms legs arms 50 X X X X

Lessons Learned

Sophisticated AI != Expensive AI This is not an expensive system –No search due to scoring function on actions –Action to goal matching only occurs when goal list changes for the resource –Although there are many actions running simultaneously, at any given time a lot are sleeping –Most of high-level AI was written in Unreal Script (20x slower than C++) yet it still wasn’t a bottleneck.

Some AI is expensive Superficially simple systems that require large amounts of debugging and tweaking (e.g. emergent AI) Search (e.g. planning, pathfinding) Line checks (e.g. vision)

Analysis (pluses) Character actions were very useful in coordinating squads and chaining sub- actions Useful to think of legs and arms as separate resources Architecture no harder to use than others, but quite easily reusable for other projects Using squad goals worked well: helped reduce the amount of level design work

Analysis (minuses) Full potential of architecture not exploited: FPS opponents are only human-like to a degree; their required spectrum of behaviours is fairly limited Exposed too much detail to designers; editor could have been streamlined We didn’t use the AI architecture to drive the scripting system: duplication of effort

General Lessons Learned Create AI that’s required by the game Create debugging tools early Leave time for tweaking Make sure the player knows when the AI does something cool Does good AI make a game fun (or is it just that bad AI makes a game not fun)?; do games need scripted set-pieces?

Take-home Message powerful AI != expensive AI One AI description language can control control teams, squads, characters, and scripting A modular AI is a reusable AI – let the AI engine handle the interaction complexities

The End

Unused Slides Follow….

Oh No, Not Another Hierarchy! Control hierarchies are a dime a dozen in the AI/robotics literature Tyrion’s more interesting features: –No set number of levels –Uniform description language and execution model used across levels –Separate sensing system –Dormant goals –Supervenience: information is sent up, goals are sent down

Relationship to AI Planning Tyrion can be viewed as a Task Network (or Partial Hierarchical) Planner Goal A Possible Actions

Relationship to AI Planning Tyrion can be viewed as a Task Network (or Partial Hierarchical) Planner Goal A Possible Actions Sub-goals Possible Sub-Actions

Relationship to AI Planning Tyrion can be viewed as a Task Network (or Partial Hierarchical) Planner Goal A Possible Actions Sub-goals Possible Sub-Actions xOutcome for goal A