Two-player zero-sum continous game solver.
Install the package directly from Github. Open Pkg mode with ], then
add https://github.com/votroto/DoubleQuack.jl.gitThis package uses Gurobi. You need a valid license to use it.
Supress debugging output by creating gurobi.env in your current folder, and paste into it the settings:
OutputFlag 0
LogToConsole 0
Consider the following two-player zero-sum continuous game with
and where the strategy spaces are symmetrically defined by
We model it in DoubleQuack as
l(x, y) = x[1]x[2] + x[2]x[3] + x[3]y[1] + x[1]y[3] + y[1]y[2] + y[2]y[3]
g = @game x{3} y{3} begin
-l(x, y)
end
@strategy_set g (x, y) as v in begin
v .>= 0
sum(v) == 1
endThe game has a known saddle point at
Consider the following two-player general-sum continuous game with
The strategy spaces are:
We model it in DoubleQuack as
g = @game x{1} y{1} begin
2 * x[1] * y[1] + 3y[1]^3 - 2x[1]^3 - x[1] - 3x[1]^2 * y[1]^2
2x[1]^2 * y[1]^2 - 4y[1]^3 - x[1]^2 + 4y[1] + x[1]^2 * y[1]
end
@strategy_set g (x, y) in [-1, 1]Find the
result = solve(g, eps=1e-3, max_iters=20)
DoubleQuack.clean_print_ne(result)the result is a mixed strategy