Introduction To My Graduation Project

3,259 views

Published on

This presentation introduces my graduation project

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,259
On SlideShare
0
From Embeds
0
Number of Embeds
44
Actions
Shares
0
Downloads
14
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction To My Graduation Project

  1. 1. Adaptive AI Engine for RTS Games<br />Introduction to the Project<br />AbdelRahmanAl Ogail<br />Omar Khaled Enayet<br />Under the Supervision Of : Dr. Ibrahim Fathy Moawad<br />
  2. 2. Agenda<br />What’s Game AI?<br />Why AI Engine?<br />Structure of AI Engine<br />What are RTS Games?<br />Elements That Need AI in RTS Games<br />Areas That Need Improvement in RTS AI<br />Common Used Techniques in AI Engine<br />So why working on that project (what’s new)?<br />
  3. 3. Agenda<br />Why is AI Development slow in RTS Games.<br />AI Areas needing more research in RTS Games.<br />Latest Research<br />Research Papers and Theses.<br />Introduction<br />The Papers : Intro<br />Case-Based Planning.<br />Reinforcement Learning.<br />Genetic Algorithms.<br />Hybrid Approaches.<br />Opponent Modeling Approaches.<br />Misc. Approaches.<br />
  4. 4. What’s Game AI?<br />Lets the computer think<br />Goal of Game AI: <br />Entertainment NOT perfection<br />How that guy finds the right answer?<br />Deeper Blue Example<br />
  5. 5. Why AI Engine<br />AI<br />Engine<br />That’s our guy<br />
  6. 6. Structure of AI Engine<br />
  7. 7. What are RTS Games ?<br />Real-Time-Strategy (RTS) games can be viewed as simplified military simulations. Several players struggle over resources scattered over a terrain by setting up an economy, building armies, and guiding them into battle in real-time.<br />
  8. 8. Elements That Need AI in RTS Games<br />Workers (peons, gatherers)<br />Individual units (soldiers, tanks…)<br />Town building:<br />how to build my town to max. benefits<br />Pathfinding<br />What’s the best (not shortest) way to get from A to B<br />
  9. 9. Elements That Need AI in RTS Games<br />Low level strategies<br />Which pathfinding algorithm I should use?<br />Medium level strategies<br />How to achieve high level strategies?<br />High level strategies<br />What are my goals?<br />
  10. 10. Elements That Need AI in RTS Games<br />Terrain Analysis (keep track of your enemy)<br />Opponent Modeling (know your enemy)<br />Resource Management (take the control)<br />Diplomacy Systems (always have allies)<br />
  11. 11. Areas That Need Improvement in RTS AI<br />Determine when AI element is stuck<br />Opponent modeling<br />More strategies less tactics<br />Construct consistent army (solders, tanks, planes)<br />Think about support lines<br />How to retreat<br />Setup and detect ambushes<br />
  12. 12. Areas That Need Improvement in RTS AI<br />Learning<br />Some areas of learning:<br />AI opponent get in the same trap repeatedly<br />Know safe map locations and get away from kill zones<br />Know how human player attacks and which units he favors<br />Does the player rushes ?<br />Does the player rely on units that require certain resources?<br />Does he frequently build a number of critical structures in a poorly defensive place?<br />Are his attacks balanced? ( rock, paper, scissors example)<br />
  13. 13. Common Used Techniques<br />Categories of Used Techniques:<br />Decision Making<br />Other Techniques<br />Data-Driven Techniques<br />Perception Techniques<br />Communication Techniques <br />
  14. 14. Decision Making – Finite State Machine<br />When to use: to represent states<br />
  15. 15. Decision Making – Fuzzy State Machine<br />When to use: to represent several states at the same time<br />
  16. 16. Decision Making – Genetic Algorithms<br />Used to find best solutions to a given problems<br />Genetic process rely on the idea of reproduction<br />Example of using: <br />finding best optimal # of peons working in each areas (area = building, money, wood, stone…)<br />
  17. 17. Decision Making – Neural Networks<br />Rely on simulating human brain<br />Used in:<br />Classification<br />Opponent modeling<br />
  18. 18. Decision Making – Artificial Life<br />ALife is about searching to find “governing principles” to the life<br />Newton theorem<br />Alife Techniques:<br />Cellular Automata<br />Steering Behaviors<br />Add the creativity to the AI opponent<br />
  19. 19. Decision Making – Steering Behaviors<br />Simple rules that produces emergent behaviors<br />Boids research by<br />Craig Reynolds<br />Used:<br />To simulate real life<br />In producing emergent behavior<br />Provide autonomies agents <br />
  20. 20. Decision Making – Planning<br />Planning is, deciding upon a course of action before acting<br />Usage in games:<br />Pathfinding algorithms<br />Set plans to high level strategies in RTS Games<br />anticipating ambushes<br />Some of Planning Techniques:<br />A*, Mean & Analysis, Patch Recalculation, Minimax<br />
  21. 21. Decision Making – Production Systems<br />As prolog<br />Used techniques:<br />Forward changing<br />Backward changing <br />
  22. 22. Decision Making – Decision Trees<br />Complex IF-ELSE Statements represented as tree<br />Usage if games:<br />Player modeling<br />High level strategies<br />
  23. 23. Other Techniques – Data Driven AI<br />Scripting Systems<br />Using an external resource (not coded) that controls the AI opponent<br />Advantage<br />Add extendibility to the game<br />
  24. 24. Other Techniques - Messaging<br />Supplies communication between game objects<br />
  25. 25. Other Techniques – LBI Systems<br />LBI: Location Based Information Systems<br />It’s a perception technique<br />Keeps track of the world attributes<br />Common techniques:<br />Influence Maps<br />Terrain Analysis<br />Smart Terrain<br />
  26. 26. Other Techniques – LBI Systems<br />Usage in games:<br />Helps with obstacle avoidance<br />Detecting player, resources places<br />Danger specification (keep track of kill zones)<br />Discover critical points in the world (as bridges)<br />
  27. 27. What’s new?<br />Future of wars is going to be more robotic<br />Sharing & validating plans<br />MIT asks for researches in this area (10-2008)<br />Alex J.C. said: “there’s no real learning and adaptation in commercial games”<br />Alex J.C. is key speaker in GDC and owner of aiGameDev<br />Researches in this area is so active!<br />Papers Range from 2003-2009<br />
  28. 28. Why is AI Development slow in RTS Games ?<br />RTS game worlds feature many objects, imperfect information, micro actions, and fast-paced action. By contrast, World–class AI players mostly exist for slow– paced, turn–based, perfect information games in which the majority of moves have global consequences and planning abilities therefore can be outsmarted by mere enumeration.<br />Market dictated AI resource limitations. Up to now popular RTS games have been released solely by game companies who naturally are interested in maximizing their profit. Because graphics is driving games sales and companies strive for large market penetration only about 15% of the CPU time and memory is currently allocated for AI tasks. On the positive side, as graphics hardware is getting faster and memory getting cheaper, this percentage is likely to increase – provided game designers stop making RTS game worlds more realistic.<br />Lack of AI competition. In classic two–player games tough competition among programmers has driven AI research to unmatched heights. Currently, however, there is no such competition among real–time AI researchers in games other than computer soccer. The considerable man–power needed for designing and implementing RTS games and the reluctance of game companies to incorporate AI APIs in their products are big obstacles to AI competition in RTS games.<br />
  29. 29. AI Areas needing more research<br />Adversarial real–time planning. In fine–grained realistic simulations, agents cannot afford to think in terms of micro actions such as “move one step North”. Instead, abstractions of the world state have to be found that allow AI programs to conduct forward searches in a manageable abstract space and to translate found solutions back into action sequences in the original state space. Because the environment is also dynamic, hostile, and smart — adversarial real–time planning approaches need to be investigated.<br />Decision making under uncertainty. Initially, players are not aware of the enemies’ base locations and intentions. It is necessary to gather intelligence by sending out scouts and to draw conclusions to adapt. If no data about opponent locations and actions is available yet, plausible hypotheses have to be formed and acted upon.<br />Opponent modeling, learning. One of the biggest shortcomings of current (RTS) game AI systems is their inability to learn quickly. Human players only need a couple of games to spot opponents’ weaknesses and to exploit them in future games. New efficient machine learning techniques have to be developed to tackle these important problems.<br />
  30. 30. AI Areas needing more research (2)<br />Spatial and temporal reasoning. Static and dynamic terrain analysis as well as understanding temporal relations of actions is of utmost importance in RTS games — and yet, current game AI programs largely ignore these issues and fall victim to simple common–sense reasoning .<br />Resource management. Players start the game by gathering local resources to build up defenses and attack forces, to upgrade weaponry, and to climb up the technology tree. At any given time the players have to balance the resources they spend in each category. For instance, a player who chooses to invest too many resources into upgrades, will become prone to attacks because of an insufficient number of units. Proper resource management is therefore a vital part of any successful strategy<br />
  31. 31. AI Areas needing more research (3)<br />Collaboration. In RTS games groups of players can join forces and intelligence. How to coordinate actions effectively by communication among the parties is a challenging research problem. For instance, in case of mixed human/AI teams, the AI player often behaves awkwardly because it does not monitor the human’s actions, cannot infer the human’s intentions, and fails to synchronize attacks.<br />
  32. 32. Latest Research<br />
  33. 33. Latest Research : Intro.<br />Current Implementation of RTS Games applies extensive usage of FSM that makes them highly predictable.<br />Adaptation is achieved either through Learning or planning or a mixture of both<br />Planning is beginning to appear in commercial games such as DemiGod and Latest Total War Game.<br />Learning has limited success so far.<br />Developers are experimenting on replacing the ordinary decision making systems (FSM, FUSM, Scripting, Decision Trees, and Markov Systems) with Learning Techniques<br />
  34. 34. Latest Research : The Papers<br />More than 30 papers/theses talk about Planning and Learning in RTS Games<br />The Major 3 approaches to AI Research in RTS-GAMES concerning Learning and Planning are Case-Based Planning, Reinforcement Learning with its different techniques and Genetic Algorithms. Some Papers use a Hybrid approach of these techniques. Others use other planning algorithms like PDDL or opponent modeling techniques and other misc. techniques.<br />3 papers encourage the research in this field.<br />9 papers use Case-Based Planning Approach from 2003-2009,1 uses a Hybrid CBR/GA approach in 2008,1 uses a Hybrid CBR/RL approach in 2007<br />10 papers use Reinforcement Learning with its different forms (Monte-Carlo, Dynamic Scripting and TD-Learning),1 uses TD-Learning with GA,1 uses Dynamic Scripting with GA<br />3 Papers use Genetic Algorithms.<br />3 Papers apply opponent modeling techniques.<br />
  35. 35. Encouraging Research : Papers<br />RTS Games and Real–Time AI Research – 2003<br />RTS Gaines A New AI Research Challenge – 2003<br />Call for AI Research in RTS Games - 2004<br />
  36. 36. Case-Based Planning<br />Case-based planning is the reuse of past successful plans in order to solve new planning problems.<br />It’s an application of Case-Based Reasoning in planning.<br />
  37. 37. Case-Based Planning : Papers<br />The David Aha Research Thread :<br />On the Role of Explanation for Hierarchical Case-Based Planning in RTS Games - after 2004<br />Learning to Win - Case-Based Plan Selection in a RTS Game- 2005<br />Defeating Novel Opponents in a Real-Time Strategy Game – 2005<br />The Santiago Ontanon Research Thread :<br />Case-Based Planning and Execution for RTS Games – 2007<br />Learning from Human Demonstrations for Real-Time Case-Based Planning – 2008<br />On-Line Case-Based Plan Adaptation for RTS Games- 2008<br />Situation Assessment for Plan Retrieval in RTS Games – 2009<br />Other Papers<br />Case-based plan recognition for RTS games - after 2003<br />Mining Replays of RTS Games to learn player strategies – 2007<br />
  38. 38. Reinforcement Learning<br />It is a sub-area of machine learning concerned with how an agent ought to take actions in an environment so as to maximize some notion of long-term reward.<br />Reinforcement learning differs from the supervised learning problem in that correct input/output pairs are never presented, nor sub-optimal actions explicitly corrected.<br />Further, there is a focus on on-line performance, which involves finding a balance between exploration and exploitation.<br />
  39. 39. Reinforcement Learning : Papers<br />Dynamic Scripting :<br />Goal-Directed Hierarchical Dynamic Scripting for RTS Games – 2006<br />Automatically Acquiring Domain Knowledge For Adaptive Game AI Using Evolutionary Learning – 2008<br />Monte-Carlo Planning :<br />UCT(Monte-Carlo) for Tactical Assault Battles in Real-Time Strategy Games. – 2003<br />Monte Carlo Planning in RTS Games - After 2004<br />Temporal-Difference Learning :<br />Learning Unit Values in Wargus Using Temporal Differences – 2005<br />Establishing an Evaluation Function for RTS games - After 2005<br />Dynamic Scripting VS Monte-Carlo Planning:<br />Adaptive reinforcement learning agents in RTS games – 2008<br />Hierarchical Reinforcement Learning<br />Hierarchical Reinforcement Learning in Computer Games - After 2006<br />Hierarchical Reinforcement Learning with Deictic repr. in a computer game- After 2006<br />
  40. 40. Genetic Algorithms<br />Genetic algorithms are a particular class of evolutionary algorithms (EA) that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover.<br />
  41. 41. Genetic Algorithms : Papers<br />Human-like Behavior in RTS Games – 2003<br />Co-evolving Real-Time Strategy Game Playing Influence Map Trees with genetic algorithms<br />Co-Evolution in Hierarchical AI for Strategy Games - after 2004<br />
  42. 42. Hybrid Approaches : Papers<br />Genetic Algorithms + Dynamic Scripting :<br />Improving Adaptive Game AI With Evolutionary Learning – 2004<br />Automatically Acquiring Domain Knowledge For Adaptive Game AI using Evolutionary Learning – 2005<br />Genetic Algorithms + TD-Learning :<br />Neural Networks in RTS AI – 2001<br />Genetic Algorithms + Case-Based Planning :<br />Stochastic Plan Optimization in Real-Time Strategy Games – 2008<br />Case-Based Reasoning + Reinforcement Learning :<br />Transfer Learning in Real-Time Strategy Games Using Hybrid CBR-RL - 2007<br />
  43. 43. Opponent Modeling : Papers<br />Hierarchical Opponent Models for Real-Time Strategy Games – 2007<br />Opponent modeling in real-time strategy games - after 2007<br />Design of Autonomous Systems - Learning Adaptive playing a RTS game - 2009<br />
  44. 44. Misc. Approaches : Papers<br />Supervised Learning : <br />Player Adaptive Cooperative Artificial Intelligence for RTS Games – 2007<br />PDDL :<br />A First Look at Build-Order Optimization in RTS games - after 2006<br />Finite-State Machines :<br />SORTS - A Human-Level Approach to Real-Time Strategy AI – 2007<br />Others :<br />Real-time challenge balance in an RTS game using rtNEAT – 2008<br />AI Techniques in RTS Games -September 2006<br />
  45. 45. The End<br />Thank You !<br />
  46. 46. References<br />Books :<br />AI Game Engine Programming -2009<br />Artificial Intelligence for Games – 2009<br />Papers:<br />RTS Games and Real–Time AI Research –Michael Buro & Timothy M. Furtak - 2003<br />Call for AI Research in RTS Games - Michael Buro – 2004<br />Web Resources :<br />AIGameDev Forums.<br />GameDev.Net Forums.<br />Wikipedia.<br />Others<br />

×