This page is part of the IAUS Manual. ♦ Brain ♦ Behavior ♦ Behavior Type ♦ Decision ♦ AI Entity ♦
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.
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.
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.
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 allow us to specify data that is very specific to the behavior when it is executed.
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.