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 theMixedStrategy
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.
value – Any value which can be converted to the data type of the
MixedStrategyProfile
.
- Raises:
MismatchError – If player is a
Player
from a different game, or strategy is aStrategy
from a different game.