breeds [ strategies players] globals [ticks games matches numplayers payoffmat stratmat population davidRound?] ;These are the global variables ;ticks - currently completed number of one-on-one fights ;games - currently completed # of games ;matches - currently completed # of matches ;numplayers - total # of players ;payoffmat - list containing payoff matrix ;stratmat - list containing strategy definintions ;population - list of current number of each strategy ;davidRound? - turns on or off the way of dealing with the rounding problem players-own [strategy partner history score coop? stay?] ;These are the variables each turtle possesses ;strategy - Which strategy they are ;partner - player randomly assigned to ;history - what partner did the previous game ;score - current match payoff ;coop? - cooperate? yes or no. (game specific) ;stay? - stay or leave? (game specific) strategies-own [name num] ;name - title ;num - current # of players to setup clear-turtles clear-plot ; ca would also clear stratmat! ask patches [set pcolor white] ; set background white startup ; creates list stratmat which contains strategy definitions setup-strategies ; sets name, color, and starting num for each strategy set population values-from strategies [num] ; makes the population list set numplayers sum population ; make numplayer equal the number of players if count strategies with [num > 0] = 0 [output-print "No strategies!" stop] if sum population mod 2 = 1 [output-print "Odd number of players!" stop] setup-players ; gives each player starting strategy, color, partner set ticks 0 ; set initial # of ticks to 0 set games 0 ; set initial # of games to 0 set matches 0 ; set initial # of matches to 0 set davidRound? true ; activates rounding option set payoffmat list (list (list DeDe DeDe) (list DeCo CoDe)) (list (list CoDe DeCo) (list CoCo CoCo)) ;creates payoff list set-plot-x-range 0 matchesPerSim ; sets data plot parameter set-plot-y-range 0 count players ; sets data plot parameter end to startup ; creates list stratmat with variables for each strategy set stratmat [ ; Note: in this list, AllC is turtle 0, AllD is turtle 1, etc ; name color ["AllC" lime ] ["AllD" black ] ["Tit4Tat" yellow ] ["Moth" cyan ] ["Hit&Run" grey] ["NasMoth" brown] ] clear-output ; determines if output is cleared at start of trial (leave on if running single trials, off if running an experiment) print-stats-header ; prints the header for output, see above end to setup-strategies ; creates strategy start values from stratmat foreach stratmat [ create-custom-strategies 1 [ set name item 0 ? set color item 1 ? set hidden? true set num runresult word "num" name ] ] end to setup-players ; sets up players foreach values-from strategies [self] [ ; do this for each strategy type create-custom-players (num-of ?) [ ; creates number of players specific to each strategy type set strategy ? ; assigns strategy to player set partner nobody ; start without a partner set score 0 ; set initial score to zero set color color-of strategy ]] ; set color to color of initial strategy let delta 360 / count players ; divide circle by number of players ask players [set heading (who - count strategies) * delta forward screen-edge-x] ;place players around circle setup-partners ; run program to assign initial partners end to setup-partners ; assigns partners (both at start and when partnerless turtles are later created let l shuffle values-from (players with [partner = nobody]) [self] ; creates l, a randomized list of all non-partnered players let len length l ; len = # of unpartnered players let len1 len / 2 ; len1 = # of pairs to be made let l1 sublist l 0 len1 ; sublist of 1st half of l let l2 sublist l len1 len ; sublist of 2nd half of l (foreach l1 l2 [ ; for each pair set partner-of ?1 ?2 ; tell 1st player of l1 they are paired with 1st player of l2 set partner-of ?2 ?1 ; tell 1st player of l2 they are paired with 1st player of l1 set history-of ?1 [] ; reset history of l1 player set history-of ?2 [] ; reset history of l2 player ask ?1 [set heading towards ?2] ; have l1 player face l2 player ask ?2 [set heading towards ?1] ]) ; have l2 player face l1 player end to go ; runs a match if numplayers = 0 [stop] if matches = 0 [graph-stats] set matches matches + 1 ; counts matches as they are run repeat gamesPerMatch [set games games + 1 play-one-game] ; counts games during a match evolve if graph? [graph-stats] ; creates graph if graphing is set to "On" if stop? [print-stats stop] ; when stopping the stats are outputted end to play-one-game ; the player with the lower id number asks the other player to play if (item 0 population + item 2 population + item 3 population != numplayers) [ ; stops running the simulation when AllC, Tit4Tat, and MOTH are left (and the population values are hence fixed) let pairs players with [who < who-of partner] ask pairs [play] setup-partners ] end to evolve ask players [if score < 0 [set score 0]] ; **catches negative numbers to avoid errors (note, this will screw up the simulation if negative numbers are used in the payoff matrix) let total score-sum players if total = 0 [stop] ; all AllD w/ 0 DeDe would cause this set population map [score-sum players with [strategy = ?]] (values-from strategies [self]) ; adjust the population list to represent new strategy values ;set total sum population ; **sets negative values within the population list to 0 set population map [(? * numplayers) / total] population set population rounded-list population let id count strategies ; sets new strategies (foreach values-from strategies [self] population [ repeat ?2 [ ask turtle id [set strategy ?1] set id id + 1 ] ]) ask players [set color color-of strategy set score 0 set partner nobody] ; remember, each match starts from scratch setup-partners ; finds new partners to start new match end ;Player turtle procs ----------------------------------------------- to play ; remember, only one member of each pair does this! set ticks ticks + 1 ; each "play" results in a tick next ; run "to next" ask partner [next] ; tell partner to run "to next" let payoff item (coop?-of partner) (item coop? payoffmat) ; creates list of what me and partner get as scores let myscore item 0 payoff ; myscore is the first item on the just made list let itscore item 1 payoff ; partner score is the second item of the just made list set score score + myscore ; adds my score for this match to my cumulative total ask partner [set score score + itscore] ; adds partners score for this match to their cumulative total ;if stay? = 0 [ set score score - CostToLeaver] ; **gives me cost to leaver ;if stay?-of partner = 0 [set score score - CostToStayer] ; **gives me cost to Stayer ;if stay?-of partner = 0 [ask partner [set score score - CostToLeaver]] ; **gives partner cost to leaver ;if stay? = 0 [ask partner [set score score - CostToStayer]] ; **gives partner cost to Stayer ;if stay? = 0 and stay?-of partner = 0 [set score score + CostToLeaver + CostToStayer] ; **negates any change in my score if we both leave ;if stay? = 0 and stay?-of partner = 0 [ask partner [set score score + CostToLeaver + CostToStayer]] ; **negates any change in partner's score if we both leave if stay? = 0 and coop? = 1 and stay?-of partner = 1 [set score score - CostToLeaver] if stay? = 1 and coop?-of partner = 1 and stay?-of partner = 0 [ask partner [set score score - CostToLeaver]] if stay? = 1 and coop?-of partner = 1 and stay?-of partner = 0 [set score score - CostToStayer] if stay? = 0 and coop? = 1 and stay?-of partner = 1 [ask partner [ set score score - CostToStayer]] ifelse (stay?) * (stay?-of partner) = 0 [ ; sets us both to having no partner if either leaves ask partner [set partner nobody] set partner nobody] [ ask partner [set history fput coop?-of partner history] set history fput coop?-of partner history] end to next ; runs all the decision rules for each individual to determine what they will do next let strat name-of strategy ifelse strat = "AllC" [AllC] [ ifelse strat = "AllD" [AllD] [ ifelse strat = "Tit4Tat" [Tit4Tat] [ ifelse strat = "Moth" [Moth] [ ifelse strat = "Hit&Run" [Hit&Run] [ ifelse strat = "NasMoth" [NasMoth] [ output-show (word "Oops: Bad strategy name " ) stop ]]]]]] end to AllC ; **decision rule for "AllC", etc. set coop? 1 set stay? 1 end to AllD ;**changed Nasty to AllD set coop? 0 set stay? 1 end to Tit4Tat set coop? ifelse-value (length history = 0) [1] [first history] set stay? 1 end to Moth set coop? 1 ; **previous coop? was the same as TFT set stay? coop?-of partner ; **previous stay? was coop? end to Hit&Run set coop? 0 set stay? 0 end to NasMoth set coop? 0 ; **previous coop? was ifelse-value (length history = 0) [0] [first history] set stay? coop?-of partner ; **previous stay? was ifelse-value (length history = 0) [1] [first history] end ;Rounding ----------------------------------------------------- ; Historical: Several methods were looked at for resolving fractional agents for a given ; strategy during the evolutionary phase. Here are two. The first is the original one used ; by David Joyce, the second used during our initial modeling. Choosing between them ; did not change the overall statistics. We now default to using David's approach. to-report rounded-list [floats] ; Chooses rounding method ifelse davidRound? [report floor-whole-adjusted-list floats] ; runs if DavidRound is "Yes" [report floor-fraction-adjusted-list floats] ; runs if DavidRound is "No" end to-report floor-whole-adjusted-list [floats] let ints map [ int ? ] floats repeat ((round sum-list floats) - sum-list ints) [ let i rand-weighted-index floats set ints replace-item i ints (1 + item i ints) ] report ints end to-report floor-fraction-adjusted-list [floats] let roundoff map [ ? - int ? ] floats ; int = integer let ints map [ int ? ] floats ; this probably codes for the rounding method, not sure how it works though repeat ((round sum-list floats) - sum-list ints) [ let i rand-weighted-index roundoff set roundoff replace-item i roundoff 0 set ints replace-item i ints (1 + item i ints) ] report ints end to-report rand-weighted-index [floats] let rand random-float (sum-list floats) let i 0 let s 0 foreach floats [ set s s + ? if s >= rand [report i] set i i + 1 ] output-show "Oops in rand-weighted-index" report -1 end to-report rand-weighted-list [floats] let ints n-values length floats [0] repeat (round sum-list floats) [ let i rand-weighted-index floats set ints replace-item i ints (1 + item i ints) ] report ints end to-report round-adjusted-list [floats] let n round sum-list floats let ints map [round ?] floats let inum sum-list ints let delta ifelse-value (inum < n) [1][-1] repeat abs (n - inum) [ let i rand-weighted-index floats set ints replace-item i ints (delta + item i ints) ] report ints end ;Regularly Used Reporters ----------------------------------------------------------------------------- to-report stats ;creates what is reported by below let payoffs (list CoCo CoDe DeCo DeDe) let initpop values-from strategies [num] let nums (list numplayers gamesPerMatch matchesPerSim CostToLeaver CostToStayer) ;let roundoff ifelse-value davidRound? [1][0] let results (sentence payoffs initpop nums population) report list-to-string results end to print-stats-header ;prints stats header let names "AllC AllD T4T Moth HnR NMoth" let names0 "AllC0 AllD0 T4T0 Moth0 HnR0 NMoth0 " output-print (word "CoCo CoDe DeCo DeDe " names0 " Players GperMatch MperSim CostToLeaver CostToStayer " names); end to print-stats ;prints stats at end of simulation let s ifelse-value stop? [""][(word "[" matches "]" )] output-print word s stats end to-report stop? report matches = matchesPerSim ; when stopped the matches will display the value of the MatchesPerSim slider end to graph-stats ask strategies with [num > 0] [ ; strategies still represented are plotted corresponding to their number of extant players ** set-current-plot-pen name plot count players with [strategy = myself] ] end ; Utilities --------------------------------- to-report precision-list [l places] ; reports the number of players for each strategy report map [precision ? places] l end to-report list-to-string [l] report reduce [(word ?1 " " ?2)] l ; reports gamespermatch and matchespersim as strings end to-report score-sum [agents] ; **reports total strategy score for matchtotalsetting negatives to 0 report sum-list (values-from agents [score]) ;report ifelse-value (sum-list (values-from agents [score]) < 0) [0] [sum-list (values-from agents [score])] end to-report sum-list [l] ; reports payoff matrix report ifelse-value (length l = 0) [0] [reduce [?1 + ?2] l] end @#$#@#$#@ GRAPHICS-WINDOW 466 173 666 394 5 5 17.3 1 10 1 1 1 0 1 1 1 CC-WINDOW 5 567 723 662 Command Center 0 SLIDER 589 78 714 111 gamesPerMatch gamesPerMatch 1 100 5 1 1 NIL BUTTON 79 19 134 52 go go T 1 T OBSERVER NIL NIL SLIDER 589 110 714 143 matchesPerSim matchesPerSim 5 50 20 5 1 NIL BUTTON 13 19 68 52 NIL setup NIL 1 T OBSERVER T NIL MONITOR 222 10 279 59 NIL games 0 1 PLOT 11 175 467 396 Population Match Number 0.0 10.0 0.0 10.0 true true PENS "AllC" 1.0 0 -13840069 true "Tit4Tat" 1.0 0 -1184463 true "Moth" 1.0 0 -11221820 true "AllD" 1.0 0 -16777216 true "Hit&Run" 1.0 0 -7500403 true "NasMoth" 1.0 0 -6459832 true MONITOR 222 57 279 106 NIL matches 0 1 MONITOR 277 10 334 59 NIL ticks 0 1 SLIDER 13 70 105 103 CoCo CoCo -50 50 3 1 1 NIL SLIDER 105 70 197 103 CoDe CoDe -50 50 0 1 1 NIL SLIDER 13 102 105 135 DeCo DeCo -50 50 5 1 1 NIL SLIDER 105 102 197 135 DeDe DeDe -50 50 1 1 1 NIL BUTTON 13 135 76 168 PD set CoCo 3\nset DeDe 1\nset CoDe 0\nset DeCo 5 NIL 1 T OBSERVER T NIL BUTTON 137 135 197 168 AG set CoCo 3\nset DeDe 0\nset CoDe -2\nset DeCo 5 NIL 1 T OBSERVER T NIL BUTTON 76 135 138 168 +AG set CoCo 5\nset DeDe 2\nset CoDe 0\nset DeCo 7 NIL 1 T OBSERVER T NIL SLIDER 373 11 482 44 numAllC numAllC 0 100 30 1 1 NIL SLIDER 373 44 482 77 numAllD numAllD 0 100 30 1 1 NIL SLIDER 373 77 482 110 numTit4Tat numTit4Tat 0 100 30 1 1 NIL SLIDER 481 11 590 44 numMoth numMoth 0 100 30 1 1 NIL SLIDER 481 44 590 77 numHit&Run numHit&Run 0 100 30 1 1 NIL SLIDER 481 77 590 110 numNasMoth numNasMoth 0 100 30 1 1 NIL SLIDER 431 109 540 142 setAll setAll 1 50 30 1 1 NIL BUTTON 431 142 540 175 doit! set numMoth setAll\nset numAllD setAll\nset numAllC setAll\nset numHit&Run setAll\nset numNasMoth setAll\nset numTit4Tat setAll\n NIL 1 T OBSERVER T NIL OUTPUT 11 394 683 553 BUTTON 143 20 198 53 print print-stats NIL 1 T OBSERVER T NIL MONITOR 277 58 334 107 players numplayers 0 1 SWITCH 236 136 326 169 graph? graph? 0 1 -1000 SLIDER 589 13 700 46 CostToLeaver CostToLeaver -10 50 0 1 1 NIL SLIDER 589 44 700 77 CostToStayer CostToStayer -10 10 3 1 1 NIL @#$#@#$#@ WHAT IS IT? ----------- LogoMoth models allow users to simulate an iterated prisoner’s dilemma game (see http://en.wikipedia.org/wiki/Prisoner's_dilemma) in which preprogrammed strategies interact with each other by either cooperating or defecting and/or staying or leaving. LogoMoth is modified from the traditional model in two important ways: First, individuals may, depending on their strategy, choose to leave their partner. Second, leaving and being left (i.e., staying) may incur a “cost”. The purpose of these modifications is to suggest alternative explanations for animal and human social behavior masked by the rules of traditional Iterated PD games (JOYCE, ET AL. 2006). Traditional Iterated PD games operate on the assumption that two players are "stuck" with one another through a series of interactions; under that constraint, the strategy that has done famously well is TFT, a strategy that cooperates on the first game of the match and then imitates its opponent's previous move in every subsequent. (AXELROD, (1984), The success of TFT in PD games has made it the model for hundreds of explanations of "reciprocity" in animal and human social relations (notably, COSMIDES AND TOOBY, 1992; WILKINSON, 1984). This focus on TFT reciprocity as a key to animal sociality may be unfounded. The structure of the Axelrod game constrains the players to remain paired, even in non-productive partnership. This constraint is highly un-natural in animal (and human) social systems where individuals typically break off relationships if a partnership is not productive. In mapping TFT reciprocity on to natural social systems, theorists have implicitly recognized this artificiality in the tournament structure when they have interpreted TFT as requiring a considerable level of cognitive complexity: instead of being bound to one another as the tournament structure demands, partners must recognize one another and remember what they did on the previous occasion. A simpler ... and therefore more universal... basis for social clustering would be one in which social agents are programmed to attach themselves to agents who benefit them. In the language of the PD literature, such an agent would respond to defection by breaking up a partnership and looking for another partner amongst other unattached agents. Far from requiring recognition, such a strategy would require only simple movement away from an aversive condition. We call this strategy, "My-way Or The Highway", abbreviated MOTH. HOW IT WORKS ------------ A LogoMoth simulation starts by creating the specified number of players (turtles) using each strategy, which then play a series of PD games. The games are divided into matches (games per match), with “reproduction” occurring between matches until the simulation is over (matches per sim). At the start of every match each player is partnered to another player at random. According to their strategies, LogoMoth agents make two sorts of decisions: First, when they play a game they either cooperate with their partner or defect (Cooperate = 1 or 0). Second, after the game they either continue to play with a particular partner in the next game or dissolve the partnership (Stay = 1 or 0). If either member of a partnership dissolves it, and both players return to the pool of un-partnered players to be randomly re-partnered for the next game of the match. Strategies can be conditional or non-conditional in that an agent may or may not use the behavior of its partner on the previous game to decide what to do on the next. Users of the program can pick among any combination of six strategies. (An earlier version of the program offered two additional strategies but these proved to be irrelevant and have been dropped.) The first three strategies will be familiar to any reader of Axelrod and Hamilton's Evolution of Cooperation. The second three all make use of leaving in some way. MOTH is the one that most closely resembles what we think animals are likely to do in most failed cooperation situations. The rest are chosen to exploit various perceived weaknesses of the other strategies, but are exhaustive only in the sense that these are the ones we could think of. One of our goals in getting LogoMoth into circulation is to encourage others to think of better challengers. LogoMoth is an evolutionary program, i.e., it is designed to simulate the Darwinian competition between organisms seeking to out-reproduce one another in a population whose numbers are arbitrarily forced to remain stable throughout each simulation. Consequently, at the end of each match of N games, the number of points scored by the players of each strategy is summed and divided by the number of players of that strategy to determine the proportion of points won by each strategy. These proportions determine the number of Players allocated to each strategy in the next match. Since the population was always capped at a constant after each match, remainders were inevitable and had to be distributed as additional players to some of the strategies and not to others. This distribution was one of the details in which the devil was found. By the time we had gotten done thinking about this distribution process, we had come up with five different ways of doing it. The method chosen privileged the most successful strategies. We simply assigned the extra players so that those strategies with the best records in the previous match were most likely to receive the extra players. Readers interested in the other methods we considered are encouraged to contact Owen Densmore as Owen@backspaces.net for details. HOW TO USE IT ------------- LogoMoth is a research program designed to accommodate many sorts of curiosity about the relation between the idea of conditional altruism and the idea of conditional leaving. You can manipulate many features of the game, the players, the matches, and the simulation AND you can save your experiments using NetLogo's behavior space. Payoff Space As in the standard prisoner's dilemma game, LogoMoth is based on the idea that two players play against one another for payoffs which depend on what the two players do. Their two choices are to cooperate (C) or defect (D)-- i.e., to be an altruist or selfish. This conceptualization produces four cells, which for simplicity sake, we will always identify here in their "reading" order: i.e., Top Left (Cc), Top Right (Cd) , Bottom Left (Dc), and Bottom right (Dd). The payoffs in each cell always represent the payoff to the left marginal player, playing one of two strategies, against the top marginal player, playing the same two strategies. Thus, the standard Prisoners’ Dilemma game, in which a cooperator receives 3 playing against another cooperator, 0 playing against a defector, while a defector receives 5 playing against a defector and 1 playing against another defector, will be represented here as a 3,0,5,1 game. Each combination of cell payoffs yields a different game-type, and the possibilities are, of course, infinite. Although you can choose any combination of payoffs you like, LogoMoth features three particular examples. One is the standard PD game, 3,0,5,1. PD games, by definition are those whose payoffs follow the rules, Dc>Cc>Dd>Cd and 2Cc > Cd + Dc. Another game of interest to us, we call the altruist game in which the payoffs must be consistent with b-c, -c, b, 0, where b>c>0. Some PD games meet the criteria for altruist games -- 3, -2, 5, 0, for instance-- and LogoMoth features this choice as well. But a PD game need not be an altruist game. For modeling purposes, minus numbers supply additional conceptual devils, and so we offer what we call a AG+ game, in which a constant has been added to each cell to dispense with negative numbers: 5, 0, 7, 2. The AG+ game is a PD game, but it is not strictly speaking an altruist game. However, the differences between the payoffs of the 4 cells are preserved, and we have found no computation that we are in the habit of performing with AG games that is affected by the difference. Different Combinations of Strategies. You may choose any combination of strategies by "zeroing out" strategies that DON’T interest you. Using the same sliders, you can also test whether a strategy is robust against invasion by giving it many players and introducing the other strategies, in small numbers, one by one. Or you can see which strategy is a good invader by holding the numbers of players of other strategies at maximum and introducing small numbers of different invaders, one by one. Number of Games in a Match. Because cooperators who stay together accumulate benefits for themselves AND deny defectors the benefits of defecting, the number of games in a match proves to be a powerful variable in LogoMoth play. You can evaluate the impact of the number of games in a match and the number of matches in a simulation by moving the sliders provided. Cost to Leaver/Cost to Stayer Early reviewers of this project, some of whom we suspect were the victims of ugly divorces, worried that it was unrealistic for MOTH strategists to be able to get a way scot-free from a first-game defector. Wouldn’t first-game defectors be selected for inflicting a cost on MOTH for leaving? And couldn’t the infliction of that cost itself entail a cost?. Consequently, we added sliders to permit the examination of the consequences of partner separations. These consequences can be either costs or benefits and can be imposed on either or both members of a partnership. Consequences are imposed when one partner opts to leave and the other partner opts to stay. When a partnership is dissolved, the player that stays receives the Stayer consequence and the player that leaves receives the Leaver consequence; if both partners opt to leave then neither player receives a consequence. In the present version, the decision was made to impose the Leaver and Stayer Cost only when MOTH left because, of the conditional associates, only partnerships with MOTH allow first-defectors earn the maximum score. Given the benefit of maintaining a partnership with MOTH it is likely that a first-defector will evolve a mechanism to deter MOTH from leaving—implemented as the Leaver Cost. Since, however, it is unlikely that inflicting a cost to MOTH will be of no consequence to the Stayer, a Stayer Cost may be assessed to reflect the cost borne by the player for punishing MOTH. THINGS TO NOTICE ---------------- Notice first whether the model replicates the traditional Axelrod results. Reassurance on this point can be sought by zeroing out those strategies that were not in the original Axelrod Tournament. Under these circumstances, TFT in LogoMoth is a robust competitor, although it sometimes fails against ALLC and ALLD. Then check out MOTH's ability as a competitor. Look first at how well moth does against TFT's original competitors. The short answer is "better", It wins more often than TFT, and it usually wins quicker. Now take a look at Moth's competition against all three Axelrod strategies, ALLC, ALLD, and TFT. You will find that as long as matches are reasonably long, MOTH always predominates in simulations containing all of the other Axelrod strategies. If matches are short -- less than 10 games per match -- the result begins to be much more unpredictable. Finally examine how MOTH does against all 5 other strategies. Once again, if matches are reasonably long it almost always predominates. However it rarely excludes all other competitors. A typical result is that MOTH and either ALLC or TFT are left standing at the end of the simulation. Another fascinating project is locating tipping points. A match size of 7 seems to be an important tipping point. We also think that important tipping points will be found in changes in the payoff matrix Finally, check out the consequences of inflicting costs on stayers and leavers. Lower Leaver Costs favor MOTH in its competition with other first-game cooperators but hurt first-cooperators in their competition with first-game defectors. CREDITS AND REFERENCES ---------------------- References, AXELROD R (1984) The Evolution of Cooperation. New York: Basic Books. COSMIDES L and Tooby J (1992), “Cognitive adaptations for social exchange”. In Barkow J H, Cosmides L and Tooby J. (Eds.), The Adapted Mind: Evolutionary Psychology and the Generation of Culture. New York: Oxford.) JOYCE, David, Kennison, John, Densmore, Owen, Guerin, Steven, Barr, Shawn, Charles, Eric and et al. (2006). 'My Way or the Highway: a More Naturalistic Model of Altruism Tested in an Iterative Prisoners' Dilemma'. Journal of Artificial Societies and Social Simulation 9(2) . WILKINSON G S (1984) Reciprocal Food Sharing in the Vampire Bat. Nature, Issue 308. pp. 181-184. Credits LogoMoth is a "docking" of an earlier java program (The Battle Applet), one of a series of applications of the MOTH idea that were created by David Joyce of Clark University's Math and Computer Science, with advice and consultation from John Kennison and Nicholas Thompson. Readers who found LogoMoth interesting are strongly encouraged to have a look at the whole series of applets, which may be found at: http://aleph0.clarku.edu/~djoyce/Moth/ We also owe a tremendous debt of thanks to the members of the Santa Fe Applied Complexity Group (“FRIAM”), in particular to Carl Tollander and Frank Wimberly. • Shawn Barr and Eric Charles – Program in Social, Evolutionary, and Cultural Psychology, – Department of Psychology – Clark University, – Worcester MA, 01610. - sbarr@clarku.edu; echarles@clarku.edu • Owen Densmore* and Stephen Guerin* – Redfish Group and Friam Applied Complexity Group – 843 Agua Fria Road. – Santa Fe, NM, 87501 – Owen or Stephen, @ redfish.com • Nick Thompson* – Program in Social, Evolutionary, and Cultural Psychology, – Departments of Biology and Psychology – Clark University, – Worcester MA, 01610. – nthompson@clarku.edu @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 30 30 240 circle 2 false 0 Circle -7500403 true true 16 16 270 Circle -16777216 true false 46 46 210 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 link true 0 Line -7500403 true 150 0 150 300 link direction true 0 Line -7500403 true 150 150 30 225 Line -7500403 true 150 150 270 225 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 60 270 150 0 240 270 15 105 285 105 Polygon -7500403 true true 75 120 105 210 195 210 225 120 150 75 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 3.0.2 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ setup go matches = MatchesPerSim @#$#@#$#@