Skip to content

HP provisional termination - #1121

Merged
tturocy merged 11 commits into
gambitproject:feature/hpfrom
AndresFerCervell:feature/hp_provisional_ending
Sep 7, 2026
Merged

HP provisional termination#1121
tturocy merged 11 commits into
gambitproject:feature/hpfrom
AndresFerCervell:feature/hp_provisional_ending

Conversation

@AndresFerCervell

Copy link
Copy Markdown
Contributor

This PR solves the first part of PR #1113. It includes the changes made in PR #1032, removing conflicts.

For every generic game, the Nash equilibrium selected by the Harsanyi Selten procedure is guaranteed (at least we haven´t found a counterexample).
Regarding non-generic ones, if an equilibrium is returned, there is no guarantee that it is the one we wanted (tracer result should be checked in order to be sure).
However, I haven´t found any example in the 477 games evaluated (random and the ones from the catalog or contrib) that happen to find an equilibrium after a tracer error. This means that the polishing method is not being used (if the tracer fails, so does it).

The games that always fail are, as I mentioned in our meeting, csg2.nfg, csg3.nfg and csg4.nfg and a random game of 2 players with 10 strategies each. This one is specially confusing because the Jacobian does not seem to be singular. The tracer gets a regret of 0.00542893, and the polishing method returns an all-zero profile in every position in spite of the safeguard I added. I will keep studying it.

We can say then that around 470/477 games get the expected equilibrium.

AndresFerCervell and others added 4 commits September 5, 2026 14:48
Removed the section on the homotopy path-following method for computing Nash equilibrium, including its description and references.
Removed method-specific parameters description for 'hp'.
@AndresFerCervell AndresFerCervell changed the title Feature/hp provisional ending HP provisional ending Sep 5, 2026
@AndresFerCervell AndresFerCervell changed the title HP provisional ending HP provisional termination Sep 5, 2026
@AndresFerCervell

Copy link
Copy Markdown
Contributor Author

The tests for this PR are failing on Python 3.10 with:
ERROR build_support/catalog/test_update.py - AttributeError: module 'pygambit.gambit' has no attribute 'Selector'
I guess it has something to do with the recent update of Gambit, but has no relation with my new code. Should I do something about it?

@AndresFerCervell

Copy link
Copy Markdown
Contributor Author

Just understood the issue with the random game. When it approaches to 1, the first position of the tangent is almost 0 in the newton step. Therefore, t barely moves, and, when computing the next step size h, p_criterion(u, newT) - p_criterion(x, t) is zero.
We divide by that to get h, so it went to infinity. I have added a check that confirms the difference is greater than 1e-8.

The polishing method returned the all-zero profiles because the comparison between numbers and nan is false. Fixed that too.

@AndresFerCervell

Copy link
Copy Markdown
Contributor Author

Regarding csg, just found out that, at some point, the Jacobian drops to rank N-2.

The perturbation that I added to the Jacobian is enough to solve the games only when they have a jacobian with N-1 rank.

I have studied, as you suggested, the Givens Rotations and the QR decomposition. They actually seem to be working just fine, (at least in these cases). I don´t think that swapping rotations for some more modern system such as Householder reflections would solve the problem. While it is true that Givens Rotations is not the standard in the industry right now for efficiency reasons, I don´t believe it´s worth it to change it now. Adding a pivoting system in the already existing method would be easier and could make the refactor more robust. But again, I don´t think that would solve our problem.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@tturocy
tturocy merged commit 239df8a into gambitproject:feature/hp Sep 7, 2026
14 checks passed
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.

2 participants