Sample questions
Game Ai PathfindingDifficulty 2
What is the main practical drawback of a state machine as more states and transitions are added?
- aIt cannot represent more than two states at once
- bIt requires a network connection to evaluate transitions
- cIt always runs slower than any other decision-making approach, regardless of state count
- dTransitions grow fast as states multiply, making the logic hard to read and extend✓
Explanation:As states multiply, the transitions between them tend to grow combinatorially, so the web of conditions becomes tangled and error-prone to extend. State machines aren't limited to two states (a), don't need networking to evaluate (b), and aren't inherently slower — the problem is maintainability, not raw runtime cost (c).
Game Ai PathfindingDifficulty 2
A designer wants NPC logic where: Idle -> hears a noise -> Investigate -> sees no threat -> back to Idle; sees the player -> Attack. This is best described as what kind of logic structure?
- aA tree-based decision structure with priority branches
- bA physics simulation with rigid body constraints
- cA finite set of named states linked by transitions✓
- dA pure random number generator choosing actions each frame
Explanation:Idle, Investigate, and Attack are discrete named states, and each arrow is a condition-driven transition — the definition of a state machine. It is not described as a prioritized tree of behaviors (a), has nothing to do with physics constraints (b), and is fully deterministic given the conditions, not random (d).
Game Ai PathfindingDifficulty 2
What does a tree-based decision structure (an alternative to a plain state machine) typically let designers do more easily?
- aSkip the need for any conditions when deciding NPC actions
- bReuse sub-behaviors and reorder priorities easily✓
- cGuarantee the NPC never changes behavior once the game starts
- dStore NPC position data more compactly in memory
Explanation:A tree-based structure organizes behaviors hierarchically by priority, so designers can reuse sub-trees and reorder branches without touching a web of state-to-state transitions. It still needs conditions (a), doesn't freeze NPC behavior (c), and isn't about memory layout of positions (d).
Game Ai PathfindingDifficulty 2
An NPC needs to walk from one side of a room to another, around a wall in the middle. What is this a basic example of?
- aPathfinding around an obstacle✓
- bA rendering draw call
- cAn audio occlusion effect
- dA save/load system checkpoint
Explanation:Routing around a wall to reach a destination is the simplest possible pathfinding scenario: finding a valid path that avoids an obstacle. It has nothing to do with rendering (b), audio (c), or save systems (d).
Game Ai PathfindingDifficulty 2
A level's walkable area is represented as a 50x50 grid, where each cell stores links to its neighboring cells. What is this representation primarily used for?
- aDetermining the resolution of the level's background music
- bStoring the exact polygon count of every rendered mesh
- cGiving a search algorithm a node graph to explore✓
- dCalculating the NPC's maximum hit points
Explanation:A grid of cells with neighbor links is exactly the graph structure a pathfinding search needs to explore possible routes cell by cell from start to goal. It has no bearing on audio resolution (a), mesh polygon counts (b), or NPC health values (d).
Game Ai PathfindingDifficulty 3
A pathfinding search estimates the remaining distance to the goal using straight-line distance as a heuristic, and expands the node with the lowest (cost-so-far + estimated-remaining) first. Why does this tend to explore fewer nodes than a search with no heuristic at all?
- aBecause it guarantees an NPC never gets stuck, even when no valid path exists
- bBecause it removes the need for a graph or grid representation entirely
- cBecause it eliminates the need for any collision detection in the level
- dThe heuristic biases exploration toward the goal, so fewer irrelevant nodes expand✓
Explanation:Combining actual cost-so-far with an estimate of remaining distance lets the search prioritize promising directions instead of expanding blindly outward in every direction, which is why it typically visits fewer nodes. It says nothing about guaranteeing a path exists (a), doesn't remove the need for a graph (b), and is unrelated to collision detection (c).