|
115 | 115 | converted to Python integers (due to the preparser). Here is an example
|
116 | 116 | showing the Battle of the Sexes::
|
117 | 117 |
|
118 |
| - sage: import gambit # optional - gambit |
119 |
| - sage: g = gambit.Game.new_table([2,2]) # optional - gambit |
120 |
| - sage: g[int(0), int(0)][int(0)] = int(2) # optional - gambit |
121 |
| - sage: g[int(0), int(0)][int(1)] = int(1) # optional - gambit |
122 |
| - sage: g[int(0), int(1)][int(0)] = int(0) # optional - gambit |
123 |
| - sage: g[int(0), int(1)][int(1)] = int(0) # optional - gambit |
124 |
| - sage: g[int(1), int(0)][int(0)] = int(0) # optional - gambit |
125 |
| - sage: g[int(1), int(0)][int(1)] = int(0) # optional - gambit |
126 |
| - sage: g[int(1), int(1)][int(0)] = int(1) # optional - gambit |
127 |
| - sage: g[int(1), int(1)][int(1)] = int(2) # optional - gambit |
128 |
| - sage: solver = gambit.nash.ExternalLCPSolver() # optional - gambit |
129 |
| - sage: solver.solve(g) # optional - gambit |
| 118 | + sage: # optional - gambit |
| 119 | + sage: import gambit |
| 120 | + sage: g = gambit.Game.new_table([2,2]) |
| 121 | + sage: g[int(0), int(0)][int(0)] = int(2) |
| 122 | + sage: g[int(0), int(0)][int(1)] = int(1) |
| 123 | + sage: g[int(0), int(1)][int(0)] = int(0) |
| 124 | + sage: g[int(0), int(1)][int(1)] = int(0) |
| 125 | + sage: g[int(1), int(0)][int(0)] = int(0) |
| 126 | + sage: g[int(1), int(0)][int(1)] = int(0) |
| 127 | + sage: g[int(1), int(1)][int(0)] = int(1) |
| 128 | + sage: g[int(1), int(1)][int(1)] = int(2) |
| 129 | + sage: solver = gambit.nash.ExternalLCPSolver() |
| 130 | + sage: solver.solve(g) |
130 | 131 | [<NashProfile for '': [[1.0, 0.0], [1.0, 0.0]]>,
|
131 | 132 | <NashProfile for '': [[0.6666666667, 0.3333333333], [0.3333333333, 0.6666666667]]>,
|
132 | 133 | <NashProfile for '': [[0.0, 1.0], [0.0, 1.0]]>]
|
|
0 commit comments