Genebat Applet

D. Joyce, J. Kennison, N. Thompson
Departments of Mathematics and Psychology
Clark University
May, 2002



The Genebat Applet. See below for an explanation.



This is similar to the Battle Applet, but there aren't eight fixed strategies. Instead, the strategies are randomly selected.

Genomes

The behavior of a strategy is determined by the following information:
  1. The probability of cooperating on the first move, immediately after being paired with a partner.
  2. The probability of leaving a partner when the partner cooperates.
  3. The probability of leaving a partner when the partner defects.
  4. The probability of cooperating on the second move, given both you and your partner cooperated on the first move.
  5. The probability of cooperating on the second move, given you cooperated but your partner defected on the first move.
  6. The probability of cooperating on the second move, given you defected but your partner cooperated on the first move.
  7. The probability of cooperating on the second move, given both you and your partner defected on the first move.
and the 16 probabilities of continued cooperation depending on your and your partner's last two moves.

A genome consists of these 23 probabilities. When a genome is printed in the text area of the applet, you'll get 23 digits, each digit being the first digit after the decimal point of a probability. (The second and later digits are supressed for brevity.) The probabilities are listed in the order given above. So, for instance, if a genome is given as

g=72246552474588426176200
then the probability of cooperating on the first move is between 0.7 and 0.8, the probability of leaving if your partner cooperated is between 0.2 and 0.3, the probability of leaving if your partner defected is between 0.2 and 0.3, and so forth.

At the beginning of a simulation, each player gets a genome where each probability is uniformly selected from the interval from 0 to 1.

The simulation

Once the players have been given their strategies, they're paired and play a match. At the end of the match, a certain percent of the players are removed, this percent being the death rate that you can specify in the applet and initially set at 10%. Then players with new stratgies are selected at random, where the probability that a player gets a specific strategy is proportional to the scores on the just finished round for players of that strategy. (You can think of this as an asexual reproduction of the successful players.)

Match after match is played until all the players have the same strategy.

You can stop the simulation before that if you like, and either resume it, or start a new simulation with new random strategies.

Reports

The text area gives the current leader of the strategies. The strategy number is printed first, followed by the number of players of that strategy, followed by a brief description of the genome for that strategy. For instance, one simulation gave this output. A new line is printed only when a new strategy takes the lead. Eventually, after 432 matches, strategy number 0 won. It's genome description was 72246552474588426176200.

The graph at the bottom gives the relative populations for the strategies after each match. Each strategy is given a color of the spectrum, so at the very beginning, you see a vertical line with spectrum colors (red at the top, yellow, green cyan, blue, magenta, and red at the bottom). Many strategies die out while others become more numerous. After a time some colors become wide bands. Eventually, there are only a few, and finally only one, and that's when the text report, mentioned above prints out "Stable after" so many matches. Note that the actual color conveys no information; the strategy with each color was randomly selected.

Controls

The controls on the applet are the same, except a pause button has been added. After you start the simulation, you can change most things, but not the number of players. To change the number of players, stop the simulation first. The next simulation will have the new number of players.

Comments

It seems that one of the most important qualities of a strategy to win is that it tend to cooperate on the first move. Once in a while, a strategy with as low a probability as 0.5 will win, but usually that probability is above 0.7, and when the number of players is above 100, it's usually above 0.9.

There are indications that the next few probabilities in the genome tend to high or low values, but many simulations are necessary to see just what those trends are.

A different model is needed to see what's going on. One with either mutations or sexual reproduction. With mutations, the gene pool may tend toward the more successful strategies. With sexual reproduction, combinations may hurry the gene pool to those strategies much faster.

The files for this applet are listed here. The Genebat.html
file is this file you're looking at. The *.java files
are the program source files for the applet. The *.class
files are the compiled files that run when the applet is
running. They're all needed to run the applet.


My way Or The Highway: Introduction


David E. Joyce,
John Kennison,
both of the Department of Mathematics and Computer Science,
and Nicholas Thompson,
of the Frances L. Hiatt School of Psychology.
Clark University
Worcester, MA 01610