egta.innerloop module

module for doing innerloop procedures

egta.innerloop.inner_loop(agame, *, initial_restrictions=None, regret_thresh=0.001, dist_thresh=0.1, support_thresh=0.0001, restricted_game_size=3, num_equilibria=1, num_backups=1, devs_by_role=False, style='best', executor=None)[source]

Inner loop a game using a scheduler

Parameters:
  • game (RsGame) – The game to find equilibria in. This function is most useful when game is a SchedulerGame, but any complete RsGame will work.
  • initial_restriction ([[bool]], optional) – Initial restrictions to start inner loop from. If unspecified, every pure restriction is used.
  • regret_thresh (float > 0, optional) – The maximum regret to consider an equilibrium an equilibrium.
  • dist_thresh (float > 0, optional) – The minimum norm between two mixed profiles for them to be considered distinct.
  • support_thresh (float > 0, optional) – Candidate equilibria strategies with probability lower than this will be truncated. This is useful because often Nash finding returns strategies with very low support, which now mean extra deviating strategies need to be sampled. Trimming saves these samples, but may increase regret above the threshold.
  • restricted_game_size (int > 0, optional) – The maximum restricted game support size with which beneficial deviations must be explored. Restricted games with support larger than this are queued and only explored in the event that no equilibrium can be found in beneficial deviations smaller than this.
  • num_equilibria (int > 0, optional) – The number of equilibria to attempt to find. Only one is guaranteed, but this might be beneifical if the game has a known degenerate equilibria, but one which is still helpful as a deviating strategy.
  • num_backups (int > 0, optional) – In the event that no equilibrium can be found in beneficial deviations to small restricted games, other restrictions will be explored. This parameter indicates how many restricted games for each role should be explored.
  • devs_by_role (boolean, optional) – If specified, deviations will only be explored for each role in order, proceeding to the next role only when no beneficial deviations are found. This can reduce the number of profiles sampled, but may also fail to find certain equilibria due to the different path through restricted games.
  • style (string, optional) – A string describing the thoroughness of equilibrium finding. Seed nash.mixed_equilibria for options and a description.
  • executor (Executor, optional) – The executor to be used for Nash finding. The default setting will allow async networking calls to continue to happen during long nash finding, but buy using a process pool this can take advantage of parallel computation.