The ActionSet represents a set of Actions, each of which an agent has the option of attempting to perform within the game world. It encapsulates a collection of Actions that are evaluated using a scoring function to pick the most-preferred action to perform.

Constructor

new (id:ActionSetIdType, name:String, actions:Array<Action<ActionIdType, ConsiderationIdType, InputIdType>>)

Parameters:

id

Id for this action set.

name

The human-readable name of the action set.

actions

The collection of actions that the action set starts with.

Variables

read onlyactions:Array<Action<ActionIdType, ConsiderationIdType, InputIdType>> = null

The set of actions. Each item represents an action that an agent has the option of attempting to perform within the game world.

read onlyid:ActionSetIdType = null

Id for this action set.

read onlyinstanceId:Int = InstanceId.makeId()

Id for this object.

read onlyname:String = ""

Human-readable name of the action set. For a NPC-eating werewolf that likes to hide in the shadows, an ActionSet might have names like "NPC-eating-related Actions", or "Hiding-related Actions".

select:Void ‑> ActionScorePair<ActionIdType, ConsiderationIdType, InputIdType> = null

Returns the most appropriate action in the set by evaluating the actions using an action set scoring strategy.

Returns:

The most appropriate action in the set and its score value.