Skip to content

Commit

Permalink
Preparing Paper for JOSE (#19)
Browse files Browse the repository at this point in the history
* First draft of paper

* draft paper for JOSE

* Make some minor suggestions (#18)

You should also include a couple of references. Take a look at https://vknight.org/tch-phi/ and https://vkcfm.readthedocs.io/en/latest/pedagogic-setting/index.html for some suggestions (but we can chat too 👍).

* New draft for the paper after addressing Vince's comments

* minor corrections

* minor corrections and add paper.bib

* addressing some of the comments

* add references and minor markdown tweaks

* corrections

A final read through the material before asking for review

* bullet point timetable

* fix paper details and a small typo

* fix identation of details

* Error occures with python 3.8

For now use python 3.6

* add paragraph to statement of need

* removes the folder paper and moves the file to the main tree

* fixes references

* add reference to axelrod-python reference
  • Loading branch information
Nikoleta-v3 authored Dec 5, 2019
1 parent 564db0d commit 6c5a06a
Show file tree
Hide file tree
Showing 5 changed files with 247 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Pycharm files
.idea/

# VScode feils
.vscode/

# Notebook files
.ipynb_checkpoints/

Expand Down
55 changes: 51 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ an open source software called the `Axelrod Python library <https://github.com/A

The topics being covered in this workshop are the following:

1. `An introduction to Game theory and the iterated prisoner's dilemma <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/1.%20Introduction.ipynb>`_
2. `Creating matches and tournaments using the Axelrod library <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/2.%20Matches%20and%20Tournaments.ipynb>`_
3. `Writing strategies and contributing to the Axelrod library <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/3.%20Writing%20a%20Strategy.ipynb>`_
4. `Playing against strategies of the iterated prisoner's dilemma <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/4.%20Human%20Strategy.ipynb>`_
1. `An introduction to game theory and the Iterated Prisoner's Dilemma <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/1.%20Introduction.ipynb>`_
2. `Creating matches and tournaments using Axelrod-Python <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/2.%20Matches%20and%20Tournaments.ipynb>`_
3. `Writing strategies and contributing to Axelrod-Python <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/3.%20Writing%20a%20Strategy.ipynb>`_
4. `Playing against strategies of the Iterated Prisoner's Dilemma <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/4.%20Human%20Strategy.ipynb>`_

Installing Python
-----------------
Expand Down Expand Up @@ -44,6 +44,53 @@ and notebooks can also run in it. To do that you will have to select (from withi
a running notebook) `Kernel` and under `Change Kernel` select the environment
`game-python`.

Usage
-----

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

**Workshop:** The material have been designed for a 2 hours workshop.

Suggested timetable:

- 0:00 - 0:15 Installation (guidelines are given above)
- 0:15 - 0:30 `An introduction to game theory and the Iterated Prisoner's
Dilemma <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/1.%20Introduction.ipynb>`_
- 0:30 - 0:55 `Creating matches and
tournaments using Axelrod-Python <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/2.%20Matches%20and%20Tournaments.ipynb>`_
- 0:55 - 1:20 `Writing strategies and contributing to Axelrod-Python <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/3.%20Writing%20a%20Strategy.ipynb>`_
- 1:20 - 1:50 `Playing against strategies of the Iterated Prisoner's Dilemma <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/4.%20Human%20Strategy.ipynb>`_
- 1:50 - 2:00 Closing remarks and wrapping up

In a workshop
environment we suggest that the instructor has familiarized themselves with the
written parts of the tutorial beforehand. For each notebook it is advised that
the instructor gives a mini presentation to the topic followed by them typing
out/running the material while the participants follow in their own machines.
The instructor should encourage the participants to try the exercises of each
notebook alone or with other participants. Before moving to the next notebook
the instructor should encourage a discussion amongst everyone regarding the
results of the exercises each had and their interpretation.

**Independent Learning:** An independent learner should aim to spend 2 hour on the material.

Suggested timetable:

- 0:00 - 0:15 Installation (guidelines are given above)
- 0:15 - 0:30 `An introduction to game theory and the Iterated Prisoner's
Dilemma <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/1.%20Introduction.ipynb>`_
- 0:30 - 1:00 `Creating matches and
tournaments using Axelrod-Python <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/2.%20Matches%20and%20Tournaments.ipynb>`_
- 1:00 - 1:30 `Writing strategies and contributing to Axelrod-Python <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/3.%20Writing%20a%20Strategy.ipynb>`_
- 1:30 - 2:00 `Playing against strategies of the Iterated Prisoner's Dilemma <https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/4.%20Human%20Strategy.ipynb>`_

If the tutorial is being followed by an
individual learner, we suggest that the learner reads the written parts of
each notebook followed by running the tutorial and completing the exercises.
The individual should take some time to reflect on the results of each
notebook and their interpretation.

Contributions
-------------

Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: game-python
channels:
- defaults
dependencies:
- python=3.6
- pip:
- axelrod==4.3.0
- ipython==6.4.0
Expand Down
58 changes: 58 additions & 0 deletions paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@article{Axelrod1981,
title={The evolution of cooperation},
author={Axelrod, Robert and Hamilton, William D},
journal={science},
volume={211},
number={4489},
pages={1390--1396},
year={1981},
publisher={American Association for the Advancement of Science}
}

@misc{Weir2009,
title={Approaches to learning: a guide for teachers},
author={Weir, Jennifer},
year={2009},
publisher={ROUTLEDGE JOURNALS, TAYLOR \& FRANCIS LTD 4 PARK SQUARE, MILTON PARK~…}
}

@article{Freeman2014,
title={Active learning increases student performance in science, engineering, and mathematics},
author={Freeman, Scott and Eddy, Sarah L and McDonough, Miles and Smith, Michelle K and Okoroafor, Nnadozie and Jordt, Hannah and Wenderoth, Mary Pat},
journal={Proceedings of the National Academy of Sciences},
volume={111},
number={23},
pages={8410--8415},
year={2014},
publisher={National Acad Sciences}
}

@misc{axelrodproject,
author = {{ {The Axelrod project developers} }},
title = {Axelrod: version 4.3.0},
month = apr,
year = 2016,
doi = {10.5281/zenodo.1405868},
url = {http://dx.doi.org/10.5281/zenodo.<DOI NUMBER>}
}

@article{Brokaw2004,
title={Active learning with Monty Hall in a game theory class},
author={Brokaw, Alan J and Merz, Thomas E},
journal={The Journal of Economic Education},
volume={35},
number={3},
pages={259--268},
year={2004},
publisher={Taylor \& Francis}
}

@article{Knight2015,
title={Playing Games: A Case Study in Active Learning Applied to Game Theory},
author={Knight, Vincent},
journal={MSOR Connections},
volume={14},
number={1},
pages={28--38},
year={2015}
}
134 changes: 134 additions & 0 deletions paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
title: "Game Theory and Python: An educational tutorial to game theory and repeated games using Python"
tags:
- game theory
- repeated games
- prisoner's dilemma
- axelrod python
authors:
- name: Nikoleta E. Glynatsi
orcid: 0000-0002-2943-3622
affiliation: 1
- name: Vincent A. Knight
orcid: 0000-0002-4245-0638
affiliation: 1
affiliations:
- name: Department of Mathematics, Cardiff University, Senghennydd Rd, Cardiff CF24 4AG
index: 1
date: 5 December 2019
bibliography: 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](https://jupyter.org) making this an open source, reproducible and
interactive tutorial.

# Statement of Need

This tutorial could be used by individuals familiar with Python to start to learn
Game Theory but could also be used 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 sub fields and the one
considered in this tutorial is the area of repeated games. Repeated games have
been the subject of research [@Axelrod1981] 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 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 using
Python code. The new strategies then can 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 [@Weir2009] and, by the nature
of participants actively writing the required software, an active learning
setting [@Freeman2014]. Participants with a 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.

* **Workshop:** The material have been designed for a 2 hour workshop. A suggested
timetable is:
- 0:00 - 0:15 Installation (guidelines are given in the
[README](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/README.rst))
- 0:15 - 0:30 [An introduction to game theory and the Iterated Prisoner's
Dilemma](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/1.%20Introduction.ipynb)
- 0:30 - 0:55 [Creating matches and
tournaments using Axelrod-Python](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/2.%20Matches%20and%20Tournaments.ipynb)
- 0:55 - 1:20 [Writing strategies and contributing to Axelrod-Python](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/3.%20Writing%20a%20Strategy.ipynb>)
- 1:20 - 1:50 [Playing against strategies of the Iterated Prisoner's Dilemma](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/4.%20Human%20Strategy.ipynb)
- 1:50 - 2:00 Closing remarks and wrapping up

In a workshop environment we suggest that the instructor has familiarized
themselves with the written parts of the tutorial beforehand. For each
notebook it is advised that the instructor gives a mini presentation to the
topic followed by them typing out/running the material while the participants
follow in their own machines. The instructor should encourage the participants
to try the exercises of each notebook alone or with other participants. Before
moving to the next notebook the instructor should encourage a discussion
amongst everyone regarding the results of the exercises each had
and their interpretation.
- **Independent Learning**: An independent learner should aim to spend the same
amount of time on the material, approximately 2 hours. A suggested
timetable is:
- 0:00 - 0:15 Installation (guidelines are given in the
[README](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/README.rst))
- 0:15 - 0:30 [An introduction to game theory and the Iterated Prisoner's
Dilemma](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/1.%20Introduction.ipynb)
- 0:30 - 1:00 [Creating matches and
tournaments using Axelrod-Python](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/2.%20Matches%20and%20Tournaments.ipynb)
- 1:00 - 1:30 [Writing strategies and contributing to Axelrod-Python](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/3.%20Writing%20a%20Strategy.ipynb>)
- 1:30 - 2:00 [Playing against strategies of the Iterated Prisoner's Dilemma](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/4.%20Human%20Strategy.ipynb)

If the tutorial is being followed by an individual learner, we suggest that
the learner reads the written parts of each notebook followed by running the
tutorial and completing the exercises. The individual should take some time to
reflect on the results of each notebook and their interpretation.

These instructions can also be found in the [README](https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/master/README.rst).

# Recent Uses

This tutorial was originally formulated to run a Game Theory workshop at [PyCon
Namibia 2017](https://na.pycon.org/pycon-namibia-2017/). It has attracted
attention of the community ever since and has been used in various others
events.

# Acknowledgements

The tutorial has been made possible due to the existence of the open source package
[Axelrod-Python](https://github.com/Axelrod-Python/Axelrod). We would like to
express our appreciation to the maintainers of the package as well as
anyone that has ever contributed to it.

# References

0 comments on commit 6c5a06a

Please sign in to comment.