Game AI and Behavior Systems
Game AI and behavior systems are the decision and movement layer that makes non-player characters act: choosing what to do next, finding a path through the level, and coordinating groups. Engines expose this as state machines, behavior trees, planners, navigation meshes, and steering, so designers can author NPC behavior without rewriting the engine each time.
itSoftware engineering | OpenSkills.info
Recommended first:gameplay-programming
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic - Game AI and Behavior Systems
Game AI is the bit that decides what a non-player character does next, then asks the rest of the engine to make the feet and the bullets cooperate. It is usually handwritten structure, not a model that trained overnight and developed opinions.
Before fancy graphs, people jammed modes into booleans. Chase and Flee both true is a vibe, not a design. A finite state machine fixes that: one active mode, named transitions, no illegal committees. Hierarchical machines share parent handlers; concurrent machines keep movement and combat from multiplying into one giant chart.
When tactics need "try this, else that, else the other thing," reach for a behavior tree. A sequence is a to-do list that quits at the first failure. A selector is a priority list that stops at the first success. Decorators nitpick a single child. Leaf tasks do the boring verbs: move, shoot, wait. The blackboard is the shared notepad sensors write on and tasks read from. If the notepad still says the player is in the kitchen, do not be surprised when the agent clears the kitchen with enthusiasm.
Utility scores soft preferences when many options are partly good. GOAP searches for a plan when the action vocabulary gets combinatorial. Unreal's EQS answers "where should I stand?" so the tree is not full of magic coordinates.
Decision says go there. Navigation meshes say how: walkable polygons, a path corridor, then steering so the agent arrives without forming a polite queue inside a doorway. Unity, Godot, and Recast/Detour all rhyme here. Off-mesh links are the honest admission that jumps and ladders are not ordinary polygons.
The useful panic rule: name the layer. Thrashing leaf while the world is still? Priorities. Stable leaf, no motion? Hole in the mesh. Fine path, weird gait? Locomotion. Far-away crowds melting the frame? Tick less, share sensors, shallow the tree.
Read the intro for the architecture, the cheatsheet when you forget whether a selector fails loud or quiet, Field Notes when you want the bruises, Practice for the debug rituals, and Reference when you are ready for engine docs that mean it.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://gameprogrammingpatterns.com/state.html
Supports
- Finite state machines, State pattern, hierarchical and concurrent FSMs
- Why boolean flag combinations fail for exclusive modes
- https://dev.epicgames.com/documentation/en-us/unreal-engine/behavior-trees-in-unreal-engine
Supports
- Behavior Tree and Blackboard structure
- AIController-driven NPC decision flow
- https://dev.epicgames.com/documentation/en-us/unreal-engine/behavior-tree-node-reference-in-unreal-engine
Supports
- Composite, decorator, task, and service node roles
- https://dev.epicgames.com/documentation/en-us/unreal-engine/behavior-tree-node-reference-composites-in-unreal-engine
Supports
- Selector and sequence success and failure rules
- https://dev.epicgames.com/documentation/en-us/unreal-engine/environment-query-system-in-unreal-engine
Supports
- EQS generators and tests for scoring locations and actors
- https://docs.unity3d.com/Manual/nav-NavigationSystem.html
Supports
- NavMesh, NavMeshAgent, and obstacle overview
- https://docs.unity3d.com/Manual/nav-BuildingNavMesh.html
Supports
- NavMesh bake parameters and agent-sized walkable surfaces
- https://docs.unity3d.com/Manual/nav-InnerWorkings.html
Supports
- Path corridors, avoidance, and runtime navigation behavior
- https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_introduction_godot.html
Supports
- Navigation maps, regions, and server model
- https://docs.godotengine.org/en/stable/tutorials/navigation/navigation_using_navigationagents.html
Supports
- NavigationAgent path requests and avoidance
- https://github.com/recastnavigation/recastnavigation
Supports
- Recast bake and Detour path query toolchain
- https://www.red3d.com/cwr/steer/
Supports
- Seek, arrive, pursue, flocking and related local steering forces
- https://www.red3d.com/cwr/boids/
Supports
- Flocking via separation, alignment, and cohesion
- https://www.gamedeveloper.com/programming/gdc-2005-proceeding-handling-complexity-in-the-i-halo-2-i-ai
Supports
- Behavior tree influence from Halo 2 AI complexity management
- https://www.gamedeveloper.com/programming/applying-goal-oriented-action-planning-to-games
Supports
- GOAP operators, goals, and planning in games including F.E.A.R.
- https://www.gamedeveloper.com/design/the-pac-man-dossier
Supports
- Pac-Man ghost chase, scatter, and frightened modes
- https://en.wikipedia.org/wiki/Unreal_Engine_4
Supports
- Unreal Engine 4 March 2014 release context for BT tooling era
- https://github.com/sindresorhus/awesome
Supports
- Discovery entry point for topic awesome lists
- https://github.com/danielygardon/awesome-game-ai
Supports
- Discovery of game AI papers, talks, and libraries
- https://github.com/ellisonleao/magictools
Supports
- Discovery of AI, pathfinding, and middleware ecosystem links
- https://github.com/ashleydavis/Fluent-Behaviour-Tree
Supports
- C# fluent behavior tree library used in Awesome Links and Landscape
- https://github.com/ikpil/DotRecast
Supports
- C# Recast/Detour port for navmesh bake and crowd queries
- https://github.com/libgdx/gdx-ai
Supports
- LibGDX AI module for steering and decision utilities
- https://opsive.com/assets/behavior-designer/
Supports
- Unity visual behavior tree middleware landscape entry
- https://nodecanvas.paradoxnotion.com/
Supports
- Unity FSM and behavior tree middleware landscape entry
- https://www.unrealengine.com/
Supports
- Unreal Engine product homepage for Landscape URL matching
- https://unity.com/
Supports
- Unity product homepage for Landscape URL matching
- https://godotengine.org/
Supports
- Godot product homepage for Landscape URL matching
- https://www.cryengine.com/
Supports
- CryEngine product homepage for Landscape comparison entry
