Quiz: AI Design
Fourteen questions covering the concepts, architectures, and practices of Chapter 27. Answers and explanations follow the question list. Do not skip to them until you've committed to an answer.
1. A grizzled studio lead looks over your enemy implementation and says, "It might be smart, but it doesn't read." What principle are they invoking?
a) Cost efficiency in CPU cycles per agent. b) The AI honesty principle: intelligence that the player cannot perceive might as well not exist. c) The need to use behavior trees over FSMs for complex enemies. d) The need for GOAP-style planning in modern shooters.
2. You are building the workhorse AI for a top-down action game with dozens of enemies on screen. Which architecture is the safest default?
a) GOAP, because it produces the most emergent behavior. b) Utility AI, because it allows emergent prioritization. c) Finite state machine (possibly hierarchical), because it is predictable, debuggable, and cheap per tick. d) A deep neural network trained on player footage.
3. In a behavior tree, a Sequence node runs its children in order. What causes the sequence to stop early?
a) Any child returns Running. b) Any child returns Failure. c) Any child returns Success (the sequence is an OR). d) The tree ticks three times without changing state.
4. State explosion in an FSM refers to:
a) An enemy's animations not matching its state. b) The growth of transition logic as a roughly quadratic function of state count, which becomes unmanageable past ~10-15 states. c) The exponential cost of ticking a large FSM every frame. d) The memory cost of storing many instances of an FSM in a scene.
5. Jeff Orkin's GDC paper on F.E.A.R.'s AI described an architecture based on:
a) Deep reinforcement learning. b) A hierarchical FSM with ~40 states. c) Goal-Oriented Action Planning — actions with preconditions and effects, searched at runtime to satisfy a goal. d) A utility AI with weighted scoring over cover points.
6. You are designing a stealth game. The player is reporting that being spotted by guards feels unfair — they get detected and can't figure out why. The most likely root cause is:
a) The vision cone is too large and should be reduced. b) The AI is too smart. c) There is no perception cue exposing the guard's awareness state to the player. d) The player is moving too loudly.
7. Last-known-position (LKP) memory is important because:
a) It reduces tick cost for the perception system. b) It allows the AI to continue engaging intelligently after losing sight of the target — producing the "search" behavior that makes stealth games feel like games rather than puzzles. c) It enables pathfinding through a navmesh. d) It prevents enemies from cheating.
8. Reynolds's steering behaviors (boids) are most commonly used for:
a) Plotting a global path through a navmesh. b) Solving the doorway problem. c) Adding frame-to-frame movement smoothness and crowd behavior on top of a pathfinding solution. d) Managing squad role assignment.
9. The "ring combat" rule — at most one or two enemies attacking the player at a time — is used in series like Batman: Arkham Asylum and Shadow of Mordor. The rule exists primarily because:
a) CPU cannot handle simultaneous enemy AI. b) Simultaneous melee attacks from a group are effectively unplayable — players cannot react to more than one or two incoming hits at a time. c) The animator cannot produce enough variety to justify more than two concurrent attacks. d) Multiplayer networking limits simultaneous enemies.
10. Ashley in the original Resident Evil 4 (2005) became a design pain point because:
a) Her AI was too sophisticated for the hardware. b) She could die, and players had to protect her without her collision, pathing, and grabbable behavior being polished enough — she got stuck in doorways, blocked Leon's shots, and was grabbed too easily. c) Her voice acting was poor. d) The writers wrote her personality too abrasively.
11. In BioShock Infinite, Elizabeth's design deliberately avoids which common companion-AI problems?
a) She cannot block the player's path (collision phases through), cannot die (no HP), and cannot fail to provide resources (ammo/health tosses are timed to need). b) She has aggressive combat capabilities to offset the player's weakness. c) She has a separate vision cone and perception system to aid the player. d) She uses GOAP to plan tactical behaviors.
12. Which of the following is an example of "cheating in the player's direction" that is widely considered legitimate design?
a) Civilization's Deity difficulty giving the AI extra starting resources and research speed. b) Mario Kart's rubber-banding that boosts trailing players and slows leaders. c) Dark Souls enemies having smaller hitboxes and less i-frame immunity than the player. d) All of the above.
13. A playtester says your enemy "has no personality." You've implemented a full FSM with six states, perception, and navmesh pathing. The most likely missing ingredient is:
a) A deeper planning algorithm (switch to GOAP). b) More states (expand to 15+). c) Telegraphing — barks, animation windups, posture changes — that make the internal states legible to the player. d) Larger vision cones.
14. Which is the correct description of how an attack's readability works in Dark Souls?
a) The game adjusts enemy attack speed based on player health. b) Each enemy attack has a visible wind-up animation long enough for a prepared player to read and dodge, making combat a conversation of commit-and-respond rather than reflex-only reaction. c) The game displays a prompt showing which direction to dodge. d) Enemies only attack when the player is looking at them.
Answers and Explanations
1. (b). The AI honesty principle — articulated in Damian Isla's Halo 2 AI talks — is that game AI is judged by player perception, not internal correctness. Smart behaviors the player cannot perceive add nothing to the experience. See the chapter's "What Is Game AI" section.
2. (c). FSMs (and HFSMs) are the shipping default for a reason: predictable, debuggable, cheap. BT and utility architectures have their places but are not the safe default for "dozens of simple agents." GOAP is rarely justified outside specific shooter contexts. Neural networks are effectively never shipped for combat AI as of this writing.
3. (b). A Sequence runs children in order until one returns Failure (or all return Success). A child returning Running holds the sequence in-progress but does not abort it. This distinguishes Sequence (AND) from Selector (OR).
4. (b). State explosion is the growth of transition logic as state count grows. Adding a new state requires considering transitions from and to every existing state — the number of possible transitions scales quadratically. This is why flat FSMs become unmanageable past ~10-15 states and why hierarchical decomposition is the usual fix.
5. (c). GOAP — Goal-Oriented Action Planning. Orkin's paper "Three States and a Plan: The AI of F.E.A.R." described a planner architecture where actions have preconditions and effects, and the AI searches at runtime for the action sequence that satisfies a goal. This produced the famous "they're flanking me!" feeling even though the "flanking" behavior was emergent, not scripted.
6. (c). The most common root cause of "unfair" stealth detection is missing perception cues. Players need to see that the guard is suspicious, that the bar is filling, that the eye icon is turning red — whatever the cue is, it must exist. Without it, every detection feels like a cheat. MGS's alert exclamation mark, Assassin's Creed's awareness bar, Splinter Cell's light meter — all solve this problem.
7. (b). Last-known-position makes the AI feel persistent. When the player ducks behind cover, the guard remembers where they were last seen and investigates there. This produces the search behavior that gives stealth games their rhythm. Without LKP, losing sight equals instant forgetting — the game becomes a puzzle with a reset button, not a living stealth environment.
8. (c). Boids add local movement smoothness and multi-agent behavior on top of global pathfinding. A* gives you the route; steering (separation, alignment, cohesion, avoidance) makes the motion look natural. Without boids-style steering, agents snap along path points like a Roomba.
9. (b). Melee combat against a simultaneous group of attackers is unplayable for humans — you cannot react to more than one or two incoming hits. Ring combat limits concurrent attackers, keeps others circling, and produces action-movie pacing. Without it, group melee feels random and punishing.
10. (b). Ashley's collision, pathfinding, and grabbability were the specific problems. She could get stuck on doorways, block Leon's shots, and be carried off by enemies. The 2023 remake specifically tuned these behaviors to remove the friction. Her voice acting and writing weren't the issue.
11. (a). Elizabeth's design specifically removes the three common companion failures: blocking the player (collision phases), dying (she has no HP), and misfiring resource delivery (the ammo/health toss timing is scripted to need). This is a specific, expensive design approach that treats the companion as a friendly UI in character clothing rather than as a second agent in the world.
12. (d). All three are widely cited examples of legitimate "cheating." Civ's Deity is openly disclosed and produces a specific high-difficulty flavor. Mario Kart's rubber-band produces tight finishes, which is the game's core appeal. Dark Souls's player-favor cheats produce "fair" combat despite technical imbalance. The principle is cheating toward experience.
13. (c). The chapter hammers this: legibility, not complexity, is what produces personality. A six-state FSM with full barks, wind-up animations, and posture changes will outperform a twenty-state planner that moves silently. Add telegraphs before adding states.
14. (b). Every attack in Dark Souls has a readable telegraph of sufficient duration to dodge. Combat is an exchange — the enemy commits, the player reads, the player responds. This design makes the combat feel "hard but fair" and is the core of the series' identity. It is not about enemy intelligence; it is about enemy legibility.