Behavior type

From AI Product Manuals
Revision as of 14:01, 5 October 2021 by Davemark (talk | contribs) (Added footer)
Jump to navigationJump to search
This page is part of the IAUS Manual.BrainBehaviorBehavior TypeDecisionAI Entity

This item is a component of a Behavior.

Concept

Behavior Type as part of the IAUS structure

Behavior Types are the core actions that an agent can perform.

One way of thinking of Behavior Types is as "button presses". That is, there is often an analog to what the player would do in order to execute an action. Note that this is different from a Behavior which is merely a data construct that helps the agent calculate the utility of the potential action and decide why to do it. The Behavior Type expresses what the action entails.

Examples

Examples of Behavior Types are:

  • "Move to Target"
  • "Face Target"
  • "Play Animation".

Actions that would fall under the "Ability" Behavior Type could be:

  • "melee attack"
  • "ranged attack"
  • "special attack"

Again, these would all be specified as "Ability" for their Behavior Type with the matchup to the appropriate action handled elsewhere.

Implementation

Code

In code, each Behavior Type is given it's own class that is inherited from the Behavior class. The mappings between the enum and the appropriate class are done in the Behavior Data class. Therefore, if a new Behavior Type is created in the data tool, the sub-class needs to be written (in Behavior.cpp) and there needs to be a matchup specified in BehaviorData.cpp as well.

Note that there will often be a Behavior Type called "Ability". This is intentionally generic as it is handled in a different way by a different class.

Data

Behavior Types are specified in the data tool as simply a list that gets exported to the Enums file.


Website, Manuals wiki, and Product Code ©2021, Intrinsic Algorithm LLC