Hierarchical Plan Representations for Encoding Strategic Game AI Hai Hoang Stephen Lee-Urban Héctor Muñoz-Avila Lehigh University

Slides:



Advertisements
Similar presentations
In the name of God An Application of Planning An Application of PlanningJSHOP BY: M. Eftekhari and G. Yaghoobi.
Advertisements

OntoPlan: Knowledge Fusion Using Semantic Web Ontologies Héctor Muñoz-Avila Jeff Heflin.
Integrating Architecture Michael van Lent Institute for Creative Technology University of Southern California.
Project What is a project A temporary endeavor undertaken to create a unique product, service or result.
Jenkins — Modular Perception and Control Brown Computer — ROUGH DRAFT ( ) 1 Workshop Introduction: Modular Perception.
Using UML, Patterns, and Java Object-Oriented Software Engineering Royce’s Methodology Chapter 16, Royce’ Methodology.
Automated Planning & Computer Games: Perspectives and Applications Hector Munoz-Avila.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
© Copyright 2011 John Wiley & Sons, Inc.
TEXAS A&M UNIVERSITY AND THE UNIVERSITY OF TEXAS AT AUSTIN Army Digitization Research Initiative Dr. Richard A. Volz (Computer Science) Dr. Tom Ioerger.
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
1 Planning. R. Dearden 2007/8 Exam Format  4 questions You must do all questions There is choice within some of the questions  Learning Outcomes: 1.Explain.
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
Tcl Agent : A flexible and secure mobile-agent system Paper by Robert S. Gray Dartmouth College Presented by Vipul Sawhney University of Pennsylvania.
Automated Planning and HTNs Planning – A brief intro Planning – A brief intro Classical Planning – The STRIPS Language Classical Planning – The STRIPS.
Course Instructor: Aisha Azeem
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
What is Software Architecture?
Software Engineering Muhammad Fahad Khan
The Design Discipline.
Chapter 2: Approaches to System Development
1 CSE 2102 CSE 2102 CSE 2102: Introduction to Software Engineering Ch9: Software Engineering Tools and Environments.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
1 CMPT 275 High Level Design Phase Architecture. Janice Regan, Objectives of Design  The design phase takes the results of the requirements analysis.
(Classical) AI Planning. Some Examples Route search: Find a route between Lehigh University and the Naval Research Laboratory Project management: Construct.
Reinforcement Learning and Markov Decision Processes: A Quick Introduction Hector Munoz-Avila Stephen Lee-Urban
Architectural Design portions ©Ian Sommerville 1995 Establishing the overall structure of a software system.
Strategic Planning for Unreal Tournament© Bots Héctor Muñoz-Avila Todd Fisher Department of Computer Science and Engineering Lehigh University USA Héctor.
DEVS Namespace for Interoperable DEVS/SOA
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
OBJECT ORIENTED SYSTEM ANALYSIS AND DESIGN. COURSE OUTLINE The world of the Information Systems Analyst Approaches to System Development The Analyst as.
RECAP CSE 348 AI Game Programming Héctor Muñoz-Avila.
Review Meeting – INSEAD, Fontainebleau – 30 March L 2 C Learning to Collaborate Knowledge Management Tools Development The L2C Knowledge Community.
RECAP CSE 348 AI Game Programming Héctor Muñoz-Avila.
Architectural Design lecture 10. Topics covered Architectural design decisions System organisation Control styles Reference architectures.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 10Slide 1 Architectural Design l Establishing the overall structure of a software system.
AI and Computer Games (informational session) Lecture by: Dustin Dannenhauer Professor Héctor Muñoz-Avila Computer Science and Eng.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
1 Integrating Learning in Interactive Gaming Simulators David W. Aha 1 & Matthew Molineaux 2 1 Intelligent Decision Aids Group Navy Center for Applied.
Class 5 Architecture-Based Self-Healing Systems David Garlan Carnegie Mellon University.
Hierarchical Plan Representations for Encoding Strategic Game AI Hai Hoang Stephen Lee-Urban Héctor Muñoz-Avila Lehigh University
1 Software Development Software Engineering is the study of the techniques and theory that support the development of high-quality software The focus is.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
AI and Game Programming Unreal Tournament Project.
CSC 480 Software Engineering Lecture 18 Nov 6, 2002.
9 Systems Analysis and Design in a Changing World, Fourth Edition.
The Software Development Process
Chapter 4 Decision Support System & Artificial Intelligence.
CSC480 Software Engineering Lecture 10 September 25, 2002.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Design Reuse Earlier we have covered the re-usable Architectural Styles as design patterns for High-Level Design. At mid-level and low-level, design patterns.
1 Software Design Lecture What’s Design It’s a representation of something that is to be built. i.e. design  implementation.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
Specializing Project 06/07 HTN Presentation for MS1 By Glenn Wissing.
(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)
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
Systems Analyst (Module V) Ashima Wadhwa. The Systems Analyst - A Key Resource Many organizations consider information systems and computer applications.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
Knowledge Engineering. Review- Expert System 3 Knowledge Engineering The process of building an expert system: 1.The knowledge engineer establishes a.
Slide 1 Chapter 8 Architectural Design. Slide 2 Topics covered l System structuring l Control models l Modular decomposition l Domain-specific architectures.
Introduction to Software Engineering 1. Software Engineering Failures – Complexity – Change 2. What is Software Engineering? – Using engineering approaches.
1 Distributed Systems Architectures Distributed object architectures Reference: ©Ian Sommerville 2000 Software Engineering, 6th edition.
Team Member AI in an FPS and Goal Oriented Action Planning.
VBattle: A new Framework to Simulate Medium-Scale Battles in Individual-per- Individual Basis L. Peña, J. M. Peña y S. Ossowski CIG – 2009 (Milan)
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.
Object-Oriented Software Engineering Using UML, Patterns, and Java,
CO Games Development 2 Week 19 Extensions to Finite State Machines
Some Additional Notes about GOAP
Presentation transcript:

Hierarchical Plan Representations for Encoding Strategic Game AI Hai Hoang Stephen Lee-Urban Héctor Muñoz-Avila Lehigh University

Outline Motivation Related Work Background  Unreal Tournament © (UT)  Hierarchical task Network (HTN) Planning Encoding Strategic Game AI in HTNs  Coordinating teams of UT Bots using HTNs  Video Using Processes-Based Languages to Encode HTNs Final Remarks  Future work

Motivation: FSM vs. Planning Planning Operators Patrol  Preconditions: No Monster  Effects: patrolled Fight  Preconditions: Monster in sight  Effects: No Monster PatrolFight Monster In Sight No Monster FSM: A resulting plan: Patrol patrolled Fight No Monster Monster in sight Neither is more powerful than the other one

But Planning Gives More Flexibility “Separates implementation from data” --- Orkin inference knowledge Planning Operators Patrol  Preconditions: No Monster  Effects: patrolled Fight  Preconditions: Monster in sight  Effects: No Monster … Many potential plans: PatrolFight PatrolFight PatrolFight PatrolFight PatrolFight …

Motivation: HTNs vs. GOAP Goal-Oriented Action Planning (Orkin, 2004, 2005)  characters can find alternate solutions to situations encountered in the game  characters can handle dependencies that may not have been thought of at development time HTNs provide distinct advantages over “STRIPS” planning, on which GOAP is based Key questions:  What kinds of Game AI knowledge to represent in HTNs?  How to reason in dynamic game environments?  How to encode the HTNs Goals & operators Game developers should Learn LISP?

Related Work: FPS and AI Games have the potential to become testbed for different AI algorithms (Laird & van Lent, 1999) FPS-based system developed and used for actual training of military personnel (Laird & Duchim, 2000) Soar Bots for UT using the Soar Architecture (Laird & Duchim, 2000) GameBots: A group at USC-ISI and CMU jointly developed the Gamebot project to create an API for other clients to connect to the UT server.

Related Work: HTNs and Game AI Hierarchical planning can be useful in games (Wallace, 2003) Bridge Baron game uses HTN ideas (Smith et al., 1998). Hierarchical FSMs are an extension of FSMs in which states can expand into their own sub-FSMs (Houlette & Fu, 2003) HTNs used for dialog generation (Cavazza & Charles, 2005)

Unreal Tournament© Online FPS developed by Epic Games Inc. Various gameplay modes including team deathmatch and capture the flag Provides a client-server architecture for controlling bots High-level script language: UnrealScript (Sweeney, 2004)

Client-Server Architecture for UT Bots The UT server provides sensory information about events in the UT world and controls all the gameplay events. Event-driven: The client program uses this information to decide commands controlling the behavior of a Bot and passes them to the server. Two types of messages:  Asynchronous: special events  Synchronous: regular intervals Variants: Enhanced server (USC/ISI), Java Bots (CMU), Soar Bots (U. of Michigan).

Hierarchical Task Network (HTN) Planning Complex tasks are decomposed into simpler tasks. Seeks to decompose compound tasks into primitive tasks, which define actions changing the world The knowledge artifacts indicating how to decompose task into subtasks are called methods task t

Why HTN Planning (1)? HTN planning is provable more expressive than STRIPS planning (Erol et al, 1994) Even for those domains in which HTN representations can be translated into STRIPS representations, a much larger number of STRIPS operators is required to represent the HTN methods (Lotem & Nau, 2000) Fast planning through domain-configurable HTN planners (SHOP system)

Why HTN Planning (2)? Hierarchical planning is natural in many domains  Military planning Tactical Strategic Theater CINC JCS / NCA Strategic National JTF Operational

Application: UT Domination Games A number of fixed domination locations. When a team member steps into one of these locations, the status of the location changes to be under the control of his/her team. The team gets a point for every five seconds that each domination location remains under the control of that team. The game is won by the first team that gets a pre-specified amount of points.

Idea Use of hierarchical task network (HTN) planning techniques to laid out a grand strategy to accomplish gaming tasks Use standard event-driven programming allowing the bots to react in highly dynamic environments while contributing to the grand task UT task: Domination Strategy: secure most locations UT action: move Bot1 to location B

Technical Difficulties of using an HTN Planner (1) UT task: Domination Strategy: secure most locations UT action: move Bot1 to location B 1.Declarative language for expressing conditions 2. Dealing with contingencies while Bots are executing actions Solution to 1: use built- in predicates to represent conditions Solution to 2: use Java Bots to represent actions (event-driven)

Data Flow to generate HTNs (i.e., HTN Planning) task compound? Yes Select applicable method UT Server Method library Evaluate method’s preconditions Selected method’s subtasks No Execute action UT Bot …

Video

Empirical Results It is possible to encode strategies that coordinate teams of bots in FPS games using HTNs

Using Processes to Encode Game AI Think-Act Cycle Shoot SomethingPick up a HealthpackGo Somewhere Else Call Shoot Operator Ask Decision System: Where Do I Go? Ask Decision System: Where Do I Go? Call Pickup Operator

TIELT Project: Middleware between Games and AI Decision Systems Decision System Library Decision System Library Reasoning System Reasoning System Learning Module... Learning Module Reasoning System Reasoning System Learning Module... Learning Module Decision System Decision System Learning Module... Learning Module TIELT User TIELT’s Internal Communication Modules TIELT’s KB Editors TIELT’s KB Editors Selected/Developed Knowledge Bases Game Player(s) TIELT’s User Interface Evaluation Interface TIELT User Selected Game Engine Selected Game Engine Selected Decision System Selected Decision System Raw State Processed State DecisionAction Knowledge Base Libraries Knowledge Base Libraries Learned Knowledge (inspectable) Prediction Interface Coordination Interface Advice Interface Game Model Agent Description Game Interface Model Decision System Interface Model Experiment Methodology GIM DSIM GM AD EM Game Engine Library Game Engine Library Stratagus Full Spectrum Command EE2

Result: Processes can Be Translated into HTNs TIELTHTN Iterations (while)Recursion Iterations (for)Convert to while, recursion Tasks: preconditions and effectsMethods + operators If-elseIf-elseMethod FunctionsParameters of task (or call to external code, or Horn clause) Set-statement= command PrioritiesIf-then-else

Final Remarks HTNs can be used to model effective team strategies for Unreal Tournament  (UT) bots. A grand strategy is laid out by the HTNs and event- driven programming allows the bots to react in this highly dynamic environment while contributing to the grand task. Processes languages (e.g., TMKLs) can be translated into HTNs

Future Work Reinforcement learning to learn adequate task decomposition Case-based reasoning techniques to capture and reuse HTNs Experiment to measure performance of translated processes