gameanalysis.reduction.twins module¶
Twins reduction
This is the same as a deviation preserving reduction reduced to two for all roles.
-
gameanalysis.reduction.twins.
expand_deviation_profiles
(full_game, rest, red_players=None, 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], optional) – The number of players in each role in the reduced game.IF specified, it must match the expected number for twins reduction.
role_index (int, optional) – If specified , only expand deviations for the role selected.
-
gameanalysis.reduction.twins.
expand_profiles
(full_game, profiles)[source]¶ Expand profiles using twins reduction
- Parameters
full_game (Game) – Game that expanded profiles will be valid for.
profiles (ndarray-like) – The profiles to expand
-
gameanalysis.reduction.twins.
reduce_game
(full_game, red_players=None)[source]¶ Reduce a game using twins reduction
- Parameters
full_game (Game) – The game to reduce.
red_players (ndarray-like, optional) – The reduced number of players for each role. This must be None or the reduced number of players for the twins reductions.