Italian
this article
in Italian

Purpose of the Tit for Tat
Evolution Strategies Simulator

Explanations

Simulator Purpose

I prepared a script to demonstrate the advantage for the organic beings to cooperateor to exploit each other. It is based on the explanation contained in the Richard Dawkins book: The selfish gene where you can find detailed explanations on the strategies adopted and this experiment. For example: a bird has too long pecker and is unable to remove the tick from his head, but the other birds can do so without problems: the bird agrees to withdraws the ticks of the other birds firsr (which cooperates), hoping that then the other will help him doing the same? If an other bird has just lifted our thetick, is it better to help him doing the same (cooperate) or after taken the advantage, leave (defeat) saving time and energy?

The Selfish Gene The Selfish Gene
Richard Dawkins
360 pages
Oxford University Press

The idea

In his book, Richard Dawkins mentioned the experience of Robert Axelrod, which asked to many scientists, to write their strategies for a tournament on the repeated Prisoners' Dilemma game.
The game based on this dilemma:
You have been caught by the police with another man, which is kept separate from you. The police ask you to testify against your friend (defects from the other). What you will do?

If the game offered one single play, as would happen to the prisoner, the best strategy would be quite clear, but the tournament was on the game of the repeated Prisoners' Dilemma with 20 rounds. The tit for tat strategia explain below won.

The game based on the repeated Prisoners' Dilemma

Players have two cards each, one to "cooperate" and one to "defect".
Players throw on the table the card to play with, and determines the score for that round.
When both players cooperate, they will have a mutual benefit (in the initial example, when birds are removed the ticks to each other) and are rewarded with 3 points. If a player defect when the other cooperate, earn 5 points (e.g. the bird leave after his ticks has been removed saving time and energy) and the other 0 (e.g. the bird still has the ticks and lost time and energy), if both defect they earn a single point each (e.g. birds saved time and energy, but still have the ticks).

The tournament

All participants in the tournament play against themselves and against all the others. A game consists of (configurable parameter), and at the bottom of the page you will find the final scores.
Uploading the page on the browser, the tournament resatrts in real time, the scores change every time, if you use one or more participants that uses a random strategy.

The participants

Participants are (configurable parameter) and use different strategies (configurable parameter).
The best strategy is to defect when the other collaborates, but we can not be sure that the other will continues to collaborate. Some strategies will always collaborates, other will defect, others will base their game on what their opponent has done in the previous round.
Which strategy is more cost-effective? Depends on what others are doing and this is the purpose of the experiment and the script.
For explanations on the strategies adopted, see the section: Strategies in the tournament

The script

It is written using JavaScript, to run just use a browser (tested with Chrome, Firefox and Internet Explorer). Parameters are editable, you can add participants to the tournament and invent new strategies of game by editing the file: partecipanti.js
Try the tournament available on this site, if you like them or you want to customize any parameter, download the ZIP archive that contains the necessary files on your computer.

Scores

A:BCooperate (1)Defeat (0)
Cooperate (1)3 points0 points
Defect (0)5 points1 point

Strategies in the tournament

Run the turnament avalable in this site

Intresting releated links:
DNA
Richard Dawkins web site