|
| 1 | +.. _algorithms: |
| 2 | + |
| 3 | +Equilibrium computation |
| 4 | +======================= |
| 5 | + |
| 6 | +The table below summarizes the available PyGambit functions and corresponding Gambit CLI programs |
| 7 | +for algorithms for computing Nash equilibria. |
| 8 | + |
| 9 | +================ =========================================================================== ======================================== ========================================== |
| 10 | +Algorithm Description PyGambit function CLI command |
| 11 | +================ =========================================================================== ======================================== ========================================== |
| 12 | +:ref:`enumpure` Enumerate pure-strategy equilibria of a game :py:func:`pygambit.nash.enumpure_solve` :ref:`gambit-enumpure <gambit-enumpure>` |
| 13 | +:ref:`enummixed` Enumerate equilibria in a two-player game :py:func:`pygambit.nash.enummixed_solve` :ref:`gambit-enummixed <gambit-enummixed>` |
| 14 | +:ref:`enumpoly` Compute equilibria of a game using polynomial systems of equations :py:func:`pygambit.nash.enumpoly_solve` :ref:`gambit-enumpoly <gambit-enumpoly>` |
| 15 | +:ref:`lp` Compute equilibria in a two-player constant-sum game via linear programming :py:func:`pygambit.nash.lp_solve` :ref:`gambit-lp <gambit-lp>` |
| 16 | +:ref:`lcp` Compute equilibria in a two-player game via linear complementarity :py:func:`pygambit.nash.lcp_solve` :ref:`gambit-lcp <gambit-lcp>` |
| 17 | +:ref:`liap` Compute equilibria using function minimization :py:func:`pygambit.nash.liap_solve` :ref:`gambit-liap <gambit-liap>` |
| 18 | +:ref:`logit` Compute quantal response equilibria :py:func:`pygambit.nash.logit_solve` :ref:`gambit-logit <gambit-logit>` |
| 19 | +:ref:`simpdiv` Compute equilibria via simplicial subdivision :py:func:`pygambit.nash.simpdiv_solve` :ref:`gambit-simpdiv <gambit-simpdiv>` |
| 20 | +:ref:`ipa` Compute equilibria using iterated polymatrix approximation :py:func:`pygambit.nash.ipa_solve` :ref:`gambit-ipa <gambit-ipa>` |
| 21 | +:ref:`gnm` Compute equilibria using a global Newton method :py:func:`pygambit.nash.gnm_solve` :ref:`gambit-gnm <gambit-gnm>` |
| 22 | +================ =========================================================================== ======================================== ========================================== |
| 23 | + |
| 24 | +.. _enumpure: |
| 25 | + |
| 26 | +enumpure |
| 27 | +-------- |
| 28 | + |
| 29 | +Searches for pure-strategy Nash or agent Nash equilibria. |
| 30 | + |
| 31 | +.. _enummixed: |
| 32 | + |
| 33 | +enummixed |
| 34 | +--------- |
| 35 | + |
| 36 | +Computes Nash equilibria using extreme point enumeration. |
| 37 | + |
| 38 | +In a two-player strategic game, the set of Nash equilibria can be expressed as the union of convex sets. |
| 39 | +This program generates all the extreme points of those convex sets. (Mangasarian [Man64]_) |
| 40 | +This is a superset of the points generated by the path-following procedure of Lemke and Howson (see :ref:`lcp`). |
| 41 | +It was shown by Shapley [Sha74]_ that there are equilibria not accessible via the method in :ref:`lcp`, whereas the output of |
| 42 | +:program:`enummixed` is guaranteed to return all the extreme points. |
| 43 | + |
| 44 | +.. _enumpoly: |
| 45 | + |
| 46 | +enumpoly |
| 47 | +-------- |
| 48 | + |
| 49 | +Computes Nash equilibria by solving systems of polynomial equations |
| 50 | +and inequalities. |
| 51 | + |
| 52 | +This program searches for all Nash equilibria in a strategic game |
| 53 | +using a support enumeration approach. This approach computes all the |
| 54 | +supports which could, in principle, be the support of a Nash |
| 55 | +equilibrium. For each candidate support, it attempts to compute |
| 56 | +totally mixed equilibria on that support by successively subdividing |
| 57 | +the space of mixed strategy profiles or mixed behavior profiles (as appropriate). |
| 58 | +By using the fact that the equilibrium conditions imply a collection |
| 59 | +of equations and inequalities which can be expressed as multilinear |
| 60 | +polynomials, the subdivision constructed is such that each cell |
| 61 | +contains either no equilibria or exactly one equilibrium. |
| 62 | + |
| 63 | +For strategic games, the program searches supports in the order proposed |
| 64 | +by Porter, Nudelman, and Shoham [PNS04]_. For two-player games, this |
| 65 | +prioritises supports for which both players have the same number of |
| 66 | +strategies. For games with three or more players, this prioritises |
| 67 | +supports which have the fewest strategies in total. For many classes |
| 68 | +of games, this will tend to lower the average time until finding one equilibrium, |
| 69 | +as well as finding the second equilibrium (if one exists). |
| 70 | + |
| 71 | +For extensive games, a support of actions equates to allowing positive |
| 72 | +probabilities over a subset of terminal nodes. The indifference conditions |
| 73 | +used are those for the sequence form defined on the projection of the game |
| 74 | +to that support of actions. A solution to these equations implies a probability |
| 75 | +distribution over terminal nodes. The algorithm then searches for |
| 76 | +a profile that is a Nash equilibrium that implements that probability |
| 77 | +distribution. If there exists at least one such profile, a sample one is returned. |
| 78 | +Note that for probability distributions which assign zero probability to some terminal |
| 79 | +nodes, it is generally the case that there are (infinitely) many such profiles. |
| 80 | +Subsequent analysis of unreached information sets can yield alternative |
| 81 | +profiles that specify different choices at unreached information sets |
| 82 | +while still satisfying the Nash equilibrium conditions. |
| 83 | + |
| 84 | +.. _lp: |
| 85 | + |
| 86 | +lp |
| 87 | +--- |
| 88 | + |
| 89 | +Computes a Nash equilibrium in a two-player game by solving a linear program. |
| 90 | +For extensive games, the |
| 91 | +program uses the sequence form formulation of Koller, Megiddo, and von |
| 92 | +Stengel [KolMegSte94]_. |
| 93 | + |
| 94 | +While the set of equilibria in a two-player constant-sum strategic |
| 95 | +game is convex, this method will only identify one of the extreme |
| 96 | +points of that set. |
| 97 | + |
| 98 | +.. _lcp: |
| 99 | + |
| 100 | +lcp |
| 101 | +--- |
| 102 | + |
| 103 | +Computes Nash equilibria of a two-player game by finding solutions to a linear |
| 104 | +complementarity problem. For extensive games, the program uses the |
| 105 | +sequence form representation of the extensive game, as defined by |
| 106 | +Koller, Megiddo, and von Stengel [KolMegSte94]_, and applies the |
| 107 | +algorithm developed by Lemke. |
| 108 | + |
| 109 | +For strategic games, the program uses the method of Lemke and Howson |
| 110 | +[LemHow64]_. In this case, the method will find all "accessible" |
| 111 | +equilibria, i.e., those that can be found as concatenations of Lemke-Howson |
| 112 | +paths that start at the artificial equilibrium. |
| 113 | +There exist strategic-form games for which some equilibria cannot be found |
| 114 | +by this method, i.e., some equilibria are inaccessible; see Shapley [Sha74]_. |
| 115 | + |
| 116 | +In a two-player strategic game, the set of Nash equilibria can be expressed |
| 117 | +as the union of convex sets. This program will find extreme points |
| 118 | +of those convex sets. See :ref:`enummixed` for a method |
| 119 | +which is guaranteed to find all the extreme points for a strategic |
| 120 | +game. |
| 121 | + |
| 122 | +.. _liap: |
| 123 | + |
| 124 | +liap |
| 125 | +---- |
| 126 | + |
| 127 | +Computes approximate Nash equilibria using a function minimization approach. |
| 128 | + |
| 129 | +This procedure searches for equilibria by generating random starting |
| 130 | +points and using conjugate gradient descent to minimize the Lyapunov |
| 131 | +function of the game. This is a nonnegative function which is |
| 132 | +zero exactly at strategy profiles which are Nash equilibria. |
| 133 | + |
| 134 | +Note that this procedure is not globally convergent. That is, it is |
| 135 | +not guaranteed to find all, or even any, Nash equilibria. |
| 136 | + |
| 137 | +.. _logit: |
| 138 | + |
| 139 | +logit |
| 140 | +----- |
| 141 | + |
| 142 | +Computes the |
| 143 | +principal branch of the (logit) quantal response correspondence. |
| 144 | + |
| 145 | +The method is based on the procedure described in Turocy [Tur05]_ for |
| 146 | +strategic games and Turocy [Tur10]_ for extensive games. |
| 147 | +It uses standard path-following methods (as |
| 148 | +described in Allgower and Georg's "Numerical Continuation Methods") to |
| 149 | +adaptively trace the principal branch of the correspondence |
| 150 | +efficiently and securely. |
| 151 | + |
| 152 | +The method used is a predictor-corrector method, which first generates |
| 153 | +a prediction using the differential equations describing the branch of |
| 154 | +the correspondence, followed by a corrector step which refines the |
| 155 | +prediction using Newton's method for finding a zero of a function. Two |
| 156 | +parameters control the operation of this tracing. |
| 157 | + |
| 158 | +The algorithm accepts an initial step size for the predictor phase of the tracing. This |
| 159 | +step size is then dynamically adjusted based on the rate of |
| 160 | +convergence of Newton's method in the corrector step. If the |
| 161 | +convergence is fast, the step size is adjusted upward (accelerated); |
| 162 | +if it is slow, the step size is decreased (decelerated). The |
| 163 | +maximum acceleration (or deceleration) can be set as an argument. As described in |
| 164 | +Turocy [Tur05]_, this acceleration helps to |
| 165 | +efficiently trace the correspondence when it reaches its asymptotic |
| 166 | +phase for large values of the precision parameter lambda. |
| 167 | + |
| 168 | +In extensive games, logit quantal response equilibria are not well-defined |
| 169 | +if an information set is not reached due to being the successor of chance |
| 170 | +moves with zero probability. In such games, the implementation treats |
| 171 | +the beliefs at such information sets as being uniform across all member nodes. |
| 172 | + |
| 173 | +.. _simpdiv: |
| 174 | + |
| 175 | +simpdiv |
| 176 | +-------- |
| 177 | + |
| 178 | +Computes approximations to Nash equilibria using a simplicial subdivision |
| 179 | +approach. |
| 180 | + |
| 181 | +This program implements the algorithm of van der Laan, Talman, and van |
| 182 | +Der Heyden [VTH87]_. The algorithm proceeds by constructing a triangulated grid |
| 183 | +over the space of mixed strategy profiles, and uses a path-following |
| 184 | +method to compute an approximate fixed point. This approximate fixed |
| 185 | +point can then be used as a starting point on a refinement of the |
| 186 | +grid. The program continues this process with finer and finer grids |
| 187 | +until locating a mixed strategy profile at which the maximum regret is |
| 188 | +small. |
| 189 | + |
| 190 | +.. _ipa: |
| 191 | + |
| 192 | +ipa |
| 193 | +--- |
| 194 | + |
| 195 | +Computes Nash |
| 196 | +equilibria using an iterated polymatrix approximation approach |
| 197 | +developed by Govindan and Wilson [GovWil04]_. |
| 198 | +This program is based on the |
| 199 | +`Gametracer 0.2 <http://dags.stanford.edu/Games/gametracer.html>`_ |
| 200 | +implementation by Ben Blum and Christian Shelton. |
| 201 | + |
| 202 | +The algorithm takes as a parameter a mixed strategy profile. This profile is |
| 203 | +interpreted as defining a ray in the space of games. The profile must have |
| 204 | +the property that, for each player, the most frequently played strategy must |
| 205 | +be unique. |
| 206 | + |
| 207 | +.. _gnm: |
| 208 | + |
| 209 | +gnm |
| 210 | +--- |
| 211 | + |
| 212 | +Computes Nash |
| 213 | +equilibria using a global Newton method approach developed by Govindan |
| 214 | +and Wilson [GovWil03]_. This program is based on the |
| 215 | +`Gametracer 0.2 <http://dags.stanford.edu/Games/gametracer.html>`_ |
| 216 | +implementation by Ben Blum and Christian Shelton. |
| 217 | + |
| 218 | +The algorithm takes as a parameter a mixed strategy profile. This profile is |
| 219 | +interpreted as defining a ray in the space of games. The profile must have |
| 220 | +the property that, for each player, the most frequently played strategy must |
| 221 | +be unique. |
0 commit comments