Chadwick Gambit: Software Tools for Game Theory

pygambit.gambit.MixedStrategyProfile.__setitem__#

MixedStrategyProfile.__setitem__()#

Sets a probability or a mixed strategy to value.

Parameters:

index (Player, Strategy, or str) –

The part of the profile to set:

  • If index is a Player, sets the MixedStrategy over the player’s strategies.

  • If index is a Strategy, sets the probability the strategy is played.

  • If index is a str, attempts to resolve the referenced object by first searching for a player with that label, and then for a strategy with that label.

Raises:

MismatchError – If player is a Player from a different game, or strategy is a Strategy from a different game.