The Battle Applet. See below for an explanation.
Nice |
Nasty |
Tit4Tat |
Moth |
Hit&Run |
Santa |
NasMoth |
NNHRun |
| |||||||
|
|
The row labelled C says what cooperators will score, while the row labelled D says what defectors will score. The columns are also labelled C and D and indicate whether the player's partner did. So
But racking up many points together doesn't mean much when your goal is to get more points than your partner. So the scenario has to change somehow to make that your goal. One way to do this is to have more than just two players, say 80, ranodomly pair them into parterships and have the partners play matches. Your goal is to score high among all the players, not just higher than your partner.
Nice | Always cooperates; doesn't leaves |
Nasty | Always defects; doesn't leaves |
Tit4Tat | Cooperates first; plays as partner did on previous; doesn't leave |
Moth | Cooperates until partner defects, then leaves |
Hit&Run | Defects, then leaves |
Santa | Cooperates, then leaves |
NasMoth | Always defects, but stays until partner defects |
NNHRun | Cooperates twice, on third defects and leaves; also leaves if partner defects |
Better than that would be to use the scores on one match to determine the players of the next match. Let those strategies that performed well in one match be assigned more players in the next match, and those that performed poorly be assigned fewer players in the next match.
A number of games (say 20) form a match. At the end of a match, scores for each player are tallied, and the number of players of each kind of strategy for the next match will be proportional to the total score for all the players of that strategy. For instance, suppose there are 45 Nice players with a total score of 1000 and 55 Nasty players with a total score of 1500 (and no other players), then in the next match there will be 40 Nice players and 60 Nasty players, since 1000:1500 = 40:60. If the proportion doesn't come out perfect, a random assignment will be made to approximate the right ratio.
Thus, a number of matches (say 20) will be simulated, each with different proprotions of the various strategies.
Nice Nasty Tit4Tat Moth Hit&Run Santa NasMoth NNHRun 1 0 0 78 0 0 1 0This report indicates how may players of each kind remained at the end of the sequence of matches. After that, an entire new sequence of matches is simulated starting with new players, an equal number of each kind. At the end of that simulation, the applet prints another line. This continues until you press the "Stop" button. Then the totals for all of the simulations are printed. Here's an example
Nice Nasty Tit4Tat Moth Hit&Run Santa NasMoth NNHRun 2 0 0 77 0 0 1 0 0 0 0 79 0 0 1 0 0 0 0 79 0 0 1 0 0 0 0 79 0 0 1 0 7 0 1 71 0 0 1 0 0 0 0 80 0 0 0 0 0 0 0 79 0 0 1 0 7 0 0 71 0 0 2 0 9 0 5 66 0 0 0 0 10 0 0 69 0 0 1 0 Totals for 10 simulations. Nice Nasty Tit4Tat Moth Hit&Run Santa NasMoth NNHRun 35 0 6 750 0 0 9 0 ______________________________________________________________Notice how Moth does so well.
The other report is a color-coded graph which shows the relative populations of the eight strategies. At the beginning of the simulation, the populations are equal, and on the left you can see color has the same height. At the end of each match, the populations for the strategies are reallocated, so some colors get thicker, some thinner. Poor Santa never lasts very long (unless you fiddle with the playoff matrix).
The Reset button resets the parameters.
There are three parameter values that can be changed:
Nice Nasty Tit4Tat Moth Hit&Run Santa NasMoth NNHRun 10 9 9 12 12 6 15 7 6 12 7 11 13 6 16 9 7 9 8 11 15 7 15 8 9 8 8 10 12 7 16 10 7 7 11 11 14 6 16 8 Totals for 5 simulations. Nice Nasty Tit4Tat Moth Hit&Run Santa NasMoth NNHRun 39 45 43 55 66 32 78 42 ______________________________________________________________But even by the time there are about 7 matches/simulation, a couple of strategies are wiped out, and all but Moth are virtually gone by 20 matches/simulation.
By setting the number of games/match low, you'll see how important interaction between players becomes. When there's only one game/match, then a strategy's first play, and whether it stays or leaves are the only things that matters. The nastier strategies do better. When there are two games/match, things aren't much different, but Moth is starting to do better. By three games/match interesting things happen since very different outcomes occur in the different simulations, with Moth wiped out in some simulations, but in others the nasties are wiped out. Somewhere around 10 to 12 games/match the nasties are nearly always wiped out.
The files for this applet are listed here. The Moth.html
file is this file you're looking at. The Battle.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