Choose a good action but not always the best, using relative ranking. More...
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 } |
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.
|
inlinevirtual |
given a list of actions and scores, pick the one that should be executed
choices | actions, each with a normalized score |
loggingState | IsEnabled if the caller wants extra debugging sent to the console |
Implements TenPN.DecisionFlex.ActionSelector.