Git Product home page Git Product logo

ipdth's Introduction

IPDTH - Iterated Prisoner's Dilemma Tournament Hub

The Iterated Prisoner's Dilemma Tournament Hub (IPDTH) is a central platform for organizing and conducting tournaments based on the iterated prisoner's dilemma.

Iterated Prisoner's Dilemma

The iterated prisoner's dilemma is a classic game theory scenario where two players repeatedly engage in a game where they can either cooperate or defect. Currently, scores are computed as follows:

Player A's Choice Player B's Choice Player A's Score Player B's Score
Cooperate Cooperate 3 3
Cooperate Defect 0 5
Defect Cooperate 5 0
Defect Defect 1 1

Explanation:

  • Both players cooperate: Each player receives a score of 3.
  • Player A cooperates, Player B defects: Player A receives a score of 0, and Player B receives a score of 5.
  • Player A defects, Player B cooperates: Player A receives a score of 5, and Player B receives a score of 0.
  • Both players defect: Each player receives a score of 1.

Agent Flexibility and API Specification

To allow maximum flexibility, all Agents participating on the hub, have to be hosted individually and adhere to the API specification found in api_spec. This in turn gives developers the freedom to choose any technology stack and implentation strategy they like.

Dependencies

  • Erlang/OTP Version >= 26
  • Elixir >= 1.16.2
  • PostgreSQL >= 16
  • NodeJS >= 20

Running the Hub Locally for development

  • Clone the repo
  • Get a PostgreSQL server running
  • Install required dependencies: mix deps.get
  • Crate the database: mix ecto.create
  • Migrate the database: mix ecto.migrate
  • Start the server: mix phx.server
  • Visit http://localhost:4000

Instead of starting the server via mix phx.server you can run it inside an IEx shell via iex -S mix phx.server.

Seeding Data for development

  • You can seed example data using mix run /priv/repo/seeds.exs (Warning creates lots of data!)
  • You can reset and reseed the database using mix ecto.reset
  • If you only want to reset the database: mix ecto.drop && mix ecto.create && mix ecto.migrate

Further Help

Look into the mix.exs file for futher aliases and shortcuts. You can get a list of available mix commands using mix help.

Running the Hub in Production

Ready to run in production? Please check our deployment guides.

Contributing

Contributions are welcome! Please read CODE_OF_CONDUCT.md before contributing. To contribute, fork the repository, create a new branch for your feature or bugfix, and submit a pull request with a clear description of your changes.

Licensing

This project is licensed under the MIT license. See the file LICENSE for more details.

Security

Even though the IPDTH is only a hobby project, security will not be neglected. That being said, all contributors to this project are humans and thus infallible. Found a securitiy issue?

  • Please do not open GitHub issues for security vulnerabilities, those are publicly accessible!!! Instead se
  • Get in touch via e-mail: [email protected]

ipdth's People

Contributors

prakti avatar renovate[bot] avatar derwemser avatar

Watchers

 avatar

Forkers

derwemser

ipdth's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yaml
  • actions/checkout v4
  • erlef/setup-beam v1
  • actions/cache v4
  • actions/checkout v4
  • erlef/setup-beam v1
  • actions/cache v4
  • actions/checkout v4
  • erlef/setup-beam v1
  • actions/cache v4
  • actions/checkout v4
  • erlef/setup-beam v1
  • actions/cache v4
  • actions/checkout v4
  • erlef/setup-beam v1
  • actions/cache v4
  • actions/checkout v4
  • erlef/setup-beam v1
  • actions/cache v4
  • actions/checkout v4
  • erlef/setup-beam v1
  • actions/cache v4
  • actions/checkout v4
  • erlef/setup-beam v1
  • actions/cache v4
mix
mix.exs
  • bcrypt_elixir ~> 3.0
  • phoenix ~> 1.7.7
  • phoenix_ecto ~> 4.4
  • ecto_sql ~> 3.10
  • postgrex >= 0.0.0
  • phoenix_html ~> 4.1
  • phoenix_live_view ~> 0.20.4
  • phoenix_live_dashboard ~> 0.8.0
  • swoosh ~> 1.3
  • finch ~> 0.18
  • telemetry_metrics ~> 1.0
  • telemetry_poller ~> 1.0
  • gettext ~> 0.24
  • jason ~> 1.2
  • plug_cowboy ~> 2.5
  • req ~> 0.5.4
  • dredd ~> 2.0
  • faker ~> 0.18
  • floki >= 0.30.0
  • bypass ~> 2.1
  • stream_data ~> 1.1.1
  • excoveralls ~> 0.18
  • phoenix_live_reload ~> 1.2
  • esbuild ~> 0.8
  • tailwind ~> 0.2.0
  • credo ~> 1.6
  • sobelow ~> 0.13
  • mix_audit ~> 2.1
  • dialyxir ~> 1.4

  • Check this box to trigger a request for Renovate to run again on this repository

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.