pygambit.gambit.MixedAction.__setitem__#
- MixedAction.__setitem__(index: Action | str, value: Any) None #
Sets the probability an action is played.
- Parameters:
index (Action or str) –
The part of the profile to set:
If index is an
Action
, sets the probability the action is played.If index is a
str
, attempts to resolve the referenced object by searching for an action with that label, and sets the probability for that action.
value – Any value which can be converted to the data type of the
MixedBehaviorProfile
.
- Raises:
MismatchError – If action is an
Action
that does not belong to thisMixedAction
’s information set.