Chadwick Gambit: Software Tools for Game Theory

pygambit.gambit.MixedBehaviorProfile.regret#

MixedBehaviorProfile.regret(action: Action | str)#

Returns the regret to playing action, if all other players play according to the profile.

The regret is defined as the difference between the payoff of the best-response action and the payoff of action. Payoffs are computed conditional on reaching the information set. By convention, the regret is always non-negative.

Parameters:

action (Action or str) – The action to get the regret for. If a string is passed, the action is determined by finding the action with that label, if any.

Raises:
  • MismatchError – If action is an Action from a different game.

  • KeyError – If action is a string and no action in the game has that label.