Input

From AI Product Manuals
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

Consideration as part of the IAUS structure

An Input is a type of data that is passed through a Response Curve to get a value that is used to help score a behavior. In a general sense, it is anything that can be accessed or measured -- either directly or through further calculation. Inputs are usually links to something that is in the game engine, a character or object's information and stats, the Influence Map system, or anything else that can provide something that is measurable.

Implementation

Code

Inputs are defined in data and, when exported from the database, are listed in the Enums file under ConsiderationInput.

Processing the inputs happens in the consideration code in the method, GetInputValue. This method contains a large case statement with one case for each possible input. The case contains the code for where to retrieve the data specific to that input. Because of this, it is one of the few code changes that has to be made both in initial setup of the IAUS system and during additions and changes. In the former case, the existing inputs will have to be linked to the appropriate objects in the game engine. In the latter case, if a new input is added to the database that is game specific, a corresponding case statement will be necessary in GetInputValue in order for that input to be recognized and its value retrieved. If an input is used that does not have an associated case statement, the default case does not throw a breaking error but the method returns a bad value. (An error statement could easily be placed in the default case.)