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.
On a Bayesian action-graph game the correspondence traced is the type-level (Bayesian) QRE: every type of every player responds with the same precision lam, as in the agent QRE of an extensive game. It is not the QRE of the strategic form of the Bayesian game, which would give a type with prior probability
P(t)the precisionlam * P(t). Both reach Nash equilibria as lam tends to infinity. The equilibrium is a BAGGMixedBehaviorProfile, and the points of the path reported to event_callback are BAGGLogitQREMixedBehaviorProfile objects.- 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 any play of the game, as the game is represented (see Acceptance criteria for approximate Nash equilibria)
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
LogitResultobject. Any bifurcations detected while tracing are also available afterward viares.bifurcations.- Return type:
