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

Choose a good action but not always the best, using relative ranking. More...

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

Public Member Functions

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

Additional Inherited Members

- Public Types inherited from TenPN.DecisionFlex.ActionSelector
enum  Logging { IsEnabled, IsDisabled }
 

Detailed Description

Choose a good action but not always the best, using relative ranking.

This is a good choice for your selector when you have to make the decision many times, and want a little bit of noise, but you also want the behavior to be invariant to the particular weights, and depend only on their relative weights. For example, "highest", "second ranked", "third ranked", and so on. It requires less tuning than SelectWeightedRandom, but will produce a "bad" choice more often.

Thanks to Johnicholas Hines for the code.

Member Function Documentation

override ActionSelection TenPN.DecisionFlex.SelectTournament.Select ( IList< ActionSelection choices,
Logging  loggingState 
)
inlinevirtual

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

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

Implements TenPN.DecisionFlex.ActionSelector.


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