Giter Site home page Giter Site logo

nikoleta-v3 / game-theory-and-python Goto Github PK

View Code? Open in Web Editor NEW
168.0 10.0 63.0 140 KB

Game Theory and Python, a workshop investigating repeated games using the prisoner's dilemma

License: MIT License

Jupyter Notebook 93.06% Python 2.40% Shell 0.09% TeX 4.45%
game-theory python axelrod-python-library ipd

game-theory-and-python's Introduction

Game-Theory-and-Python

image

image

image

image

This is a repository created to run a workshop on Game Theory using the programming language Python and more specifically an open-source software called the Axelrod Python library.

The topics being covered in this workshop are the following:

  1. An introduction to game theory and the Iterated Prisoner's Dilemma
  2. Creating matches and tournaments using Axelrod-Python
  3. Writing strategies and contributing to Axelrod-Python
  4. Playing against strategies of the Iterated Prisoner's Dilemma

Installing Python

There are various distributions of Python. I recommend using Anaconda which comes packaged with a variety of tools, such as Jupyter Notebooks.

This tutorial is written in Jupyter Notebooks.

Virtual Environment

This repository comes with an environment.yml file. The environment.yml file will allow you to create an Anaconda environment. To do that use the terminal or an anaconda prompt and after you have navigated to the repository just type:

$ conda env create -f environment.yml

The environment can be activated by typing:

$ conda activate game-python

and notebooks can also run in it. To do that you will have to select (from within a running notebook) Kernel and under Change Kernel select the environment game-python.

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 hours workshop.

Suggested timetable:

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:

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

All contributions are welcome! This may include communicating ideas for new sections, letting us know about bugs, and code contributions.

Events

This tutorial has been used in the following events:

Have you used this tutorial in an event you hosted or participated? Please do let me know by either contacting me or feel free to open a pr adding your event to this list.

License

The code in this repository, including all code samples in the notebooks listed above, is released under the MIT license.

game-theory-and-python's People

Contributors

drvinceknight avatar gopuneet avatar jeffthek avatar nikoleta-v3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

game-theory-and-python's Issues

Update tutorial

Update tutorial with the latest axelrod and make tutorial more readable.

Usage: mini presentation

"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."

Have you presented this material at a workshop before? If so, it would be beneficial to provide a link to the mini presentation for other instructors to adapt.

Notebook 2: add precision that payoff matrix is identical to notebook 1

I was reading the 2nd notebook on matches and tournaments and found myself re-scrolling to be sure I didn't miss the rules of individual games (the payoff matrix), I had to look up the linked doc which indicates that the payoff matrix is indeed the same as in the prisoner's dilemma. Maybe add a precision at the beginning of the notebook that the payoff matrix is identical?

Issue created within the JOSE review openjournals/jose-reviews#78

Version: no release

Version: Does the release version given match the repository release (v.0.0.1)?

Please create a release and update the version accordingly

Statement of Need

"The authors should clearly state what problems the software is designed to solve and who the target audience is."

In the Introduction, you do a great job describing the problem. However, It is not clear who the intended target audience is from text.

Add material to the tutorial

The iterated prisoner's dilemma studies also include tournaments with spatial topologies and
evolutionary dynamics (Moran processes). Both are implemented withing Axelrod Python and both topics could potentially have their own sections in the tutorial.

JOSE: matches and tournaments

For independent learner, it would be very helpful to annotate the notebooks with verbose comments and/or explanations for the output of the commands.

Without some comments, the modules may not be self contained for self learner. For example, a small explanation for the result of the match Cooperator vs Random

[(C, D), (C, D), (C, C), (C, C), (C, D)]

JOSE Paper: tell the "story"

Does the paper tell the "story" of how the authors came to develop it, or what their expertise is?

The paper does not clearly tell the narrate the story.

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.