Evolutionary Game Theory

Please visit the Stanford Encyclopedia of Philosophy for an overview of the theory. We will proceed, as usual, by example. In particular, we will play Prisoner's Dilemma and the Game of Life in preparation for you combination of these games in your invesitigation of the Evolution of Cooperation.

Prisoner's Dilemma

Two freshmen have been arrested by RUPD for commandeering a golf cart and fleeing an officer. They are placed in separate isolation cells. The wily Dean makes the following offer to each.
    "You may choose to confess or remain silent. 
     If you confess and your accomplice remains silent I will drop 
     all charges against you and charge your accomplice with felony theft.
     Likewise, if your accomplice confesses while you remain silent, 
     he will go free while you will be charged with felony theft. 
     If you both confess I get two convictions, but I'll see to it that 
     you both receive early parole. 
     If you both remain silent, I'll have to settle for charging you both 
     with the lesser charge of avoiding arrest. 
     If you wish to confess, you must leave a note with the jailer before my return."
The dilemma is that it pays to confess, so long as your accomplice does not also confess.

This game is abstracted as follows. To remain silent is to cooperate with your accomplice and so this strategy is denoted by the letter C. To confess is to break with, or defect from, your accomplice and so this stategy is denoted by the letter D. The payoffs to the row player during a round are

       C   D		R is the reward for mutual cooperation
   C   R   S	where   P is the punishment for mutual defection
   D   T   P            T is the temptation to defect and
                        S is for sucker

  and  T > R > P > S  ensures dilemma 
In this week's assignment you will conduct such games over multiple generations and between many many players. In preparation for the incorporation of multiple players.

Game of Life

The game is played on an M-by-N board, where the living are ones and the dead are zeros, and the rules are brutally simple.
    Any live square with fewer than 2, or more than 3, neighbors dies.
    Any dead square with exactly 3 neighbors comes to life.
Please dissect and exercise the associated code.