Post
Give the AI a goal and a toolbox of actions, and let it figure out the steps to get there on its own.
GOAP is an AI architecture where agents are given goals (desired world states) and a set of actions with preconditions and effects. The planner searches backward from the goal, chaining actions together to find a sequence that transforms the current world state into the goal state. If the goal is 'enemy is dead,' the planner might chain: get weapon -> load weapon -> move to enemy -> attack enemy. The magic is that developers define individual actions and goals, but the AI assembles plans dynamically based on the current situation. If the usual weapon is unavailable, the AI automatically finds an alternative plan. This creates emergent behavior that surprises even the developers. The system was popularized by F.E.A.R. in 2005 and has since influenced AI design across the industry.
Example
F.E.A.R.'s enemy AI used GOAP to produce combat behavior that reviewers called some of the best in any FPS. Soldiers would dynamically plan flanking maneuvers, coordinate suppressing fire, flip tables for cover, and retreat when outgunned -- all emerging from the goal-action planning system rather than scripted sequences.
Why it matters
GOAP creates AI that adapts to situations developers never anticipated, producing emergent gameplay moments that feel intelligent rather than scripted. It shifts the developer's job from scripting specific behaviors to defining capabilities, letting the AI figure out when and how to use them.
Related concepts