Skip to content

woaiqingqing/PEGpy

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)

About

网络演化博弈仿真

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages