pygambit.gambit.MixedStrategy.__getitem__#
- MixedStrategy.__getitem__(index: Strategy | str) float | Rational #
Returns the probability that the strategy referred to by index is played.
- Parameters:
index (Strategy or str) –
If index is a
Strategy
, returns the probability the strategy is played.If index is a
str
, attempts to resolve the referenced object by searching for a strategy with that label.
- Returns:
The probability assigned to the strategy.
- Return type:
float or Rational
- Raises:
MismatchError – If index is a
Strategy
that does not belong to thisMixedStrategy
’s player.