class ReasonerActionPickingStrategies
package needs.ai
The ReasonerActionPickingStrategies class contains boilerplate methods that a Reasoner uses to select the most appropriate Action.
Static methods
statichighestScoringAction<ReasonerIdType, ActionSetIdType, ActionIdType, ConsiderationIdType, InputIdType> (reasoner:Reasoner<ReasonerIdType, ActionSetIdType, ActionIdType, ConsiderationIdType, InputIdType>):ActionScorePair<ActionIdType, ConsiderationIdType, InputIdType>
Selects the best action for a reasoner by picking the one with the highest utility score.
Parameters:
reasoner | The reasoner whose action sets will be picked from. |
---|
Returns:
The action with the highest utility score and the score itself.
staticrandomInPreferredActionSet<ReasonerIdType, ActionSetIdType, ActionIdType, ConsiderationIdType, InputIdType> (reasoner:Reasoner<ReasonerIdType, ActionSetIdType, ActionIdType, ConsiderationIdType, InputIdType>):ActionScorePair<ActionIdType, ConsiderationIdType, InputIdType>
Selects the best action for a reasoner by picking the preferred action set, and then choosing at random from the actions in the set.
Parameters:
reasoner | The reasoner whose action sets will be picked from. |
---|
Returns:
The action randomly chosen from the preferred action set, and a score of 0.