Skip to content

Commit da39ba1

Browse files
authored
Merge pull request #27 from MBN04/FixesNashExample_11_24
Fixed Typos
2 parents e424a72 + 182bc61 commit da39ba1

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

content/examples/nash.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ This results gives us that there are 10 such partitions. This is also the maxima
103103

104104
How do we calculate this in Julia using `HomotopyContinuation.jl`? We do not need to eliminate our system to 6 equations as before, since the calculation is already very fast. However, the observation was crucial in order to observe the relation to product of simplices and mixed volume.
105105

106-
Let us choose $81$ rational number for payoff matrices of three players and declare the variables and the system of 12 multilinear equations.
106+
Let us choose $81$ rational numbers for the payoff matrices of three players and declare the variables and the system of 12 multilinear equations.
107107
```julia
108108
using HomotopyContinuation
109109

@@ -166,14 +166,14 @@ real_solutions(res)
166166
[0.14285714285714288, 0.28571428571428575, 0.5714285714285714, 0.375, 0.37499999999999994, 0.25000000000000006, 0.5555555555555556, 0.1111111111111111, 0.33333333333333326, 95.44444444444444, 73.11111111111111, 121.35714285714286]
167167

168168
valid_real_solutions = filter(s -> all(s[1:9] .> 0), real_solutions(res))
169-
1-element Array{Array{Float64,1},1}:
169+
1-element Vector{Vector{Float64}}:
170170
[0.14285714285714288, 0.28571428571428575, 0.5714285714285714, 0.375, 0.37499999999999994, 0.25000000000000006, 0.5555555555555556, 0.1111111111111111, 0.33333333333333326, 95.44444444444444, 73.11111111111111, 121.35714285714286]
171171
```
172172

173173
This is actually a rational solution. We use a chained fraction approximation to find the rational approximation and evaluate it to see if this is the correct one. It turns out that this specific 3-person game has exactly one totally mixed Nash equilibrium.
174174
```julia
175175
rat = rationalize.(valid_real_solutions[1], tol = 1e-8)
176-
12-element Array{Rational{Int64},1}:
176+
12-element Vector{Rational{Int64}}:
177177
1//7
178178
2//7
179179
4//7
@@ -188,19 +188,19 @@ rat = rationalize.(valid_real_solutions[1], tol = 1e-8)
188188
1699//14
189189

190190
f(rat)
191-
12-element Array{Int32,1}:
192-
0
193-
0
194-
0
195-
0
196-
0
197-
0
198-
0
199-
0
200-
0
201-
0
202-
0
203-
0
191+
12-element Vector{Float64}:
192+
0.0
193+
0.0
194+
0.0
195+
0.0
196+
0.0
197+
0.0
198+
0.0
199+
0.0
200+
0.0
201+
0.0
202+
0.0
203+
0.0
204204
```
205205

206206
{{<bibtex >}}

0 commit comments

Comments
 (0)