pygambit.gambit.MixedStrategyProfile#

class pygambit.gambit.MixedStrategyProfile#

Represents a mixed strategy profile over the strategies in a Game.

A mixed strategy profile is a dict-like object, mapping each player in a game to a MixedStrategy giving the probability distribution over that player’s strategies.

Mixed strategy profiles may represent probabilities as either exact (rational) numbers, or floating-point numbers. These may not be combined in the same mixed strategy profile.

Changed in version 16.1.0: Profiles are accessed as dict-like objects; indexing by integer player or strategy indices is no longer supported.

Changed in version 17.0.0: Indexing (__getitem__/__setitem__) is by player label only, operating on a player’s whole distribution at once; indexing directly by an individual strategy is no longer supported.

See also

Game.mixed_strategy_profile

Creates a new mixed strategy profile on a game.

MixedBehaviorProfile

Represents a mixed behavior profile over a Game with an extensive representation.

Methods

as_behavior()

Creates a mixed behavior profile which is equivalent to this mixed strategy profile.

as_float()

Creates a floating-point copy of this mixed strategy profile.

copy()

Creates a copy of the mixed strategy profile.

liap_value()

Returns the Lyapunov value (see [McK91]) of the strategy profile.

max_regret()

Returns the maximum regret of any player.

normalize()

Create a profile with the same strategy proportions as this one, but normalised so probabilities for each player sum to one.

set_mixed_strategy(player, distribution[, ...])

Sets the mixed strategy for the player with label player.

Attributes

game

The game on which this mixed strategy profile is defined.

payoffs

Returns the expected payoff to each player, if all players play according to the profile.

player_regrets

Returns the regret of each player for playing their mixed strategy, if all other players play according to the profile.

strategy_regrets

Returns the regret to playing each strategy, if all other players play according to the profile, grouped by player.

strategy_values

Returns the expected payoff of playing each strategy, conditional on reaching it, if all other players play according to the profile, grouped by player.