Chadwick Gambit: Software Tools for Game Theory

pygambit.nash.gnm_solve#

pygambit.nash.gnm_solve(perturbation: Game | MixedStrategyProfileDouble, end_lambda: float = -10.0, steps: int = 100, local_newton_interval: int = 3, local_newton_maxits: int = 10) NashComputationResult#

Compute Nash equilibria of a game using a global Newton method.

Parameters:
  • perturbation (Game or MixedStrategyProfileDouble) –

    The perturbation vector to apply to the game. If a Game is passed, the perturbation vector is set to be 1 for the first strategy for each player and 0 for all other strategies.

    Changed in version 16.2.0: Allow selection of the perturbation vector

  • end_lambda (float, default -10.0) –

    The value of the perturbation magnitude lambda at which to terminate tracing. This must be a negative number. This sets the point at which the algorithm assumes no further equilibria will be found along this ray.

    New in version 16.2.0.

  • steps (int, default 100) –

    The number of steps to take within a support cell. Lqrger values trade off speed for security in tracing the path.

    New in version 16.2.0.

  • local_newton_interval (int, default 3) –

    The frequency to run a local Newton method step. This is a correction step that reduces accumulated errors in the path-following.

    New in version 16.2.0.

  • local_newton_maxits (int, default 10) –

    The maximum number of iterations in a local Newton method step.

    New in version 16.2.0.

Raises:

ValueError – If the perturbation vector does not have a unique maximizer for each player, or arguments controlling the behavior of the numerical tracing are not valid.

Returns:

res – The result represented as a NashComputationResult object.

Return type:

NashComputationResult