pygambit.nash.enummixed_solve#

pygambit.nash.enummixed_solve(game: Game, rational: bool = True, lrsnash_path: Path | str | None = None) NashComputationResult#

Compute all mixed-strategy Nash equilibria of a two-player game using the strategic representation.

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.

  • lrsnash_path (pathlib.Path | str | None = None,) –

    If specified, use lrsnash to solve the systems of equations. This argument specifies the path to the lrsnash executable.

    Added in version 16.3.0.

Returns:

res – The result represented as a NashComputationResult object.

Return type:

NashComputationResult

Raises:

RuntimeError – If game has more than two players.

Notes

lrsnash is part of lrslib, available at http://cgm.cs.mcgill.ca/~avis/C/lrs.html