Key Takeaways: AI Design
-
Game AI is not academic AI. The goal is not correctness or optimality; the goal is a specific experience in the player. A "smart" AI that the player cannot perceive is a failed AI. Readability beats cleverness.
-
The AI honesty principle rules everything. Damian Isla's rule from the Halo 2 AI talks: if it doesn't read on screen, it might as well not happen. Every internal state that affects the player must have an external sign — a bark, an animation, a posture, a UI cue. Invest in legibility before you invest in sophistication.
-
Finite state machines ship most games. Ninety percent of enemy AI in ninety percent of games is an FSM (often hierarchical). FSMs are predictable, debuggable, and cheap. Do not reach for fancier architectures until the FSM hits its real limit — state explosion around 10-15 states. Reach for hierarchical FSM, then behavior trees, then utility, in that order. Do not start at the top of the ladder.
-
Behavior trees win on composability. When you need designer-editable behavior, reusable subtrees, and hierarchical combat tactics, BTs beat FSMs. When you need tight moment-to-moment control, low tick cost, or simple enemies, FSMs beat BTs.
-
GOAP is legendary but rare. F.E.A.R.'s planner produced emergent behaviors like flanking by searching over action preconditions and effects. The industry did not standardize on GOAP because BTs got good enough, barks and telegraphs carried most of the "smart" perception, and planners are expensive to build, debug, and script. Learn from the lessons, not necessarily the architecture.
-
Perception is where feel lives. Sight cones, hearing radii, and last-known-position memory are the core perception primitives. Experienced designers over-invest here; beginners under-invest. Add alertness-modulated cones, peripheral vision, and memory decay to produce nuanced detection.
-
Show the player what the AI sees. Exclamation marks, awareness bars, light meters — the genre-specific cues that communicate enemy perception to the player are what make stealth games feel fair. Without the cue, detection feels like a cheat; with it, detection feels like an honest loss.
-
Navigation is A* over a navmesh; steering is the last mile. Global pathfinding gives the skeleton of movement; local steering (separation, alignment, cohesion, obstacle avoidance) gives it smoothness and crowd coherence. The doorway problem — multi-agent contention at narrow passages — will require explicit handling. Plan for it.
-
Group AI needs coordination. Role assignment (engager, flanker, support, caller), designated-leader tricks, and ring-combat rules (one or two attackers at a time) are how you make groups of enemies feel tactical instead of swarming. Without these, group combat feels random and unfair.
-
Allies are harder than enemies. An ally who misfires cannot die to solve the problem. Design allies as resource-providers (Elizabeth in BioShock Infinite) rather than autonomous combatants. Remove their collision with the player, remove their vulnerability, remove their ability to miss on resource delivery — trade tactical authenticity for reliability.
-
Telegraphing turns AI into conversation. Barks announce state; animation telegraphs announce intent; posture communicates mood. Every boss attack should have a readable windup. Every enemy response should have an audible acknowledgment. The difference between Dark Souls combat and unfair combat is the wind-up animation.
-
Difficulty should scale behavior, not just numbers. Flat HP/damage scaling produces tedium. Behavior scaling — more aggression, wider cones, new tactics, added enemy types — produces progression in challenge. Design difficulty as an AI dimension, not a post-hoc multiplier.
-
Cheating AI is fine — if it cheats toward experience. Civilization's Deity AI, Mario Kart's rubber-band, Dark Souls's player-favor hitboxes are all cheating, and all legitimate. The test is whether the cheat produces a better player experience. Cheats that harm the player (perfect-aim AI, input-reading fighters) feel dishonest and should be avoided.
-
Build the FSM. Build the perception. Build the barks. Playtest. Your progressive project's enemy this chapter is a five-state FSM with perception and navmesh follow. It will not feel perfect on the first pass. Iterate on the timing, the cues, and the telegraphs until a player can describe your enemy's behavior in one sentence. Legibility is the measurement.