Classic Game AI has something to do with scripting, a lot to do with state machines, even more to do with map analysis, and not a lot to do with AI field.
It's not that we can't get good behavior out of machine learning techniques. It's that it may not be the behavior we want for the game experience we are looking for.Jacob Schrum
Doom 1 (1993)
Age of Empires (1997)
Half-life (1998)
Starcraft (1998)
Unreal Tournament (1999)
Quake III (1999)
Black and White (2001)
Halo 2 (2004)
F.E.A.R. (2005)
XCOM: Enemy Unknown (2012)
ARMA 3 (2013)
DOTA 2 (2013)
Starcraft II (2013)
Game AI features and limits
Game AI properties
1 | // Doom 2: find player to chase |
2 | void A_Look (mobj_t* actor) { |
3 | mobj_t* targ; |
4 | actor->threshold = 0; // any shot will wake up |
5 | targ = actor->subsector->sector->soundtarget; |
6 | if (actor->flags & MF_AMBUSH){ |
7 | if (P_CheckSight (actor, actor->target)) |
8 | goto seeyou; |
9 | } else goto seeyou; |
10 | |
11 | if (!P_LookForPlayers (actor, false)) return; |
12 | // go into chase state |
13 | seeyou: |
14 | P_ChasePlayer(); |
15 | } |
State | Transition | Condition |
---|---|---|
Wander the maze | Chase pacman | Pacman spotted |
Wander the maze | Flee Pacman | PowerPellet eaten |
Chase Pacman | Wander the maze | Pacman lost |
Chase Pacman | Flee Pacman | PowerPellet eaten |
Flee Pacman | Return to Base | Eaten by Pacman |
Flee Pacman | Wander the maze | PowerPellet expired |
Return to Base | Wander the maze | Central base reached |
Node Type | Success | Failure | Running |
---|---|---|---|
Selector | If one child succeeds | If all children fail | If one child is running |
Sequence | If all children succeed | If one child fails | If one child is running |
Decorator | It depends | It depends | It depends |
Parallel | If N children succeed | If M-N children succeed | If all children are running |
Action | When completed | Upon an error | During completion |
Condition | If true | If false | Never |
Soldier | Assassin | Rat |
---|---|---|
Attack | Attack | Animate |
AttackCrouch | InspectDisturbance | Idle |
SuppressionFire | LookAtDisturbance | GotoNode |
FlushOutWithGrenade | AttackMeleeUncloaked | |
AttackFromCover | TraverseBlockedDoor | |
BlindFireFromCover | AttackFromAmbush | |
ReloadCovered | AttackLungeUncloaked |
Main elements
Other features
Resource Control
Tech tree
Build order (opening)
Fog of war
Micromanagement
Rule | Condition | Command | Freq [ms] |
---|---|---|---|
AiRuleWorkerHarvest | Worker stopped | Order worker to harvest | 2 000 |
AiRuleRefreshHarvester | Worker reassigned | 20 000 | |
AiRuleScoutPatrol | Base is stable | Send scout patrol | 10 000 |
AiRuleRepair | Building Damaged | Repair | 10 000 |
AiRuleReturnBase | Stopped unit | Order return to base | 5 000 |
AiRuleMassiveAttack | Enough soldiers | Order massive attack | 1 000 |
AiRuleAddTasks | Tasks empty | Add tasks | 5 000 |
AiRuleBuildOneFarm | Not enough farms | Build farm | 10 000 |
AiRuleResourceProducer | Not enough resources | Build resource producer | 5 000 |
AiRuleProduce | Performing prod. task | 2 000 | |
AiRuleBuild | Performing build task | 2 000 | |
AiRuleUpgrade | Performing upg. task | 30 000 | |
AiRuleUnBlock | Blocked units | Move surrounding units | 3 000 |
All you had to do was follow the damn train!GTA, San Andreas