gameanalysis.reduction.hierarchical module

Hierarchical reduction

gameanalysis.reduction.hierarchical.expand_deviation_profiles(full_game, rest, red_players, role_index=None)[source]

Expand all deviation profiles from a restricted game

Parameters
  • full_game (Game) – The game the deviations profiles will be valid for.

  • rest ([bool]) – The restriction to get deviations from.

  • red_players (ndarray-like) – 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.hierarchical.expand_profiles(full_game, profiles)[source]

Expand profiles hierarchically

Parameters
  • full_game (Game) – Game that expanded profiles will be valid for.

  • profiles (ndarray-like) – The profiles to expand

gameanalysis.reduction.hierarchical.reduce_game(full_game, red_players)[source]

Reduce a game using hierarchical 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.

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

Reduce profiles hierarchically

Parameters
  • red_game (Game) – Game that reduced profiles will be profiles for.

  • profiles (ndarray-like) – The profiles to reduce.