Chadwick Gambit: Software Tools for Game Theory

pygambit.gambit.MixedStrategyProfile.strategy_value#

MixedStrategyProfile.strategy_value(strategy: Strategy | str) float | Rational#

Returns the expected payoff to playing the strategy, if all other players play according to the profile.

Parameters:

strategy (Strategy or str) – The strategy to get the payoff 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.