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

Overview

Game-Theory-and-Python

https://img.shields.io/github/workflow/status/Nikoleta-v3/Game-Theory-and-Python/ci

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.

Comments
  • JOSE Paper: tell the

    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.

    opened by sconde 1
  • Notebook 2: add precision that payoff matrix is identical to notebook 1

    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 https://github.com/openjournals/jose-reviews/issues/78

    opened by matbesancon 0
  • JOSE: matches and tournaments

    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)]
    
    opened by sconde 0
  • Usage: mini presentation

    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.

    opened by sconde 0
  • hard coded prefix

    hard coded prefix

    https://github.com/Nikoleta-v3/Game-Theory-and-Python/blob/a62241001902f2bb39765750dbcc89596167a983/environment.yml#L13

    This is very specific to your machine. Please update for easy installation for other users. Or note properly in README to be updated.

    opened by sconde 0
  • Statement of Need

    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.

    opened by sconde 0
  • update travils yml

    update travils yml

    Travis CI released an update to their Xenial build environment, which introduced a new way to start up XVFB for front-end builds.

    This fixes the travis failure.

    opened by Nikoleta-v3 0
  • Make some minor suggestions

    Make some minor suggestions

    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 :+1:).

    opened by drvinceknight 0
  • Bump ipython from 6.4.0 to 7.16.3

    Bump ipython from 6.4.0 to 7.16.3

    Bumps ipython from 6.4.0 to 7.16.3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Add material to the tutorial

    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.

    enhancement possibly 
    opened by Nikoleta-v3 0
Releases(v1.0.0)
Owner
Nikoleta Glynatsi
Postdoc @MPI_EvolBio 🎓 Social Dilemmas ⛓️ Applied Mathematics 💻📊 Software Development 🐍 @AxelrodPython
Nikoleta Glynatsi
PyChess - a chess client for Linux/Windows

PyChess - a free chess client for Linux/Windows The mission of PyChess is to create a free, pleasant, PyGObject based chess game for the Linux desktop

559 Dec 28, 2022
KBYD - Simple Bulls and Cows Game

KBYD KBYD - Simple Bulls and Cows Game How to Play KBYD is a simple Bulls and Cows Game. When the game starts, the computer randomly generates 3 to 5

1 Dec 04, 2021
Launcherpi - Minecraft Launcher for Raspberry Pi computers

launcherpi Minecraft Launcher for Raspberry Pi computers. ASLO BIG THANKS TO KLO

8 Sep 24, 2022
Flappy-Bird AI - Flappy Bird game with AI

FLAPPY BIRD AI Flappy Bird game solved with neat-python, a Python module based o

1 Jan 07, 2022
Synthesizer based on Conway's Game of Life

Conway Synth Synthesizer based on Conway's Game of Life Trying to avoid step sequencer fashions that have been done before and basing it on actual cel

Giacomo Loparco 4 Mar 15, 2022
A small Python Library to process Game Boy Camera images

GameBEye GameBEye is a Python Library to process Game Boy Camera images. Source code 📁 : https://github.com/mtouzot/GameBEye Issues 🆘 : https://gith

Martin TOUZOT 4 Nov 25, 2022
My first Minecraft CPU. Created in collaboration with Peer Carnes as a final project in CS 281: Architecture and Assembly at the University of Puget Sound

Minecraft CPU This is my first ever Minecraft CPU, created in collaboration with Peer Carnes. We created a custom assembly language, including an asse

Andy Chamberlain 4 Oct 10, 2022
Building a Mario-like, classic platformer game in Python using the PyGame Library

Building a Mario-like, classic platformer game in Python using the PyGame Library

Clarence Vinzcent Reyes 1 Feb 06, 2022
A Frogger game in Python with pygame

CrockiCrocki A personal project of a simple "game" in Python to learn Pygame and Python. Requires: pygame: In Linux: pip3 install pygame In MacOS: pip

Jorge Abreu 1 Nov 07, 2021
A python-based multi-player online educational game for students to play in a class or club setting.

Kurono (codename: aimmo) Code for Life has been developed by Ocado Technology as a free, open-source project to inspire the next generation of compute

Ocado Technology 108 Nov 07, 2022
Among AIs is a (prototype of) PC Game we developed as part of the Smart Applications course @ University of Pisa.

Among AIs is a PC Game we developed as part of the Smart Applications course @ Department of Computer Science of University of Pisa, under t

Gabriele Pisciotta 5 Dec 05, 2021
A tool for the creation of rooms used in maps in the game Wastelands

Wastelands Room Data editor A tool for the creation of rooms used in maps in the game Wastelands Creates .wrd files, that get loaded by the map genera

Avant 6 Jul 12, 2021
This is game 2048 created with moudle of python tkinter and OOP.

Game 2048 This is game 2048 created with moudle of python tkinter and OOP. This game build on classes. For start this game run: If you have python ver

0 Nov 02, 2021
Generates and prints proxies for the card game Magic: the Gathering

MTG-Proxy-Generator This program generates proxies for the card game Magic: the Gathering. These proxies can then be printed off and used. These copie

Carl L. 1 Jan 31, 2022
Box - a world simulator written in python with pygame

Box is a world simulator written in python with pygame. Features A world generation system A world editor Simulates creatures called boxlanders. You c

1up Community 3 Nov 14, 2022
Automates cubemap generation for Source Engine games.

AutoCube Automates cubemap generation for Source Engine games during compile-time. Download: see the release page Installation Using with CompilePal A

5 Feb 18, 2022
Ultimaze est un jeu en 2.5D, réalisé dans le cadre d'un projet de NSI.

Ultimaze Ultimaze est un jeu en 2.5D, réalisé dans le cadre d'un projet de NSI. La consigne était d'utiliser la librairie pygame pour créer un jeu en

parlabarbedeMerlin 3 Sep 17, 2022
A solution program of 24. game.

A solution program of 24. game.

1 Dec 12, 2022
Unknown Horizons official code repository

Unknown-Horizons based on Fifengine is no longer in development. We are porting it to Godot Engine. Please dont report any new bugs. Only bugfixes wil

Unknown Horizons 1.3k Dec 30, 2022
Implementation of the Spider-Man Game

Projeto FPRO FPRO/LEIC, 2021/22 Francisco Campos (up202108735) 1LEIC08 Objetivo Criar um clone do clássico Spider-Man em Pygame... Repositório de códi

1 Dec 24, 2021