










Pokémon series

OpenTTD

Heroes of M&M

Starcraft II




Triangulation

Shortest path tree

Min spanning tree

Planning graph



Final road network

// Doom 2: find player to chase
void A_Look (mobj_t* actor) {
mobj_t* targ;
actor->threshold = 0; // any shot will wake up
targ = actor->subsector->sector->soundtarget;
if (actor->flags & MF_AMBUSH){
if (P_CheckSight (actor, actor->target))
goto seeyou;
} else goto seeyou;
if (!P_LookForPlayers (actor, false)) return;
// go into chase state
seeyou:
P_ChasePlayer();
}

| State | Transition | Condition |
|---|---|---|
| Wander the maze | Chase pacman | Spot Pacman |
| Wander the maze | Flee Pacman | PowerPellet eaten |
| Chase Pacman | Wander the maze | Lose Pacman |
| Chase Pacman | Flee Pacman | PowerPellet eaten |
| Flee Pacman | Return to Base | Eaten by Pacman |
| Flee Pacman | Wander the maze | PowerPellet expires |
| Return to Base | Wander the maze | Reach Central base |




| 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 |




View Model
Physics Model
AI Model













| Soldier | Assassin | Rat |
|---|---|---|
| Attack | Attack | Animate |
| AttackCrouch | InspectDisturbance | Idle |
| SuppressionFire | LookAtDisturbance | GotoNode |
| SupressionFireFromCover | SurveyArea | UseSmartObjectNode |
| FlushOutWithGrenade | AttackMeleeUncloaked | |
| AttackFromCover | TraverseBlockedDoor | |
| BlindFireFromCover | AttackFromAmbush | |
| ReloadCovered | AttackLungeUncloaked |












| Rule | Condition | Command | Freq [ms] |
|---|---|---|---|
| AiRuleWorkerHarvest | Worker stopped | Order worker to harvest | 2 000 |
| AiRuleRefreshHarvester | Worker reassigned | 20 000 | |
| AiRuleScoutPatrol | Base is table | Send scout patrol | 10 000 |
| AiRuleRepair | Building Damaged | Repair | 10 000 |
| AiRuleReturnBase | Stopped unit | Order return 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 | 2 000 | |
| AiRuleExpand | Expanding | 30 000 | |
| AiRuleUnBlock | Blocked units | Move surrounding units | 3 000 |
Taking fire, need assistance!Counter-Strike