About the Tournament
This is an automated tournament system for CS51's Problem Set 1, where students implement strategies for the iterated Prisoner's Dilemma game.
The Prisoner's Dilemma
The Prisoner's Dilemma is a classic game theory scenario where two players must independently choose to either cooperate or defect. The payoff matrix is:
- Both cooperate: Each gets 3 points
- Both defect: Each gets 0 points
- One cooperates, one defects: Defector gets 5 points, cooperator gets -2 points
Tournament Rules
Each strategy plays against every other strategy (including itself) in a round-robin tournament. Each pair of strategies battles 10 times, with each battle consisting of 50-100 rounds (randomly chosen).
To simulate real-world noise, there is a 3% chance per decision that a strategy's choice will be flipped (cooperate becomes defect, or vice versa). This tests how robust your strategy is to errors and unexpected behavior.
Your score is the average points earned per round across all matchups. The leaderboard shows the current standings based on the most recent tournament run.
How It Works
The tournament runs automatically every hour:
- Download latest submissions from Gradescope
- Validate each submission
- Compile all strategies together
- Run the tournament
- Update the leaderboard
Submission Requirements
Your ps1.ml file must define:
my_strategy : history -> bool- Your strategy functionmy_pseudonym : string- Your chosen pseudonym for the leaderboard
Strategy Tips
Some classic strategies to consider:
- Always Cooperate: Simple but vulnerable to defectors
- Always Defect: Aggressive but misses cooperation benefits
- Tit-for-Tat: Start cooperating, then mirror opponent's last move
- Forgiving Tit-for-Tat: Like Tit-for-Tat but occasionally forgives defections
Can you design a strategy that outperforms them all?