Skip to content

Latest commit

 

History

History
146 lines (125 loc) · 7.78 KB

paper.md

File metadata and controls

146 lines (125 loc) · 7.78 KB
title tags authors affiliations date bibliography
Game Theory and Python: An educational tutorial to game theory and repeated games using Python
game theory
repeated games
prisoner's dilemma
axelrod python
name orcid affiliation
Nikoleta E. Glynatsi
0000-0002-2943-3622
1,2
name orcid affiliation
Vincent A. Knight
0000-0002-4245-0638
1
name index
Department of Mathematics, Cardiff University, Senghennydd Rd, Cardiff CF24 4AG
1
name index
Max Planck Institute for Evolutionary Biology, August-Thienemann-Straße 2, 24306 Plön
2
5 December 2019
paper.bib

Summary

These materials are an open-source educational tutorial aimed at introducing participants to game theory and more specifically to repeated games. The tutorial uses the open-source library called Axelrod-Python and Jupyter Notebooks making this an open-source, reproducible and interactive tutorial.

Statement of Need

We are mathematicians and Python programmers with interests in game theory and pedagogy. This tutorial was created as a resource for computer workshops and for introducing mathematicians to programming. As a result, this tutorial is aimed at two groups of individuals:

  • those familiar with Python (programmers) who want to start to learn game theory,
  • mathematicians with little or no programming knowledge as a pathway to programming through the interesting subject that is game theory

Game theory is a field of applied mathematics interested in strategic interactions. Game theory itself has a number of subfields and the one considered in this tutorial is the area of repeated games. Repeated games have been the subject of research [@Axelrod1981; @Nowak2006; @Glynatsi2021] but have also been used extensively as an entry to the subject for students at undergraduate level courses [@Brokaw2004; @Knight2015]. This tutorial focuses on the Iterated Prisoner's Dilemma. The advantage of studying the Iterated Prisoner's Dilemma is that it models situations in which self-interest clashes with collective interest, thus it provides a framework for illustrating the usage of mathematics in real-life decision making.

Content

These materials consist of four tutorials that focus on the Iterated Prisoner's Dilemma, the notion of strategies and computer tournaments whilst using Axelrod-Python [@axelrodproject].

In 1980, a political scientist called Robert Axelrod ran a computer tournament of the Iterated Prisoner’s Dilemma where strategies written in computer code would repeatedly choose between self and collective interest. The strategies would decide on their next action using the history of previous interactions and the winner was decided based on the average score. The open-source package Axelrod-Python was created in order to reproduce Axelrod's original work but to also serve as an educational and research tool.

Following the tutorial, participants will be able to reproduce Axelrod's tournament but also create their own unique tournaments from a selection of more than 200 strategies. Furthermore, participants will be able to progress their comprehension of the topic by producing strategies and implement them in Python. The new strategies can then be placed in different tournaments in order to access their success and weakness. This progression of the tutorial fits within a constructive framework of learning [@Jordan2008] and, by the nature of participants actively writing the required software, an active learning setting [@Freeman2014]. Participants with knowledge of Python will benefit from an understanding of game theory and participants with no knowledge of Python will also be introduced to basic programming concepts through the tangible ideas of the Prisoner's Dilemma.

Usage

The tutorial Game Theory and Python can be used in a workshop environment or through independent learning.

These instructions can also be found in the README. Though we recommend that the material can be covered in 2 hours, in both a workshop environment and through independent learning, some audience/learners might need more time to complete all the exercises. We recommend any facilitator/learner to adjust as necessary.

Recent Uses

This tutorial was originally formulated to run a game theory workshop at PyCon Namibia 2017. It has attracted the attention of the community ever since and has been used in other events.

Acknowledgements

The tutorial has been made possible due to the existence of the open-source package Axelrod-Python. We would like to express our appreciation to the maintainers of the package as well as anyone that has ever contributed to it.

References