pygambit.nash.logit_solve#

pygambit.nash.logit_solve(game: Game, use_strategic: bool = False, maxregret: float = 1e-08, first_step: float = 0.03, max_accel: float = 1.1, event_callback: Callable[[LogitPathEvent | LogitBifurcationEvent | LogitPerturbationEvent], None] | None = None) LogitResult#

Compute a Nash equilibrium of a game using the logit quantal response equilibrium correspondence.

Returns an approximation to the limiting point on the principal branch of the correspondence for the game.

Parameters:
  • game (Game) – The game to compute equilibria in.

  • use_strategic (bool, default False) – Whether to use the strategic form. If True, always uses the strategic representation even if the game’s native representation is extensive.

  • maxregret (float, default 1e-8) –

    The acceptance criterion for approximate Nash equilibrium; the maximum regret of any player must be no more than maxregret times the difference of the maximum and minimum payoffs of the game

    Added in version 16.2.0.

  • first_step (float, default .03) –

    The arclength of the initial step.

    Added in version 16.2.0.

  • max_accel (float, default 1.1) –

    The maximum rate at which to lengthen the arclength step size.

    Added in version 16.2.0.

  • event_callback (Callable[[LogitPathEvent | LogitBifurcationEvent | LogitPerturbationEvent], None], optional) –

    If specified, called with each point traced along the principal branch on the way to the returned equilibrium (LogitPathEvent), the moment a bifurcation is detected (LogitBifurcationEvent), and each time the tracer switches a symmetry-breaking perturbation on or off while crossing one (LogitPerturbationEvent).

    Added in version 17.0.0.

Returns:

res – The result represented as a LogitResult object. Any bifurcations detected while tracing are also available afterward via res.bifurcations.

Return type:

LogitResult