pygambit.gambit.MixedStrategyProfile.regret#
- MixedStrategyProfile.regret(strategy: Strategy | str)#
Returns the regret to playing strategy, if all other players play according to the profile.
The regret is defined as the difference between the payoff of the best-response strategy and the payoff of strategy. By convention, the regret is always non-negative.
- Parameters:
strategy (Strategy or str) – The strategy to get the regret for. If a string is passed, the strategy is determined by finding the strategy with that label, if any.
- Raises:
MismatchError – If strategy is a Strategy from a different game.
KeyError – If strategy is a string and no strategy in the game has that label.
