Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under...
Transcript of Introduction to AI Engine & Common Used AI Techniques Created by: Abdelrahman Al-Ogail Under...
Adaptive AI Engine for RTS GamesIntroduction to AI Engine & Common Used AI
Techniques
Created by: Abdelrahman Al-OgailUnder Supervision of:Dr. Ibrahim Fathy
Agenda
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)?
What’s Game AI?
Let the computer think
Goal of Game AI: Entertainment NOT perfection How that guy finds the right answer?
Deeper Blue Example
Why AI Engine
AIEngineAI
Engine
That’s our guy
Structure of AI Engine
Elements That Need AI in RTS Games
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
Elements That Need AI in RTS Games
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?
Elements That Need AI in RTS Games
Terrain Analysis (keep track of your enemy)
Opponent Modeling (know your enemy)
Resource Management (take the control)
Diplomacy Systems (always have allies)
Areas That Need Improvement in RTS AI
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
Areas That Need Improvement in RTS AI
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)
Common Used Techniques
Categories of Used Techniques: Decision Making Other Techniques▪ Data-Driven Techniques▪ Perception Techniques▪ Communication Techniques
Decision Making – Finite State Machine
When to use: to represent states
Decision Making – Fuzzy State Machine
When to use: to represent several states at the same time
Decision Making – Genetic Algorithms
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…)
Decision Making – Neural Networks
Rely on simulating human brain Used in:
Classification Opponent modeling
Decision Making – Artificial Life
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
Decision Making – Steering Behaviors
Simple rules that produces emergent behaviors
Boids research by Craig Reynolds
Used: To simulate real life In producing emergent
behavior Provide autonomies agents
Decision Making – Planning
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
Decision Making – Production Systems
As prolog Used techniques:
Forward changing Backward changing
Decision Making – Decision Trees
Complex IF-ELSE Statements represented as tree
Usage if games: Player modeling High level strategies
Other Techniques – Data Driven AI
Scripting Systems
Using an external resource (not coded) that controls the AI opponent
Advantage Add extendibility to the game
Other Techniques - Messaging
Supplies communication between game objects
Other Techniques – LBI Systems
LBI: Location Based Information Systems
It’s a perception technique
Keeps track of the world attributes
Common techniques: Influence Maps Terrain Analysis Smart Terrain
Other Techniques – LBI Systems
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)
What’s new?
Future of wars is going to be more robotic Sharing & validating plans
MIT asks for researches in this area (10-2008)
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 6-2008