gameanalysis.regret module

A module for computing regret and social welfare of profiles

gameanalysis.regret.max_pure_social_welfare(game, *, by_role=False)[source]

Returns the maximum social welfare over the known profiles.

If by_role is specified, then max social welfare applies to each role independently. If there are no profiles with full payoff data for a role, an arbitrary profile will be returned.

gameanalysis.regret.mixed_social_welfare(game, mix)[source]

Returns the social welfare of a mixed strategy profile

gameanalysis.regret.mixture_deviation_gains(game, mix)[source]

Returns all the gains from deviation from a mixed strategy

The result is ordered by role, then strategy.

gameanalysis.regret.mixture_regret(game, mix)[source]

Return the regret of a mixture profile

gameanalysis.regret.pure_social_welfare(game, profile)[source]

Returns the social welfare of a pure strategy profile in game

gameanalysis.regret.pure_strategy_deviation_gains(game, profile)[source]

Returns the pure strategy deviations gains

gameanalysis.regret.pure_strategy_deviation_pays(game, profile)[source]

Returns the pure strategy deviation payoffs

The result is a compact array of deviation payoffs. Each element corresponds to the payoff of deviating to strategy i from strategy j for all valid deviations.

gameanalysis.regret.pure_strategy_regret(game, prof)[source]

Returns the regret of a pure strategy profile

If prof has more than one dimension, the last dimension is taken as a set of profiles and returned as a new array.