Applying Nash game code for prisoners' dilemma and stag hunt using an agent based model in a grid.
simple setup install anaconda and try running stag_hunt_context.py
You should see grid populated with stags, rabbits, and foxes. The foxes then play a nash game to determine if the cooperate to hunt stag or defect to hunt rabbit(s), along with a color coded grid and a digraph of the gameboard.
In a classic, pure nash game points are awarded every round. In this contextual version the spareness of the grid allows a commensal state to emerge where two agents cannot play due to a lack of dependencies in their environment.
[email protected] - code, game theory
[email protected] - general mathematics, Lotka–Volterra
[email protected] - project management, visual design
[email protected] - code, game theory