Skip to content

keyskey/SPDpy

Repository files navigation

SPD

Multi agent simulation code of Spatial Prisoner's Dilemma(SPD) Game on a complex network.

Example game situation Time evolution
C: Cooperator, D: Defector Blue: Cooperator, Red: Defector

Requierements:

You need to install Python3 with Anaconda distribution.

When running the simulation, just type
$ python SPD.py
on your terminal. You can visualize the result with heatmap.py.
$ python heatmap.py

Depending on the topology and strategy update rule, you can see various Dg-Dr diagram which shows the percentage of cooperative people at evolutionary equilibrium state.

Imitation max strategy update on lattice Pairwise-Fermi strategy update on BA-Scale Free network
(Dg: Chicken type Dilemma, Dr: Stag-Hunt type Dilemma)

Network topology can be selected from these three types.
1. Lattice(2D Grid, default setting)
2. Random Regular Network (Equally mixed network)
3. Barabashi-Albert Scale Free Network (Typically observed in SNS)

Releases

No releases published

Packages

No packages published

Languages