gameanalysis.reduction.identity module

Identity reduction

This is the same as not reducing a game.

gameanalysis.reduction.identity.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 number for full_game.

  • role_index (int, optional) – If specified , only expand deviations for the role selected.

gameanalysis.reduction.identity.expand_profiles(full_game, profiles)[source]

Return input profiles

Parameters
  • full_game (Game) – Game that all profiles must be valid for.

  • profiles (ndarray-like) – The profiles.

  • axis (int, optional) – The axis the profiles lie on.

gameanalysis.reduction.identity.reduce_game(full_game, red_players=None)[source]

Return original game

Parameters
  • full_game (Game) – The game to reduce.

  • red_players (ndarray-like, optional) – If specified, this must match the number of players per role in full_game.

gameanalysis.reduction.identity.reduce_profiles(red_game, profiles)[source]

Return original profiles

Parameters
  • red_game (Game) – Game that all profiles must be valid for.

  • profiles (ndarray-like) – The profiles.

  • axis (int, optional) – The axis the profiles are on.