Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under Supervision of: Dr. Ibrahim Fathy
What’s Game AI? Why AI Engine? Structure of AI Engine Elements That Need AI in RTS Games Areas That Need Improvement in RTS AI Common Used Techniques in AI Engine So why working on that project (what’s new)?
Let the computer think Goal of Game AI: Entertainment NOT perfection How that guy finds the right answer? Deeper Blue Example
AI Engine AI Engine That’s our guy
Workers (peons, gatherers) Individual units (soldiers, tanks…) Town building: how to build my town to max. benefits Pathfinding What’s the best (not shortest) way to get from A to B
Low level strategies Which pathfinding algorithm I should use? Medium level strategies How to achieve high level strategies? High level strategies What are my goals?
Terrain Analysis (keep track of your enemy) Opponent Modeling (know your enemy) Resource Management (take the control) Diplomacy Systems (always have allies)
Determine when AI element is stuck Opponent modeling More strategies less tactics Construct consistent army (solders, tanks, planes) Think about support lines How to retreat Setup and detect ambushes
Learning Some areas of learning: ▪ AI opponent get in the same trap repeatedly ▪ Know safe map locations and get away from kill zones ▪ Know how human player attacks and which units he favors ▪ Does the player rushes ? ▪ Does the player rely on units that require certain resources? ▪ Does he frequently build a number of critical structures in a poorly defensive place? ▪ Are his attacks balanced? ( rock, paper, scissors example)
Categories of Used Techniques: Decision Making Other Techniques ▪ Data-Driven Techniques ▪ Perception Techniques ▪ Communication Techniques
When to use: to represent states
When to use: to represent several states at the same time
Used to find best solutions to a given problems Genetic Process Rely on the idea of reproduction Example of using: finding best optimal # of peons working in each areas (area = building, money, wood, stone…)
Rely on simulating human brain Used in: Classification Opponent modeling
ALife is about searching to find “governing principles” to the life Newton theorem Alife Techniques: Cellular Automata Steering Behaviors Add the creativity to the AI opponent
Simple rules that produces emergent behaviors Boids research by Craig Reynolds Used: To simulate real life In producing emergent behavior Provide autonomies agents
Planning is, deciding upon a course of action before acting Usage in games: Pathfinding algorithms Set plans to high level strategies in RTS Games anticipating ambushes Some of Planning Techniques: A*, Mean & Analysis, Patch Recalculation, Minimax
As prolog Used techniques: Forward changing Backward changing
Complex IF-ELSE Statements represented as tree Usage if games: Player modeling High level strategies
Scripting Systems Using an external resource (not coded) that controls the AI opponent Advantage Add extendibility to the game
Supplies communication between game objects
LBI: Location Based Information Systems It’s a perception technique Keeps track of the world attributes Common techniques: Influence Maps Terrain Analysis Smart Terrain
Usage in games: Helps with obstacle avoidance Detecting player, resources places Danger specification (keep track of kill zones) Discover critical points in the world (as bridges)
Future of wars is going to be more robotic Sharing & validating plans MIT asks for researches in this area ( ) Alex J.C. said: “there’s no real learning and adaptation in commercial games” Researches in this area is so active! One of the papers date