Difference between revisions of "IAUS"
|Line 28:||Line 28:|
=== Behavior and Ability Packs ===
=== Behavior and Ability Packs ===
Behaviors are [[Behavior Pack]]and [[Ability Pack]]-- usually by their type of usage. This is both for the sake of convenience when dealing with many behaviors that are designed to go together. However, by doing this, the are able to be added and removed as a group as necessary.
=== Brain ===
=== Brain ===
Revision as of 21:27, 29 September 2021
This page is part of the IAUS Manual. ♦ Brain ♦ Behavior ♦ Behavior Type ♦ Decision ♦ AI Entity ♦
The Infinite Axis Utility System is the primary behavioral decision-making system in Intrinsic Algorithm's library. While it can be supported by information from other systems (such as the Imap system or Tagging system), it is the "brains" of the game agents. This can be applied to individual characters, invisible "team leaders", or even to inanimate objects.
The IAUS exists as a stand-alone black box that can be installed into a project codebase with minimal work. We have both C++ and C# versions based on the needs to the client. In theory, minus any specific custom language or library issues, this means that this core AI system can be installed on day 1 and work can begin on hooking it up to world information, existing behaviors and animation code, and behavior logic can be authored in the tool we have developed for that purpose.
The concept behind utility is that we are putting together a score for a particular Behavior based on how appropriate it is at the time. That is, what utility does this have for the character? Once these scores are assembled, we can pick the behavior with the highest score under the assumption that it is the most beneficial and, therefore, is the most appropriate action to take.
The IAUS system is comprised of a number of high level components. (Each of these contains lower level components that are detailed on their respective pages.)
A Behavior is the core atomic component of the AI system. Each Behavior represents an action that an agent might take and contains the information for scoring the Behavior.
Rather than some architectures that decide solely on a type of behavior and then subsequently choose a target, any behavior that can be targeted at more than one object or character, is scored individually for the combination of the behavior on each specific target. This is called a Context. For example, rather than deciding to "shoot" and then trying to decide who to shoot, the IAUS scores all of the shooting action and target contexts individually. So "shoot Chuck" and "shoot Ralph" would get their own scores right alongside each other. The reason for this is that shooting Chuck may score higher then another potential action but shooting Ralph may score lower.
Each Behavior is linked with a Behavior Type that it will execute if the behavior is selected. Behavior Types are the core actions that an agent can perform whereas behaviors are more "reasons why" a particular Behavior Type would be executed. For example, different agent types may have different reasons for engaging in a melee attack. These would be differentiated by each Behavior having different Considerations. However, they all ultimately perform the Behavior Type, "melee attack". Another wide-ranging example would be the Behavior Type, "move to target". Whether we are moving towards an ally, an enemy, an object on the ground, or the tavern across the street, they would all be executed in the same way -- i.e. moving to the target object (as specified in the Context that was scored). Another 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.
Each behavior is comprised of one or more Considerations representing a piece of information that the agent is taking into account when scoring that particular behavior. Each consideration maps the value of an input through a response curve to convert it to an output value. The scores from all of the considerations are then multiplied together to generate the score for that behavior.
Each scoring of a Behavior in a Context (i.e. "Behavior A against Target X") is referred to as a Decision. When deciding what to do, Decisions are scored rather than Behaviors. While the Behavior provides all the necessary reasoning for whether or not it is a good idea (through it's Considerations), if it is a targeted behavior, it cannot be scored without understanding who or what is being targeted. For example, a Behavior "shoot enemy" that has a Consideration for the distance to that enemy needs to be able to reference the specific entity's location to calculate the distance. If it is not a targeted behavior, then any Considerations that expect there to be a target in the Context will not return a value.
Behavior and Ability Packs
Behaviors are contained in Behavior Packs and Ability Packs -- usually by their type of usage. This is both for the sake of convenience when dealing with many behaviors that are designed to go together. However, by doing this, the are able to be added and removed as a group as necessary. Additionally, if a new behavior is added to a Behavior Pack (because it is designed to go with the other behaviors in that pack), then all the Brains that contain that Behavior Pack will get the new behavior.
A Brain is the top level component that is assigned to an agent in the game. From a data standpoint, a Brain is simply a collection of Behavior Packs and Ability Packs. However, the Brain class contains most of the data for the agent's thinking and does most of the work of scoring Behaviors and keeping track of the history of the Behavior usage.