From AI Product Manuals
Revision as of 15:18, 1 October 2021 by Davemark (talk | contribs) (→‎Concept)
Jump to navigationJump to search
This page is part of the IAUS Manual.BrainBehaviorBehavior TypeDecisionAI Entity


Behavior as part of the IAUS structure

A Behavior defines not what a character will do, but why a character may do something. As such, a Behavior is the core component of the decision reasoning. As result, much of the work involved with creating and tuning character AI is done by creation and editing of behaviors.

However, it should be noted that a Behavior does not actually define the execution of the behavior–the actual action that it performs in the game. That is done by the associated #Behavior Type.



A behavior is comprised of 1 or more Considerations. These provide information on the things that the agent would need to take into account when scoring whether or not the action is suitable to do.

Behavior Type

A behavior is paired with a Behavior Type to determine what action is actually taken if this Behavior is selected.

Behaviors that can be directed at more than one potential target (as specified by the Behavior's #Context Type) are combined with those targets in a Context which then becomes part of a Decision. If a behavior is not to be potentially targeted at different agents (i.e. only scored once), it is still added to a Context and a Decision, but the target may be the agent itself, a location in the world, or none.

Context Type

A behavior uses a Context Type to determine how it should be scored -- e.g. on the agent itself only, on individual targets, etc.


A behavior has a Duration -- usually "Instant" or "Continuous" -- to specify how it should be treated once it begins execution.

Behavior Parameters

Behavior Parameters allow us to specify data that is very specific to the behavior when it is executed.



A Behavior does not have specific code. It is a data construct only. The inputs are retrieved by the individual Considerations and the outputs are processed by the related Behavior Type.

Note that this should not be confused with the Behavior Class which is the parent of all the Behavior Type classes.


Because of the role they play in defining how characters act, Behaviors are one of the most central data points in the DB. As such, they are one of the most numerous and oft-changing items in the database.


Behaviors need to be exported from the database into a file or other data structure to be read by the game on startup. This data will be loaded by the BehaviorData class.