Decision-making

And where does the newborn go from here?

The decision-making is the part of the code that select what an agent should do next.

Finite-State Machines
The agent is always in one of the AI state that is available to him. Each state have rules that say under what conditions the agent change to another state.

Behavior Trees
All the possible actions is put in a tree and each frame the tree is updated. The first action that fit will run until it is done or another one takes over.

Utility Systems
For every possible action a mob can perform a desirability (utility) value is calculated. The action with the highest value is then performed.

Scripting
Give the agent a screenplay to follow.



Goal-Oriented Action Planner

Hierarchical Task Networks