Skip to content

AI

Navigation, steering and decision-making for game characters.

3 cheat sheets · 3 subcategories

Finding paths through grids and graphs.

Interactive visual
core

A* Pathfinding

expand the node that looks cheapest so far plus estimated cost to go

A* searches a graph by always expanding the node with the lowest cost so far plus estimated cost to go. With an admissible heuristic, the path is optimal.

Steering

Local movement forces for agents.

Interactive visual
core

Steering Behaviors

steer toward a desired velocity, a little each frame

Seek, arrive and separation each compute a desired velocity; steering is desired minus current velocity, capped and summed. Simple rules, lifelike motion.

Decision making

Structuring what an agent does next.

Interactive visual
core

Finite State Machine

one state at a time, explicit events move between them

An FSM keeps an AI or character in exactly one state, such as Idle, Patrol, Chase or Attack. A table of events decides every legal transition.