This repo contains code for our submission titled Second-Order Algorithms for Finding Local Nash Equilibria in Zero-Sum Games.
We use Julia for our implementation. To run this code,
- Open the Julia REPL.
- In the REPL, type
]to open package mode. Then enter the commandactivate .. - Exit package mode by hitting backspace.
- Run
import Pkg, Pkg.instantiate()to download all dependencies. You may need to runPkg.resolve()before. - You are now ready to run experiments.
- To generate unconstrained toy example results: run
include("experiments\\ToyExample\\src\\RandomToyExample.jl"). - To generate constrained toy example results: run
include("experiments\\ToyExample\\src\\TestConstrained1.jl")andinclude("experiments\\ToyExample\\src\\TestConstrained2.jl"). To generate additional result given in appendix: runinclude("experiments\\ToyExample\\src\\ToyExample.jl"). To generate plot of CESP diverging: runinclude("experiments\\ToyExample\\src\\TestCESP.jl"). - For the GAN example:
-
Go to the
GANExampledirectory in the terminal:cd experiments/GANExample/and start Julia REPL withjulia. -
Activate the environment via
]andactivate .. -
Precompile the package:
using GANExample. -
To run training for GDA:
GANExample.train_gan_standard(). -
To run training for LSS:
GANExample.train_gan_zero_sum(; approach = "mazumdar"). -
To run training for our approach:
GANExample.train_gan_zero_sum(; approach = "ours_optimizer"). -
To reproduce the result plots:
GANExample.plot_gan_example_comparison().