Giter VIP home page Giter VIP logo

ipdgame's Introduction

This is a Axelrod-type computer tournament where players play the iterated prisoner's dilemma against each other.

Past Winning Strategies

  • Spring, 2024: GOB (submitted by Gracelynn Osei-Bosompem)

Strategies

New strategies can be added as .R files into the ./strategies directory.

  1. The strategies should functions with the same name as the file (e.g., if the file name is RANDOM.R, the function's name should be RANDOM)
  2. The general signature of the function is f(ego_past, alter_past, ...) where
    1. ego_past is the history of ego and
    2. alter_past is the history of alter with
    3. cooperation being coded as 1 and defection as 0
  3. Currently, the only additional arguments passed via the ... in the roundrobin.R tournament-style are (although other arguments could be added as well)
    1. n_rounds: total moves that are played between the players
    2. current_round: which move the current one is

Tournaments

Other tournament structures can be added into the ./tournaments directory (e.g., playing on a grid or network).

  1. the_game function defines prisoner's dilemma
  2. roundrobin

Current Rules

Running the run.R file will run the tournament. The current rules are

  1. each player plays against each other as well as a copy of themselves in a n_rounds = 50 move iterated prisoners dilemma
  2. the whole tournament is run n_iter = 5 times to reduce stochastic variability
  3. The payoff structure is:
    • mutual cooperation: 3 points
    • mutual defection: 1 point,
    • temptation to defect: 5 points,
    • sucker's payoff: 0

Dependencies

  • data.table (>= 1.14.9)

ipdgame's People

Contributors

baruuum avatar

Watchers

 avatar

Forkers

nanfengnf

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.