Evolving Strategies for the Prisoner's Dilemma

ie.errity.pd
Class Game

java.lang.Object
  |
  +--ie.errity.pd.Game

public class Game
extends java.lang.Object

A game of the Iterated Prisoner's Dilemma between two Prisoners


Constructor Summary
Game(Prisoner p1, Prisoner p2, Rules r)
          Create a new game of the Iterated Prisoner's Dilemma between two players
 
Method Summary
 int[] getScores()
          Get game results
 void Play()
          Play a game of IPD according to the rules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Game

public Game(Prisoner p1,
            Prisoner p2,
            Rules r)
Create a new game of the Iterated Prisoner's Dilemma between two players

Parameters:
p1 - player 1
p2 - player 2
r - the rules which govern the game
Method Detail

Play

public void Play()
Play a game of IPD according to the rules


getScores

public int[] getScores()
Get game results

Returns:
array containing player 1 and player 2's score - [p1,p2]

Andrew Errity [99086921]