Difference between revisions of "Behavior"

From AI Product Manuals
Jump to navigationJump to search
m
(Added concept)
Line 1: Line 1:
{{IAUS Header}}
{{IAUS Header}}


A Behavior defines not ''what'' a character will do, but ''why a character may do something.''
== Concept ==
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.


== Components ==
== Components ==
Line 27: Line 28:
== Code ==
== Code ==


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]].
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.


== Data ==
== Data ==

Revision as of 14:15, 29 September 2021

This page is part of the IAUS Manual.BrainBehaviorBehavior TypeDecisionAI Entity

Concept

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.

Components

Considerations

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.

Duration

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.

Code

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.

Data

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.

Export

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.