This repository contains Python and NetLogo simulations based on the paper "The conditional defector strategies can violate the most crucial supporting mechanisms of cooperation" (Scientific Reports, 2022). The models examine the evolution of cooperation, conditional defection, and mechanisms such as kin selection, group selection, spatial structure, and punishment.
- Conditional Defection (cooperate for the spread)_group_dispersal.nlogo: Models group dispersal and conditional defection. (the first model)
- Python NetLogo-like model group dispersal Matplotlib Animation: This model is an enhanced Python-based implementation of the first model described in the article.
- Evolution_of_sustainability_through_monitoring_and_punishment.nlogo: Focuses on monitoring and punishment in resource management. (the second model)
- Conditional Defection in the Commons Pay to escape: It is an updated NetLogo implementation of the second model described in the article.
- Download and install NetLogo (version 6.1.1 or later).
- Open any
.nlogofile in NetLogo. - Click Setup then Go to run the simulation.
- Adjust sliders for parameters like
Percent-Sustainables,Mutation-rate, etc.
- Python 3.7+
- Required packages:
numpy,matplotlib,scipy
Ibrahim, A.M. The conditional defector strategies can violate the most crucial supporting mechanisms of cooperation. Sci Rep 12, 15157 (2022).. DOI: https://doi.org/10.1038/s41598-022-18797-2
MIT License - See LICENSE file.