Get the latest tech news
Finding Nash equilibria through simulation
The Python code described here focuses on the area of Game Theory involving simultaneous games, such as the Prisoner's Dilemma and Rock, Paper, Scissors. Each game is played multiple times between multiple participants to determine and then visualize the pure and mixed-strategy Nash Equilibria (NEs).
There may be several NEs for a given matrix, and by generating multiple graphs, we give the program a chance to converge on different results depending on how the random process develops. Although there appears to be two distinct results generated across the ten games, they're actually identical since the 3D alpha blending of the orange and blue points sometimes favors one color over the other. sim22.py, sim33.py, sim44.py, and simNN.py utilize the same code for playing simultaneous games based on a payoff matrix by calling functions in gtUtils.py and instantiating multiple Player objects.
Or read this on Hacker News