Skip to content

Add Herings-Peeters homotopy method - #1113

Merged
tturocy merged 13 commits into
masterfrom
feature/hp
Sep 8, 2026
Merged

Add Herings-Peeters homotopy method#1113
tturocy merged 13 commits into
masterfrom
feature/hp

Conversation

@tturocy

@tturocy tturocy commented Sep 3, 2026

Copy link
Copy Markdown
Member

No description provided.

AndresFerCervell and others added 10 commits July 3, 2026 09:32
…thods (#973)

Implementation of algorithm equation system and termination condition at t=1.  Passes several simple tests; more robust test suite to come.
Refactors the HP system of equations to the class-based equation pattern.
This updates `path.cc ` so that the tracer always follows the curve in the direction chosen by the programmer. It has been proven useful in the new `HP`algorithm to avoid a random direction in `t=0`. `logit` has also been affected by the modifications: the headers have been updated.

The mechanism implemented is the following:

-In `path.h` an enum type named **`TraceDirection`**  has been declared. It can be `Positive` associated to the number 1, and `Negative`, (-1). Positive means that the tracer will move forward; negative backwards. 

-To control whether the tracer is headed into the right direction in the first iteration, it is required to know which is the index of the variable that we are following (`lambda`in `logit`, `t` in `HP`). Another parameter has been added to `TracePath` named **`tracking_index`**  that stores the position of that variable in the vector `x`.  Note that in `HP` it is the first position and in `logit` is the last one.

The check that we are heading the right way is as discussed: if the first step goes as expected (equivalent to the tangent being positive), the internal omega does not change. Otherwise, it is multiplied by -1.

Tracing returns with an error result if the tangent in the first step is 0 (up to numerical tolerance)
# Conflicts:
#	Makefile.am
#	src/pygambit/nash.h
#	src/pygambit/nash.pxi
#	src/solvers/logit/efglogit.cc
#	src/solvers/logit/logit.h
#	src/solvers/logit/nfglogit.cc
#	src/solvers/logit/path.cc
#	src/tools/logit/logit.cc
@tturocy tturocy self-assigned this Sep 3, 2026
@tturocy tturocy added this to the gambit-17.0.0.beta.1 milestone Sep 3, 2026
@tturocy

tturocy commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@AndresFerCervell In this branch we've added in all of the instrumentation to be able to use this as an equilibrium solver (callbacks, ability to cancel in a multi-threaded computation), and hooked this up to a command-line driver and added it to the GUI.

There are two last things to do:

  1. Settle on what the "best" solution (for now) is for termination/polishing. As discussed, let's go for something that maximises the chance we get an epsilon-Nash equilibrium for now, and we can investigate more carefully some of the difficult cases separately.
  2. We'll need to finalise a section in the algorithms documentation which briefly describes the method.

This was referenced Sep 5, 2026
@AndresFerCervell

Copy link
Copy Markdown
Contributor

They are handled in PR #1121 and PR #1120, respectively.

Adds documentation of HP algorithm in `doc/algorithms.rst` and `doc/gui.nash.rst`.
@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

AndresFerCervell and others added 2 commits September 7, 2026 18:32
Set up termination condition for HP per our best ideas so far; wire up maxRegret properly
# Conflicts:
#	src/pygambit/gambit.pyx
@tturocy
tturocy marked this pull request as ready for review September 8, 2026 09:29
@tturocy
tturocy merged commit 4a6dc32 into master Sep 8, 2026
26 checks passed
@tturocy
tturocy deleted the feature/hp branch September 8, 2026 09:31
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