Skip to content

Modified version of prisoner's dilemma set up in a tournament format

Notifications You must be signed in to change notification settings

starolis/trust-or-treachery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trust or Treachery Tournament

This project is an end-of-year project for implementing strategies in a variant of the prisoner's dilemma game. Students will write Python functions that compete against each other in a tournament to accumulate the highest total score based on a dynamic payoff matrix.

Project Structure

  • src/: Contains the Python scripts for the tournament.
    • tournament.py: Core tournament logic.
    • strategies.py: Example strategies.
  • docs/: Contains the LaTeX documentation for the project.
  • tests/: Contains test scripts to ensure the code works as expected.

How to Run

  1. Clone the repository:

    git clone https://github.com/starolis/trust-or-treachery.git

  2. Navigate to the src directory and run the tournament:

    cd trust-or-treachery-tournament/src python tournament.py

Example Strategies

Examples of different strategies are provided in the tournament.py script. These include always_cooperate, always_defect, tit_for_tat, score_based_strategy, reputation_based_strategy, and nuclear_option_strategy.

About

Modified version of prisoner's dilemma set up in a tournament format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages