Skip to content

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 explore evolution of cooperation, conditional defection, and mechanisms like kin selection, spatial structure, and punishment.

License

Notifications You must be signed in to change notification settings

Ahmed-Ibrahim33/Conditional-Defector-Simulations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conditional Defector Simulations

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.

Models

  • 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.

How to Run

🟢 NetLogo version

  1. Download and install NetLogo (version 6.1.1 or later).
  2. Open any .nlogo file in NetLogo.
  3. Click Setup then Go to run the simulation.
  4. Adjust sliders for parameters like Percent-Sustainables, Mutation-rate, etc.

🐍 Python version (Matplotlib animation)

Prerequisites

  1. Python 3.7+
  2. Required packages: numpy, matplotlib, scipy

Citation

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

License

MIT License - See LICENSE file.

About

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 explore evolution of cooperation, conditional defection, and mechanisms like kin selection, spatial structure, and punishment.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published