Skip to content

rorysmead/GameTheory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 

Repository files navigation

An easy-to-use resource created by Luke Currier and Rory Smead for modeling replicator dynamics using Python!

Guide to Running Simulations

How to run in Google Colab:

  1. Go to https://colab.google/.

  2. In the upper right corner, click New Notebook.

  3. Once in your notebook, click File -> Upload Notebook -> Github.

  4. Search for "rorysmead/gametheory".

  5. Select "Current Version". It should load automatically.

  6. Once in the notebook, you need to run the first two cells before you can run the third cell containing run(). You can do that using Shift->Return or by pressing the play button in the top left corner of the cell.

  7. Once you've done that, you're off to the races! You can create new matrices by using the same format as the others in the second code cell (make sure you type your brackets and commas carefully, we'll try to figure out a better way of doing this soon!).

  8. Additionally, you can edit mutation and correlation levels as well as change how the output appears using the variables listed below and in the notebook.

Variables:

Mutation: mu
Default value: 0.00
The chance of mutation, from 0 to 1.

Correlation: r
Default value: 0.00
The chance of correlation, from 0 to 1.

Number of Runs: runs
Default value: 10
The number of times the program runs a randomized simulation according to the provided matrix.
The program will average results from all runs to arrive at a percentage spread of strategies.

Maximum Number of Generations: maxgen
Default value: 1000
The maximum number of replications in a given simulation.
This number will not be reached by most traditional games.

Print Runs: printruns
Default value: True
A boolean (True or False) that determines if the simulation shows results for each individual run in addition to the averaged results.

Print Generations: printgen
Default value: True
A boolean (True or False) that determines if the simulation shows how many generations it took for the simulation to stabilize.

Random Matrix: randfill
Default value: True
A boolean (True or False) that determines whether the matrix has random or uniform distribution.

About

Code & Projects related to Game Theory and Modeling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •