Evolving Strategies for the Prisoner's Dilemma

ie.errity.pd
Class Tournament

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

public class Tournament
extends java.lang.Object

Iterated Prisoner's Dilemma Tournament
In such a tournament every player plays the IPD against every other player and themselves.


Constructor Summary
Tournament(Prisoner[] plyrs, Rules r)
          Create new Iterated Prisoner's Dilemma Tournament
 
Method Summary
 int[] getResults()
          Returns the Tournament results
 int maxResult()
          Returns index of highest scoring individual
 double meanResult()
          Returns the average score
 int minResult()
          Returns index of lowest scoring individual
 int[] Play()
          Play the tournament
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tournament

public Tournament(Prisoner[] plyrs,
                  Rules r)
Create new Iterated Prisoner's Dilemma Tournament

Parameters:
plyrs - an array containing the competitors
r - the rules to govern the Tournament
Method Detail

Play

public int[] Play()
Play the tournament

Returns:
the Tournament results, an array of payoffs corresponding to the player's scores

getResults

public int[] getResults()
Returns the Tournament results

Returns:
the Tournament results

minResult

public int minResult()
Returns index of lowest scoring individual

Returns:
index of lowest scoring individual

maxResult

public int maxResult()
Returns index of highest scoring individual

Returns:
index of highest scoring individual

meanResult

public double meanResult()
Returns the average score

Returns:
the average score

Andrew Errity [99086921]