Skip to content

Scale Lemke-Howson tableau rows by per-player payoff max - #980

Open
shaneraphel wants to merge 1 commit into
QuantEcon:mainfrom
shaneraphel:fix-951-lemke-howson-scale
Open

shaneraphel wants to merge 1 commit into
QuantEcon:mainfrom
shaneraphel:fix-951-lemke-howson-scale

Conversation

@shaneraphel

@shaneraphel shaneraphel commented Oct 5, 2026 •

Copy link
Copy Markdown

Implements the scaling proposed in #951: in _initialize_tableaux, each player's shifted payoff block is now divided by that block's maximum, so the absolute pivoting tolerances effectively act as relative ones. Players are scaled independently, and the nonnegativity guarantee of the shift is preserved (the divisor is the block max, so it stays positive for finite inputs).

Scope kept as the issue requests: tolerances, _initialize_tableaux_ig, the RuntimeWarning path, and the Julia port are untouched.

Verification (local, quantecon 0.12.0 dev tree):

  • New test_lemke_howson_payoff_scale_invariance sweeps uniform-payoff games over 1e-8..1e16 across all init pivots, asserting convergence plus an is_nash cross-check on the unscaled game. Before the patch, scales >= 1e10 fail to converge; after, all pass.
  • test_lemke_howson_large_payoffs_report_breakdown now asserts convergence (renamed to test_lemke_howson_large_payoffs_converge), matching the behavior the issue asks for.
  • Full quantecon/game_theory suite: 183 passed. quantecon/optimize/tests/test_linprog_simplex.py (shares the pivoting helpers): 21 passed.
  • The existing doctest tableaux in lemke_howson are updated to the normalized values.

Note: games that genuinely need the +1 positivity shift (all-nonpositive payoffs) still hit the pre-existing ValueError, and tiny-scale games of that kind remain out of reach of an absolute-tolerance fixup — that matches the issue's stated scope, so I left it alone.

Everything above was verified by running the suites locally.

…on#951)

Divide each player's shifted payoff block by its maximum so the
absolute pivoting tolerances act as relative ones, as proposed in
the issue. Fixes convergence failures on games with payoffs of
order 1e10 and above; verified with is_nash cross-checks over a
17-decade sweep. Existing behaviours, tolerances and the
all-nonpositive-games error path are unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant