Utilty AI for Unity
 All Classes Namespaces Functions Variables Events Pages
Public Types | Public Member Functions | List of all members
TenPN.DecisionFlex.ActionSelector Class Referenceabstract

Base class for chosing an action from all the scored choices. More...

Inheritance diagram for TenPN.DecisionFlex.ActionSelector:
TenPN.DecisionFlex.SelectHighestScore TenPN.DecisionFlex.SelectTournament TenPN.DecisionFlex.SelectWeightedRandom

Public Types

enum  Logging { IsEnabled, IsDisabled }

Public Member Functions

abstract ActionSelection Select (IList< ActionSelection > choices, Logging loggingState)

Detailed Description

Base class for chosing an action from all the scored choices.

DecisionFlex uses this behaviour to choose which action is best, once all actions are scored. Two selectors ship with the package: SelectHighestScore and SelectWeightedRandom.

Member Function Documentation

abstract ActionSelection TenPN.DecisionFlex.ActionSelector.Select ( IList< ActionSelection choices,
Logging  loggingState 
pure virtual

given a list of actions and scores, pick the one that should be executed

choicesactions, each with a normalized score
loggingStateIsEnabled if the caller wants extra debugging sent to the console

Implemented in TenPN.DecisionFlex.SelectTournament, TenPN.DecisionFlex.SelectWeightedRandom, and TenPN.DecisionFlex.SelectHighestScore.

The documentation for this class was generated from the following file: