Skip to content

mp2516/Game-Theory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game Theory Simulator

Summary

This game-theory simulator can play a number of different games

Rock-Paper-Scissors

Game Modes

  • Pure Only pure strategies are only allowed. Worth varying:
    • The biome sizes
    • The probability of adoption and mutation
    • The initial population proportions
  • Pure and Perfect pure strategies and perfect mixed are in play here.
  • Imperfect only the imperfect_mixed strategies are present. Vary:
    • The strength of adoption
    • The probability of mutation

Strategies

  • pure_rock always plays rock
  • pure_scissors always plays scissors
  • pure_paper always plays paper
  • perfect_mixed chooses rock, paper or scissors with an equal probability
  • imperfect_mixed chooses rock, paper or scissors with an unequal probability

Prisoner's Dilemma

The Prisoner's Dilemma demonstrates how simple rules can lead to the emergence of widespread cooperation, despite the Defection strategy dominating each individual interaction game. However, it is also interesting for another reason: it is known to be sensitive to the activation regime employed in it.

Game Modes

  • All Strategies implements all the below strategies against each other, tit_for_tat will usually win, but consider varying:
    • The initial population sizes

Strategies

  • all_c always cooperates
  • all_d always defects
  • tit_for_tat cooperates on the first move then plays what its opponent played the previous move (Rapoport & Chammah 1965).
  • spiteful cooperates until the opponent defects and thereafter always defects (Axelrod 2006). Sometimes also called grim.
  • random chooses cooperate or defect at random.

General Concepts

  • biomes. Biomes are areas of homogenous strategies, they are squares on the grid and are dictated by the biome_size, an attribute of the model module.

Files

  • run.py is the entry point for the front-end simulations.
  • agent.py: contains the agent class which dictates how the agents play each other. Here the strategies of the agents are determined and the evolution of the agent's strategies is determined model.py: contains the model level data including the position of all the agents and the agent schedule. The datacollector collects data about the populations of each strategy.
  • config.py is the interpreter of the json config files.
  • logger.py provides the format for including logger statements as part of the code
  • server.py runs the visualisation element of the program. Agents are represented with a percentage of their RBG colour while as the probabilities that they will play Rock, Paper or Scissors. The datacollector info is outputted as a chart.

Further Reading

Prisoner's Dilemma

Epstein, J. Zones of Cooperation in Demographic Prisoner's Dilemma. 1998.

Optimal Strategies of the Iterated Prisoner’s Dilemma Problem for Multiple Conflicting Objectives

Rock-Paper-Scissors

Non-linear dynamics of rock-paper-scissors with Mutations

Cyclic dominance in evolutionary games: a review

Oscillitory dynamics of Rock-Paper-Scissors

Effects of competition on pattern formation in the rock-paper-scissors game

Mobility promotes and jeopardises biodiversity in rock-paper scissors game

The Influence of Mobility Rate on Spiral Waves in Spatial Rock-Paper-Scissors Games

Nonlinear Aspects of Competition Between Three Species

Noise and Correlations in a Spatial Population Model with Cyclic Competition

A textbook like paper describing the fundementals of evolutionary games, cited as the founding paper of the field. Evolutionary games and population Dynamics

Mobility promotes and jeopardises biodiversity in rock-paper scissors game

1994, a fundemental paper that started the field off Vortices and Strings in Model ecosystems

Real World Applications

Volunteering leads to rock–paper–scissors dynamics in a public goods game

About

BSc Project with Imperial College. Supervised by Dr Dave Clements.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published