pygambit.nash.lcp_solve#
- pygambit.nash.lcp_solve(game: Game, rational: bool = True, use_strategic: bool = False, external: bool = False, stop_after: int | None = None, max_depth: int | None = None) List[MixedStrategyProfile] | List[MixedBehaviorProfile]#
Compute Nash equilibria of a two-player game using linear complementarity programming.
- Parameters:
game (Game) – The game to compute equilibria in.
rational (bool, default True) – Compute using rational numbers. If False, using floating-point arithmetic. Using rationals is more precise, but slower.
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.
external (bool, default False) – Call the external command-line solver instead of the internally-linked implementation. Requires the command-line solvers to be installed somewhere accessible in the system path.
stop_after (int, optional) – Maximum number of equilibria to compute. If not specified, computes all accessible equilibria.
max_depth (int, optional) – Maximum depth of recursion. If specified, will limit the recursive search, but may result in some accessible equilibria not being found.
- Returns:
List of mixed strategy or mixed behavior profiles computed.
- Return type:
List of profiles
- Raises:
RuntimeError – If game has more than two players.
