pygambit.nash.liap_agent_solve#

pygambit.nash.liap_agent_solve(start: MixedBehaviorProfile, maxregret: float = 0.0001, maxiter: int = 1000, nash_callback: Callable[[MixedBehaviorProfileDouble], None] | None = None, event_callback: Callable[[LiapStartEvent | LiapEndEvent], None] | None = None) → LiapResult#

Compute an approximate agent Nash equilibrium of a game using Lyapunov function minimization.

Added in version 16.5.0: Moved from liap_solve passing a MixedBehaviorProfileDouble for additional clarity in the solution concept computed.

Changed in version 17.0.0: start may now also be a MixedBehaviorProfileRational; it is converted to floating-point via ~MixedBehaviorProfile.as_float before minimization.

Changed in version 17.0.0: The function minimized is the Lyapunov function of the agent normal form, so information sets that are unreached at the start or at the minimizer are handled correctly, and agent Nash equilibria which leave an information set unreached can be found. Acceptance is by the agent normal form’s maximum regret (see maxregret).

Parameters:
  • start (MixedBehaviorProfile) – The starting profile for function minimization. Up to one equilibrium will be found from any starting profile, and the equilibrium found may (and generally will) depend on the initial profile chosen. If a MixedBehaviorProfileRational is given, it is converted to floating-point precision first.

  • maxregret (float, default 1e-4) – The acceptance criterion for approximate agent Nash equilibrium; the maximum, over information sets, of the information set’s probability of being reached times its regret 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).

  • maxiter (int, default 1000) – Maximum number of iterations in function minimization.

  • nash_callback (Callable[[MixedBehaviorProfileDouble], None], optional) –

    If specified, called with the equilibrium found, if any.

    Added in version 17.0.0.

  • event_callback (Callable[[LiapStartEvent | LiapEndEvent], None], optional) –

    If specified, called at the start of minimization (LiapStartEvent) and, once, with the point and regret reached at its end (LiapEndEvent).

    Added in version 17.0.0.

Returns:

res – The result represented as a LiapResult object.

Return type:

LiapResult

Raises:

UnsupportedForBayesianGameError – If game is a Bayesian action-graph game. .. versionadded:: 17.0.0