Function m_ipd::tournament[][src]

pub fn tournament(strategies: &[Strategy], policy: RevealPolicy) -> Vec<f32>

Runs a tournament between a set of strategies.

This is a round-robin tournament; each strategy plays IPD against each other strategy 100 times. The output of the function is the average number of points each strategy earned per round.

The reward function used is as follows:

  • 1 point for mutual defection.
  • 3 points for mutual cooperation.
  • 5 points for successful betreyal.