Giter VIP home page Giter VIP logo

evoplex / model-prisonersdilemma Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 2.0 407 KB

This is a model plugin for Evoplex. It implements the spatial prisoner's dilemma game proposed by Nowak, M. A., & May, R. M. (1992). Evolutionary games and spatial chaos. Nature, 359(6398), 826.

Home Page: https://evoplex.org

License: MIT License

CMake 42.38% C++ 57.62%
evoplex evoplex-model evolutionary-game-theory cooperation prisoner-dilemma-simulation prisoners-dilemma game-theory

model-prisonersdilemma's Introduction

Prisoner's Dilemma Game

What is it?

This is a model plugin for Evoplex and is included by default in the software.

It implements the spatial prisoner's dilemma game proposed by Nowak & May (1992) [1].

How it works

In this model, agents are placed in a grid, where in each round:

  • every individual accumulates the payoff obtained by playing the prisoner's dilemma game with all its immediate neighbours and itself (only for the current round);
  • after this, each agent copies the strategy of the best performing agent in its neighbourhood (including itself).

This simple, and purely deterministic, spatial version of the prisoner's dilemma game, with no memories among players and no strategical elaboration, can generate chaotically changing spatial patterns, including kaleidoscopes, dynamic fractals, gliders, and so on.

Examples

Evoplex

The figure below shows a screenshot of an experiment in Evoplex using this model. In this experiment, the model is initialized with a population of 99x99 cooperators (i.e., all agents with strategy=0); after this, we place one defector (strategy=1) in the middle of the grid. In a few steps, it is possible to observe the formation of different patterns.

Example

References

How to cite

If you mention this model or the Evoplex software in a publication, please cite it as:

Cardinot, M., O’Riordan, C., Griffith, J., & Perc, M. (2019). Evoplex: A platform for agent-based modeling on networks. SoftwareX, 9, 199-204. https://doi.org/10.1016/j.softx.2019.02.009

@article{Evoplex,
author = "Marcos Cardinot and Colm O’Riordan and Josephine Griffith and Matjaž Perc",
title = "Evoplex: A platform for agent-based modeling on networks",
journal = "SoftwareX",
volume = "9",
pages = "199 - 204",
year = "2019",
issn = "2352-7110",
doi = "10.1016/j.softx.2019.02.009",
url = "http://www.sciencedirect.com/science/article/pii/S2352711018302437"
}

License

This plugin is licensed under the MIT License terms.

model-prisonersdilemma's People

Contributors

cardinot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.