Elden Ring NPC AI Uses Pushdown Automaton Stack, Not Standard FSM
June 23, 2026
Elden Ring's enemy AI is implemented in Havok Script (a Lua variant) and uses a pushdown automaton — a stack of goal states — rather than a flat or hierarchical finite state machine, enabling context-preserving state transitions. The analysis is based on decompiled game code, not original reverse engineering.
HOW THIS AFFECTS YOU
●
builderThe pushdown automaton pattern for NPC state management is a concrete, battle-tested alternative to FSMs worth considering for game AI or agent behavior trees.