![]() |
Prisoner's Dilemma the Levinson version |
||||||||||||||
| Game Rules | Read the
Wikipedia page
for the game background and history and then read the rules below. Note that
rules written in this page take precedent for the purposes of the AI class. A round is a series of games where every participant plays a number of games. Each game is played one-on-one with each person taking a turn to make a move. A player (or agent) has only two choices in each turn: 'C' for cooperation and 'D' for defection. Agents are unaware of their opponents' move. The outcome of the turn is evaluated by the monitor program after both agents have produced their output. The monitor calculates the point assignment after each move according to the following table:
P1/P2 payoff matrix
|
||||||||||||||
| Agent Requirements | An agent is a program that accepts two lists and outputs
a list consisting of 3 moves where each move is either C
or D. Important: because we will be running tournaments with tens of
players, we need unique name spaces. It's absolutely crucial that you follow
this naming convention for your agents.
Lastname1Lastname2 where each Lastname is the last name of team members capitalized. If there's only one person in the team, then there will be only one Lastname. If there are more, then list them alphabetically. The declaration for the agent function should be like the following example: (defun KhosmoodLevinson (hist score) .... )
example of an agent being called in a game that already has had 2 turns with the score of 10-5, the agent is leading over its opponent. (KhosmoodLevinson '((C D) (D C) (D C)) '(10 5)) Such a call should return a set of 3 moves which will be played one at a time against an opponent. For example: (C C D)
|
||||||||||||||
| Monitor Requirements | The Monitor is a program that executes a tournament given
a list of agents and some parameters for each game. A tournament consists of one
or more round-robins (every agent plays every other agent) where
after each round, the lowest scoring agent(s) are dropped.
Internally the monitor has a responsibility of running some number of rounds. For each round a semi-random gameLength is used for all games in that round. And for each game, there are flipParams that determine the chance of random flips on each move. Within each round, the monitor passes the game history and score-thus-far to each pair of agents in each game and receives those agents' moves in order to calculate the winner and point assignments. Declaration of the monitor is the following: (defun monitor (flipParams gameLength agents) ... )
example of a monitor being called: (monitor '(.25 .1) '(10 50) '(#'random #'titfortat #'bobs #'joes #'stoc #'coin #'janes #'dianefeinsteins #'chocalate #'cooperate))
example 1: ( (agentx 300) (agenty 225) ) example 2: ( (agentx 575) (agenty 425) (agentz 225) )
|
||||||||||||||