- Moran [Py]cess
The following git repository presents a general game-theoretical framework to carry out scientific simulations according to the Moran model. Registering distinct types of individuals together with specification of payoffs between them allows to replicate evolution of the population and observe growth dynamics.
Simulations of population evolution according to four basic models of game theory: (A) Stag Hunt, (B) Chicken, (C) Prisoners Dilemma, (D) Rock-Paper-Scissors
Average payoff for an individual is calcualted based on interactions with 8 direct neighbours of a given individual (2D grid). Periodic boundary conditions are applied.
Population snapshots during an evolution according to a Prisoners Dilemma model. Starting from a small subpopulation of Defectors (A, t=0) we observe gradual growth (B, t=50000), (C, t=200000) until the whole population is almost completely overtaken (D, t=500000).
Growth curve for the population evolution according a Prisoners Dilemma model.
Average payoff for an individual is calcualted based on interactions with 26 direct neighbours of a given individual (3D grid). Periodic boundary conditions are applied.
Growth curve for the population evolution according a Prisoners Dilemma model.
Our software is built as a Python 3 package. Keeping research reproducibility in mind in this repository we provide a recipe for conda virtual environments which would contain all the required dependencies in their proper versions.
We provide a YAML-formatted list of dependencies for the software execution here.
We provide a YAML-formatted list of dependencies for the software development here.
Please inspect the files above for a detailed list of dependencies and their versions.
To install the latest version of miniconda please execute:
[Linux]:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
source .bashrc
[macOS]:
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh
source .bashrc
Please use git to clone this repository into a desired location (here: moran-simulator
) with the following command:
git clone https://github.com/AngryMaciek/angry-moran-simulator moran-simulator
Dedicated environment might be created and activated with the following commands:
cd moran-simulator
conda env create -f env/main.yml
conda activate moranpycess
Finally, please install our package into the new virtual environment with the Python package manager:
pip install .
Inspect the documentation & how-to here.
This project lives off your contributions, be it in the form of bug reports, feature requests, discussions, or fixes and other code changes. Please refer to the contributing guidelines if you are interested to contribute. Please mind the code of conduct for all interactions with the community.
For questions or suggestions regarding the code, please use the issue tracker.
MIT License