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

new (id:ConsiderationIdType, name:String, input:Input<InputIdType>, response:Response)

Parameters:

id

Id for this consideration.

name

The human-readable name for the consideration.

input

The input.

response

The response curve.

Variables

read onlyid:ConsiderationIdType = null

Id for this consideration.

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 onlyinstanceId:Int = InstanceId.makeId()

Id for this object.

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.

response:Response = null

The response function that the value of the input is evaluated with.

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.