Repository navigation
Scale Lemke-Howson tableau rows by per-player payoff max - #980
Open
shaneraphel wants to merge 1 commit into
Open
shaneraphel wants to merge 1 commit into
shaneraphel wants to merge 1 commit into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, theRuntimeWarningpath, and the Julia port are untouched.Verification (local,
quantecon 0.12.0dev tree):test_lemke_howson_payoff_scale_invariancesweeps uniform-payoff games over 1e-8..1e16 across all init pivots, asserting convergence plus anis_nashcross-check on the unscaled game. Before the patch, scales >= 1e10 fail to converge; after, all pass.test_lemke_howson_large_payoffs_report_breakdownnow asserts convergence (renamed totest_lemke_howson_large_payoffs_converge), matching the behavior the issue asks for.quantecon/game_theorysuite: 183 passed.quantecon/optimize/tests/test_linprog_simplex.py(shares the pivoting helpers): 21 passed.lemke_howsonare 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.