You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-18Lines changed: 44 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,32 +8,60 @@ Implementation of the sampled generation method (SGM) for equilibria computation
8
8
9
9
[*M. Carvalho, A. Lodi, J. P. Pedroso, "Computing Nash equilibria for integer programming games". 2020. arXiv:2012.07082*](https://arxiv.org/abs/2012.07082)
10
10
11
-
## Bilateral payoff games
11
+
## Game definition
12
12
13
-
The algorithm is particularly designed for games in which the player have bilaterally-separable payoff functions. This is due to the standard solution method for solving sampled games, which relies on normal form games formulated through the polymatrix. An example of such is the [`QuadraticPayoff`](src/Game/Payoff/BilateralPayoff.jl#L27) structure, which implements the payoff function structure used in the original paper's experiments.
13
+
A game is any list of players. To define a player, you must define the strategy space and the payoff function. The strategy space is handled through JuMP models, while payoff functions are handled by our structures (see Bilateral payoff games below for examples). Additionally, we need to keep track of references for the decision variables and the index of each player in the game.
14
+
15
+
The following illustratest the necessary steps to define a player:
16
+
```julia
17
+
using IPG
18
+
Xp =Model()
19
+
20
+
@variable(Xp, y[1:5], Int)
21
+
@variable(Xp, z >=0)
22
+
23
+
@constraint(Xp, ...) # add your constraints
24
+
25
+
Πp =QuadraticPayoff(...) # payoff definition
26
+
27
+
player =Player(Xp, [z], Πp, 1) # add first player
28
+
```
29
+
Note that not all variables have to be provided to the Player definition, only those necessary to compute the payoff. <!-- TODO: See payoff section -->
30
+
31
+
## Payoff Functions
32
+
33
+
Properly defining the payoff functions are key for the workings of this implementation. Currently, two types of payoff functions are implemented: quadratic and blackbox, which are illustrated in the examples bellow. The former follows the notation of the original paper and allows for any game definition (in terms of constraints) that your solver of choice supports. The latter only works for two-player games. See `src/Game/Payoff` for more details.
14
34
15
-
### Example
35
+
## Examples
36
+
37
+
### Bilateral payoff games
38
+
39
+
The algorithm is particularly designed for games in which the player have bilaterally-separable payoff functions. This is due to the standard solution method for solving sampled games, which relies on normal form games formulated through the polymatrix. An example of such is the [`QuadraticPayoff`](src/Game/Payoff/BilateralPayoff.jl#L27) structure, which implements the payoff function structure used in the original paper's experiments.
16
40
17
41
This example is based on Example 5.3, from Carvalho, Lodi, and Pedroso (2020).
Further details in [`example-5.3.ipynb`](notebooks/example-5.3.ipynb).
46
74
47
-
## Two-player games
75
+
###Two-player games
48
76
49
77
A particular case of bilateral payoff functions that can be handled more generally are two-player games. In this case, because any payoff function is bilateral, we handle the more general [`BlackBoxPayoff`](src/Game/Payoff/Payoff.jl#29) through the SGM algorithm.
50
78
51
-
### Example
52
-
53
79
Example 5.3 implemented using the BlackBoxPayoff structure.
0 commit comments