Alex J. Champandard—AiGameDev.com
Game developers have been using hierarchical finite state machines (HFSMs) to manage low-level conditions and actions for years [Fu03, Isla05]. Such systems are built from traditional state machines nested within each other, which mainly provide generalized transitions (i.e., transitions that apply to whole groups of states).
More recently, the industry has seen increasing adoption of behavior trees (BTs). Instead of using an FSM at every level of the hierarchy, BTs rely on simpler primitives, such as sequences and selectors, which improve scalability thanks to task-specific memory and depth-first search mechanisms.
Ultimately, however, ...