Chadwick Gambit: Software Tools for Game Theory

pygambit.gambit.MixedBehavior.__getitem__#

MixedBehavior.__getitem__(index: Infoset | str | Action) MixedAction | float | Rational#

Access a component of the mixed behavior specified by index.

Parameters:

index (Infoset, Action, or str) –

The part of the mixed behavior to return:

  • If index is an Infoset, returns a MixedAction over the infoset’s actions

  • If index is an Action, returns the probability the action is played

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

Raises:

MismatchError – If infoset not an Infoset for the mixed behavior’s player, or action is not an Action for the mixed behavior’s player.