Strategic Planning For Unreal Tournament© Bots


Published on

Strategic Planning For Unreal Tournament

Published in: Education, Technology, Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Strategic Planning For Unreal Tournament© Bots

  1. 1. Strategic Planning for Unreal Tournament© Bots H é ctor Mu ñ oz-Avila Todd Fisher Department of Computer Science and Engineering Lehigh University USA
  2. 2. Overview <ul><li>Motivation </li></ul><ul><li>Unreal Tournament © (UT) </li></ul><ul><li>HTN Planning </li></ul><ul><ul><li>Why HTN Planning </li></ul></ul><ul><li>Related Work </li></ul><ul><li>HTN Encodings of UT Bot Strategies </li></ul><ul><li>Built-in predicates and Java Bots </li></ul><ul><li>Final Remarks </li></ul>
  3. 3. Motivation # 1: Test Environment for Reactive Planning <ul><li>Some research issues on reactive environments… </li></ul><ul><li>Plan generation versus plan execution </li></ul><ul><li>Case-Based Planning </li></ul><ul><ul><li>Fast retrieval of adequate plans </li></ul></ul><ul><ul><li>Real-time plan adaptation </li></ul></ul><ul><li>Learning </li></ul><ul><ul><li>Learning retrieval criteria </li></ul></ul><ul><ul><li>Learning domain knowledge </li></ul></ul><ul><ul><li>… </li></ul></ul>Lack of adequate testing environment
  4. 4. Motivation # 2: Declarative Encoding of Gaming Strategies <ul><li>Many games provide scripting languages (e.g., Lua scripting language) </li></ul><ul><li>Games can be useful to teach programming concepts (e.g., IBM’s robocode) </li></ul><ul><li>Is it possible to create a declarative language for encoding gaming strategies? </li></ul><ul><li>RBSs are an alternative (but can be messy) </li></ul><ul><li>How about for controlling teams of Bots ? </li></ul>Avatar controlled by a computer program
  5. 5. Unreal Tournament © <ul><li>Online FPS developed by Epic Games Inc. </li></ul><ul><li>Various gameplay modes including team deathmatch and capture the flag </li></ul><ul><li>Provides a client-server architecture for controlling bots </li></ul><ul><li>High-level script language: UnrealScript (Sweeney, 2004) </li></ul>
  6. 6. Hierarchical Task Network (HTN) Planning Principle: complex tasks are decomposed into simpler tasks. The goal is to decompose compound tasks into primitive tasks, which define actions changing the world. alternative methods Travel from Lehigh to NRL Travel(Lehigh,NRL) Fly(Newark, BWI) Travel(BWI, NRL) Travel(Lehigh,Newark Airport) Travel by car Enough money for gasoline Roads are passable Seats available Travel by plane Enough money for air fare available Drive(Lehigh, Newark Park) Bus(Newark Park,airport) Taxi(BWI, NRL)
  7. 7. Why HTN Planning? <ul><li>HTN planning is provable more expressive than STRIPS planning (Erol et al, 1994) </li></ul><ul><li>Hierarchical planning is natural in many domains </li></ul><ul><li>Can be very fast! </li></ul>Tactical Strategic Theater CINC JCS / NCA Strategic National JTF e.g., military planning Operational
  8. 8. Related Work <ul><li>Hierarchical planning can be useful in games (Wallace, 2003) </li></ul><ul><li>Bridge Baron game uses HTN ideas (Smith et al. , 1998). </li></ul><ul><li>Games have the potential to become testbed for different AI algorithms (Laird & van Lent, 1999). </li></ul><ul><li>Soar Bots for UT using the Soar Architecture (Laird & Duchim, 2000) </li></ul><ul><li>Tielt: testbed for investigating and evaluating learning techniques (Aha & Molineaux , 2004) </li></ul>
  9. 9. Client-Server Architecture for UT Bots <ul><li>The UT server provides sensory information about events in the UT world and controls all the gameplay events. </li></ul><ul><li>Event-driven: The client program uses this information to decide commands controlling the behavior of a Bot and passes them to the server. </li></ul><ul><li>Two types of messages : </li></ul><ul><ul><li>Asynchronous: special events </li></ul></ul><ul><ul><li>Synchronous: regular intervals </li></ul></ul><ul><li>Variants: Enhanced server (UC/ISI), Java Bots (CMU), Soar Bots (U. of Michigan). </li></ul>
  10. 10. HTN for Controlling Team of Bots <ul><li>Idea : </li></ul><ul><li>Use methods to encode gaming strategies </li></ul><ul><li>Use operators to encode gaming actions </li></ul>A B C UT task : Domination Strategy : secure most locations UT action : move Bot1 to location B
  11. 11. Technical Difficulties and Solutions Solution to 1 : use built-in predicates to represent conditions Solution to 2 : use Java Bots to represent actions (event-driven) UT task : Domination Strategy : secure most locations UT action : move Bot1 to location B <ul><li>Declarative language for expressing conditions </li></ul>2. Dealing with contingencies while Bots are executing actions
  12. 12. Example A B C HTN Method Head : Domination Preconditions : LocsGeographTogether(P,RP) Divide3Groups(T1,T2,T3) Subtasks: CoverLocations(T1,P) PatrolLocations (T2,P) HarrassLocations(T3,RP) The HTNs are represented in XML P RP
  13. 13. Strategy Change vs. Strategy Modification <ul><li>We are exploring 2 alternatives: </li></ul><ul><ul><li>Select alternative strategy when similarity of current strategy falls below a certain threshold </li></ul></ul><ul><ul><li>Modify strategy using plan adaptation techniques </li></ul></ul>
  14. 14. On-going/Short-Term Future Directions <ul><li>Selection of alternative strategy modification versus strategy modification </li></ul><ul><li>Support the Tielt testbed: </li></ul><ul><ul><li>Use HTNs and process models (TMKL) to encode game model </li></ul></ul><ul><ul><li>Learn conditions for retrieving strategies </li></ul></ul>
  15. 15. Final Remarks <ul><li>Our approach can be used to accomplish two seemingly contradictory goals: </li></ul><ul><ul><li>The Bot needs to react quickly in a highly dynamic environment. </li></ul></ul><ul><ul><li>The Bot must contribute to the grand strategy to win the game. </li></ul></ul><ul><li>A grand strategy is laid out in the HTNs and event-driven programming allows the Bots to react in highly dynamic environments while contributing to the grand task. </li></ul>