class Consideration<ConsiderationIdType, InputIdType>
package needs.ai
The Consideration class transforms an observation about the game world that your agent cares about into a utility score. A consideration produces the utility score by evaluating (or appraising) an Input - an aspect of the world the agent is interested in - against a response curve. This result is typically a floating point value, which is later used for calculating the overall utility of an Action available to the agent.
Constructor
Variables
input:Input<InputIdType> = null
The aspect of the world that the agent is interested in with respect to this consideration. If the consideration is "fear of wolves", the input might evaluate to "number of wolves nearby, scaled and normalized in range 0-1".
read onlyname:String = ""
Human-readable name of the consideration. For an NPC-eating werewolf hiding behind a park bench, considerations for an Option like "Eat NPC" could have names like "Hunger", "Crowdedness", "My Health" etc.
Methods
score ():Float
Calculates a utility score/floating point value for the consideration by evaluating the Input against a response function.
Returns:
The utility score/floating point value for the consideration, usually a value in the range 0-1.