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.
- 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 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
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
LiapResultobject.- Return type:
