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

Slides:



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

Artificial Intelligence: Knowledge Representation
Algorithm Design Techniques
Chapter 4 Computation Bjarne Stroustrup
Chapter 17 Linked Data Structures. Copyright © 2006 Pearson Addison-Wesley. All rights reserved Learning Objectives Nodes and Linked Lists Creating,
Managing Complexity in the Halo2 AI Damián Isla Bungie Studios
The Two Faces of Video Game AI Damian Isla AI Lead, Bungie Studios.
Transparent Decision-Making and AI Design Damian Isla AI Lead, Bungie Studios.
Evaluating the Robustness of Learning from Implicit Feedback Filip Radlinski Thorsten Joachims Presentation by Dinesh Bhirud
Artificiel Bee Colony (ABC) Algorithme Isfahan University of Technology Fall Elham Seifossadat Faegheh Javadi.
Game Tuning Workshop AI Babysitter Elective. Game Tuning Workshop The Designer-Player Relationship Designer Player Game CreatesConsumes.
Testing Workflow Purpose
1 CS 391L: Machine Learning: Rule Learning Raymond J. Mooney University of Texas at Austin.
Database System Concepts and Architecture
 Review: The Greedy Method
Types of Algorithms.
Game AI Kevin Dill Senior AI Engineer Blue Fang Games
Part2 AI as Representation and Search
Abstract Data Types and Subprograms
Intelligent systems Lecture 6 Rules, Semantic nets.
Spring 2007COMP Design Teams Team Structure Interdisciplinary Teams.
Aug 24, Fall 2005ITCS4010/50101 Design Teams Team Structure Interdisciplinary Teams.
Using Search in Problem Solving
Game Playing CSC361 AI CSC361: Game Playing.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
AI – Week 8 AI + 2 Player Games Lee McCluskey, room 3/10
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
Review of Recursion. Definition: Recursion - The process of a function calling itself.
Backtracking.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Matthew J Mattia CSC  Cumbersome Code  Consistent/Predictable design (GUEPs #5, CD’s #10)  Display “proper” amount of information  Including.
AI and GAMES CSC 8520, Villanova University Spring, 2004 Paula Matuszek & Robin McEntire.
1 Adversary Search Ref: Chapter 5. 2 Games & A.I. Easy to measure success Easy to represent states Small number of operators Comparison against humans.
 Optimal Packing of High- Precision Rectangles By Eric Huang & Richard E. Korf 25 th AAAI Conference, 2011 Florida Institute of Technology CSE 5694 Robotics.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
Tree Kernels for Parsing: (Collins & Duffy, 2001) Advanced Statistical Methods in NLP Ling 572 February 28, 2012.
DIGITAL GAME PROG I Large-Scale Design Process Part 2.
Minimum Spanning Trees
Role-Based Guide to the RUP Architect. 2 Mission of an Architect A software architect leads and coordinates technical activities and artifacts throughout.
1 Robot Environment Interaction Environment perception provides information about the environment’s state, and it tends to increase the robot’s knowledge.
CSE 219 Computer Science III Program Design Principles.
Chapter 6 Binary Trees. 6.1 Trees, Binary Trees, and Binary Search Trees Linked lists usually are more flexible than arrays, but it is difficult to use.
ARTIFICIAL INTELLIGENCE DR. ABRAHAM AI a field of computer science that is concerned with mechanizing things people do that require intelligent.
 Analysis Wrap-up. What is analysis?  Look at an algorithm and determine:  How much time it takes  How much space it takes  How much programming.
Binary Tree. Contiguous versus Linked List Insertion in Contiguous list needs a lot of move. For big chunks of records it is time consuming. Linked List.
Lecture1 introductions and Tree Data Structures 11/12/20151.
Application of AI techniques for Computer Games BSc Computer Games Programming, 2006 Julien Delezenne GAMES ARTIFICIAL INTELLIGENCE.
Lecture 3: Uninformed Search
Slide 1 Linked Data Structures. Slide 2 Learning Objectives  Nodes and Linked Lists  Creating, searching  Linked List Applications  Stacks, queues.
Games Development Game Architecture: Entities CO2301 Games Development 1 Week 22.
Artificial Intelligence for Games Finite State Machines
Copyright © 2002 Pearson Education, Inc. Slide 1.
Decision Trees Binary output – easily extendible to multiple output classes. Takes a set of attributes for a given situation or object and outputs a yes/no.
AI Evaluation David Nowell CIS 588 2/14/05 Baldur’s Gate.
Types of Algorithms. 2 Algorithm classification Algorithms that use a similar problem-solving approach can be grouped together We’ll talk about a classification.
R-Trees: A Dynamic Index Structure For Spatial Searching Antonin Guttman.
Week 10 - Friday.  What did we talk about last time?  Graph representations  Adjacency matrix  Adjacency lists  Depth first search.
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 10: Tools.
National Coalition Academy Summary
Trees Chapter 15.
September 20, 2017 Agile Techniques Workshop Susan Futey
Bin Packing Optimization
Map interface Empty() - return true if the map is empty; else return false Size() - return the number of elements in the map Find(key) - if there is an.
Analysis and design of algorithm
Types of Algorithms.
CO Games Development 2 Week 19 Extensions to Finite State Machines
Announcements Homework 3 due today (grace period through Friday)
Interaction with artificial intelligence in games
Blay Whitby 2003 Search Blay Whitby 2003
Games Development Game Architecture: Entities
Presentation transcript:

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

Expectation Management Objective Trees are a scripting method The Declarative Approach is an authoring paradigm

Agenda Encounter Design Halo 2: Imperative Method Halo 3: Declarative Method Results and Conclusions

Encounter Design

Encounters are Multiagent Systems –lots of guys –lots of things to do Encounters are Puzzles Encounters are Dynamic –they collapse in interesting and fun ways Encounters reflect –the strategic intelligence of the characters –the story of the encounter

Encounter Design AI acts smart within the confines of the plan provided by the designer Designer provides the strategic intelligence

Player Approach

Task

The Mission Designers language for telling the AI what to do Territory Behavior –aggressiveness –rules of engagement –inhibitions Encounter logic = The transitioning of AI squads from one task to another

FightCoverFlee

The Control Stack Squad Task Encounter Logic AI engineers, AI designers Mission designers Individual

Halo 2: The Imperative Method

The Imperative Method < 75% alive? < 25% alive? Give the designers an FSM construction tool

Problems with the Imperative Method

Explicit transitions n 2 complexity Generator 2Generator 3 Generator 1

Halo 3: The Declarative Method

But first, heres a refresher

Imperative const char *lol_search(const char *buff, long len) { for (short i= 0; i < len-2; i++) { if (buff[i]==L && buff[i+1]=O) { short i2=i+2; while (i2<len-1 && buff[i2]=O) { i2++; } if (buff[i2]==L) { return &buff[i];// yes!!! } return NULL; }

Declarative LO+L

The Declarative Method For us: Enumerate tasks that need doing in the environment Let the system figure out who should perform them

The Declarative Method Similar to affordances

The Declarative Method Tasks have structure Relative priorities –The most important thing is to guard the door, but if you can, also guard the hallway Are made up of sub-tasks –Guarding the hallway means guarding the front, the middle and the rear of the hallway. Finite capacity –Guarding the rear of the hallway is a three-man job

Behavior Trees (Handling Complexity in the Halo 2 AI, GDC 2005) Takeaways: 1.Prioritized-list decision scheme 2.Behaviors are self- describing We are not making a single choice. We are finding a distribution across all choices. melee shoot grenade uncover pursue cover sleep fight search hide idle root

Task Trees? Generator 2Generator 3 Generator 1

Task Trees? 24 guys root fallback forward laststand fallback forward laststand fallback forward laststand generator 2 generator 3 generator

Halo 3 AI Objective Trees The structure: A Tree of Prioritized Tasks Tasks are self-describing –priority –activation script-fragments –capacities The Algorithm: Pour squads in at the top Allow them to filter down to the most important tasks to be filling RIGHT NOW Basically, its a plinko machine.

The Dynamic Plinko Machine Tasks turn themselves on and off Squads pulled UP, on activation of a higher- priority task Squads pushed DOWN, on deactivation of the task theyre in

g3 laststand 3 Generators Revisited g1_group g1 alivemax 10 root g1 forward >75% g1 fallback >50% g2_group g2 alivemax 10 g2 fallback >50% g2 forward >75% g3_group g3 alivemax10 g3 fallback >50% g3 forward >75% g1 laststand g2 laststand g1_group g1 alivemax 10 root g2_group g2 alivemax 10 g2 fallback >50% g2 forward >75% g3_group g3 alivemax10 g1 forward >75% g1 fallback >50% g1 laststand g2 laststand g3 fallback >50% g3 forward >75% g3 laststand

priority task name condition other stuff runtime feedback

The Algorithm

Consider a subtree fragment Determine which children are active –Squads in inactive tasks assigned back up to parent Consider top priority group Collect squads to attempt to distribute –Squads currently in parent –Squads in lower-priority tasks Distribute Squads Recurse for children in top priority- group Iterate to next priority group

Squad Distribution Formally, we have set S of n squads set T of m tasks Now, find a mapping Such that: 1.Task-Capacity Constraints are respected 2.Cost function H(F) is minimized

Squad Distribution 1.Respect Task-Capacity Constraints # guys assigned to task t capacity(t) (BTW, this is called bin-packing. And its NP-Hard.)

Squad Distribution 2.Minimize cost function H(F)

Squad Distribution 2.Minimize cost function H(F) H(F) gives us a basis for choosing one distribution over another H(F) allows us to weigh competing concerns

Squad Distribution 2.Minimize cost function H(F) A class of cost functions: We use

A Greedy Approach while (S is not empty) find pair (s,t) that give the minimum H(s,t) for all S x T (where adding s to t would not exceed ts capacity) if (s,t) assign(s, t) capacity(t) = capacity(t) - size(s) S = S – s else end

Refinements

Filters Particular tasks only available to particular kinds of guys E.g. –Must be of character type X –Must be in vehicles –Must NOT be in vehicles –Snipers Filters Specify occupation conditions (as opposed to activation conditions) Trivially implemented as an inf return value from H(s, t) Helpful for the spice

Further Task Refinements Activation Latch on Latch off / exhaustion Exhaustion Death count Living count Assignment One-time assignment

Case Studies

Case Study #1: Leadership Want to have leaders and followers Brute and three grunts Brute Chieftan and brute pack Gameplay Leaders provide structure to encounter Leader death breaks followers

Case Study #1: Leadership Two Parts: 1.Leadership-based filters –Core task: leader filter –Peripheral tasks: NO leader filter 2.Task broken state –Task does not allow redistribution in or out while broken –NPCs have broken behaviors

Case Study #2: Player pickup Vehicle encounters are not fun without a vehicle Gameplay When the player needs a vehicle, allies go pick him up

Case Study #2: Player pickup Implementation: one dedicated player-pickup task per encounter Three parts: 1.vehicle filter 2.player_needs_vehicle() script function 3.driver player_pickup behavior And thats it!

Summaries

Badness Summary Requires designer training Sometimes awkward relationship between scripting system and Objectives Tying together allied and enemy fronts was complicated. The squad wasnt always the best level at which to do the bucketing –e.g. give a guy a sniper rifle... shouldnt he then be allowed to occupy a sniper task?

Production Summary The Goal: provide a powerful tool for designers to control strategy-level decision-making for a large group of characters Flexible enough to incorporate plenty of designer- requested features / modifications Great for Prototyping –became much more complicated as we neared shippable encounter state One-stop-shop for encounter construction Design of the system driven from the UI outwards

Technique Summary Declarative authoring –less direct control –less flexibility –more concise representation –greater manageability –better game

is hiring! Artists, engineers, designers … … and an AI Lead :( (Visit for all available positions.)