gameanalysis.reduction.deviation_preserving module¶
Deviation preserving reduction
-
gameanalysis.reduction.deviation_preserving.
expand_deviation_profiles
(full_game, rest, red_players, role_index=None)[source]¶ Expand all deviation profiles from a restriction
- Parameters
full_game (Game) – The game the deviations profiles will be valid for.
rest ([bool]) – The restriction to get deviations from.
red_players ([int]) – The number of players in each role in the reduced game.
role_index (int, optional) – If specified , only expand deviations for the role selected.
-
gameanalysis.reduction.deviation_preserving.
expand_profiles
(full_game, profiles)[source]¶ Expand profiles using dpr
- Parameters
full_game (Game) – Game that expanded profiles will be valid for.
profiles (ndarray-like) – The profiles to expand
return_contributions (bool, optional) – If specified, returns a boolean array matching the shape is returned indicating the payoffs that are needed for the initial profiles.
-
gameanalysis.reduction.deviation_preserving.
reduce_game
(full_game, red_players)[source]¶ Reduce a game using deviation preserving reduction
- Parameters
full_game (Game) – The game to reduce.
red_players (ndarray-like) – The reduced number of players for each role. This will be coerced into the proper shape if necessary.