Skip to content

Handling biffurcations in the tracer - #955

Merged
tturocy merged 4 commits into
gambitproject:masterfrom
AndresFerCervell:feature/bifurcation-fix
Sep 9, 2026
Merged

Handling biffurcations in the tracer#955
tturocy merged 4 commits into
gambitproject:masterfrom
AndresFerCervell:feature/bifurcation-fix

Conversation

@AndresFerCervell

Copy link
Copy Markdown
Contributor

Issues closed by this PR

Description of the changes in this PR

This PR introduces several mathematical and structural improvements to the QRE (Quantal Response Equilibrium) tracing algorithm to increase convergence stability and prevent crashes, particularly in edge-case games.

  • Stabilized Predictor-Corrector in path.cc using alternating multidimensional perturbations at bifurcations.
  • Replaced strict orientation flip rejection with a lambda-based geometric safeguard to handle fold bifurcations.

It also adds an entry in Changelog.

How to review this PR

-Review the symmetry-breaking logic.
-Run gambit-logit on team_mp.txt to confirm it now reaches the Nash Equilibrium successfully without getting stuck in the bifurcation.
The mathematical explanation can be found here: https://github.com/AndresFerCervell/GSoC-2026-Gambit-Portfolio/blob/main/Gambit_Logit_Algorithm.pdf

@tturocy
tturocy self-requested a review June 25, 2026 12:42
@tturocy

tturocy commented Jun 25, 2026

Copy link
Copy Markdown
Member

We'll likely accept this soon - I am doing a bit of work on documenting and checking the team matching pennies example from the issue first for completeness.

@tturocy tturocy added this to the gambit-17.0.0 milestone Jul 1, 2026
Comment thread src/solvers/logit/path.cc Outdated
// If lambda was positive in the previous iteration, and we are now in the region of negative
// lambda, we are likely heading towards the wrong direction, so we reject this step and reduce
// the stepsize.
if (u.back() < min_lambda && x.back() >= 0.0) {

@AndresFerCervell AndresFerCervell Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fixed by the orientation logic we added for HP.
Furthermore, it would only be useful for logit, contrary to the idea of making the tracer as abstract as possible.

@tturocy
tturocy merged commit 902dff1 into gambitproject:master Sep 9, 2026
14 checks passed
@tturocy

tturocy commented Sep 9, 2026

Copy link
Copy Markdown
Member

@AndresFerCervell Thanks for circling back to this - somewhat ironic where we started was one of the last things to get merged, but that's the way it goes sometimes!

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.

BUG: QRE tracing stalling at bifurcation, incorrectly reporting output as Nash

2 participants