Skip to content

Add Herings-Peeters homotopy method - #1113

Draft
tturocy wants to merge 10 commits into
masterfrom
feature/hp
Draft

Add Herings-Peeters homotopy method#1113
tturocy wants to merge 10 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.

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