pygambit.gambit.MixedStrategyProfile.__getitem__#
- MixedStrategyProfile.__getitem__()#
Access a component of the mixed strategy profile specified by index.
- Parameters:
index (Player, Strategy, or str) –
The part of the profile to return:
If index is a
Player
, returns aMixedStrategy
over the player’s strategies.If index is a
Strategy
, returns 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 aStrategy
from a different game.