- Curriculum and Education
- Open Access
Multiple interactive public goods games allows for exploration of evolutionary mechanisms that maintain cooperation
Evolution: Education and Outreach volume 7, Article number: 19 (2014)
Cooperative behaviors are both prevalent and perplexing because selfish behaviors often return higher immediate fitness benefits. Additionally, cooperative behaviors are a prominent component of the human behavioral repertoire and therefore represent a useful teaching tool. To use cooperation as a teaching tool, I present software where students participate in a public goods game via a set of laptops connected to a Wi-Fi network. The public goods game entails multiple scenarios where students invest in a communal bank. The bank is then multiplied and money is divided and returned to all individuals equally. In this public goods game, students can partake in scenarios where reputation is displayed, as well as situations where individuals can punish players monetarily for not investing in the public good. Utilizing these scenarios, instructors can introduce fundamental concepts in evolution to students using intuitive interactive software.
In simple models of natural selection individuals are expected to be selfish and perform only those behaviors that benefit their fitness. Indeed, Darwin held similar ideas when he lamented that the altruistic and sterile workers of eusocial insects were his “one special difficulty” (Darwin ). Despite the preliminary description of nature as ruthless, individuals such as Kropotkin () recognized that cooperative behaviors, i.e. those behaviors that increase the fitness of other individuals (Lehmann and Keller ), were common. Moreover, Maynard Smith and Szathmary () argued that major evolutionary transitions such as multicellularity rely on cooperative behaviors between multiple entities. This commonness of cooperative behaviors challenged the assumptions of natural selection and necessitated a re-evaluation of the evolutionary framework. Using population genetics Hamilton () formally defined the concept of inclusive fitness, demonstrating that individuals could reduce their own direct fitness so long as the fitness benefit to relatives compensated for the loss. Hamilton’s theory provided an explanation for how some cooperative behaviors can be maintained even though the behavior is relatively detrimental to their direct fitness.
Hamilton’s theoretical work was labeled ‘kin selection’ (Maynard Smith and Wynne-Edwards, ), and has been invoked as an explanation for the maintenance of many cooperative behaviors (Sherman ; Hughes et al. ; Lukas and Clutton-Brock ), including behaviors that maintain communal resources (Frank ). Communal resources that benefit the entire group, yet can not be monopolized by one or a few individuals are known as `public goods’ (Rankin et al. ). Since individuals can not exclude others from the public good, individuals who invest in the public good are at risk of having the investment exploited by uncooperative individuals (Rankin et al. ; Bourke ). The exploitation of public goods often leads to a collapse of the common resource resulting in a ‘tragedy of the commons’ (Hardin ). The instability of public goods has generated considerable interest in delineating the mechanisms that can stabilize public goods, despite the risk of exploitation (Foster ; Archetti and Scheuring ). The maintenance of public goods has attracted researchers in biology, as well as in economics, sociology, and psychology (Hardin ; Boyd et al. ; Bowles ). From this multidisciplinary research theoreticians have defined several mechanisms that can maintain the cooperative behaviors that maintain public goods, including kin selection, punishment, and generalized reciprocity (Boyd et al. ; Barta et al. ).
Public goods therefore represent an opportunity to teach students about behavior and evolution. Cooperative behavior is an especially useful topic to teach students because multiple evolutionary phenomena have been explored both theoretically and empirically in humans. Punishment (Fehr and Gachter ), reciprocity/reputation mechanisms (Nowak and Sigmund ; Jacquet et al. ), and intergroup competition (Darwin ; West et al. ) are putative mechanisms that can maintain communal resources in human groups. This previous research therefore provides a framework that facilitates teaching students about how evolution can shape behavior, and specifically cooperative behavior. Students can learn about how the benefit of exploitation can erode cooperative behaviors, and subsequently how evolutionary mechanisms select for cooperation. I present here an interactive, public goods game that has been considerably modified from an interactive game provided by NetLogo (Wilensky ). The original public goods game contained the framework for the game, but required a series of alterations before it was functional in the classroom. The redesigned program and the practices described below can help teach students about public goods phenomena and certain mechanisms that may maintain public goods (punishment and reputation). Thus, the interactive game can help expose students to basic concepts in behavior and evolution.
NetLogo is an open-source set of software that will run on Windows, Apple OS X, or Linux. The NetLogo software is designed with readable code and can be manipulated with ease. The NetLogo manual and other sources (Grimm and Railsback ) provide an approachable introduction for using NetLogo. While there is other software that can run public goods games (see Z-tree, Fischbacher ()), NetLogo has an active support community, is immediately downloadable, and is written for biologists. Therefore the programming commands are relevant to biologists and allow for modifications to the code that are useful for interactive biological games and simulations. NetLogo also provides additional interactive games and software that are relevant to biological phenomena in the basic download.
To run the interactive software, both the instructor and students need laptops or desktop computers that are connected to a WiFi network and running the same version of NetLogo. This interactive game was successfully implemented and tested using two sets of 25 students from an introductory animal behavior class (Additional file 1).
Appropriate student population
Students that participate in this exercise should have an understanding of certain concepts before beginning these exercises. Since this work relies on basic concepts of selection, students should understand the concepts of fitness and competition. Additionally, students should have at least a rudimentary background in talking about animal behavior and cooperative situations like the prisoner’s dilemma. Importantly, these public goods game exercises could be implemented at the end of an introductory course, or at any point in an upper-level animal behavior or evolution course. Therefore the range of usefulness of these games extends to students of many ages. Immediately before beginning the game, instructors should step the students through the basic mathematics of the game so that the students understand how the communal bank is divided during game play.
The game presented here is similarly constructed to other public goods games where individuals invest money into a communal bank. In this game students have a certain amount of money in their bank. The student then decides what proportion of the bank to contribute to the public good (between 0 or 100%). The amount the student chooses to contribute will be entered into a communal cash pot of money and all of the investments into the communal cash pot are summed, and then doubled. After doubling the amount of cash in the communal pot, the communal pot is then divided evenly among all the participants, regardless of how much each participant had contributed. Thus, while it is best for the group if every participant invests 100% of their cash, it is always best for an individual to invest 0% since they will be relatively wealthier than the other participants. To gain a thorough understanding of the game dynamics, instructors may prefer to run a small-scale game by themselves using two to four laptops where the instructor controls each laptop and can explore the different scenarios (see below).
For this practice to be effective students should try to acquire the most cash before the end of the simulation. To facilitate competition, the instructor may elect to give out a small amount of bonus points, or some other reward for the students that place near the top of the class (e.g. the top 1/3rd). The most useful system may be a payoff system with high resolution where the top scorer gets the maximum amount of bonus points, and students are then ranked and benefitted according to their final payoffs.
To begin, the instructor should download the latest version of NetLogo from the NetLogo website and install the software on the local hard drive. The instructor should then update Java© so that it is at least Java 6.0. The instructor can then download the public goods game and public goods client (described below) from either the author’s website (http://www.gavinmleighton.com/public-goods-interactive-game.html) or from the author’s page (GMLeighton) on the open agent-based modeling (ABM) consortium: www.openabm.org. After downloading the software, the public goods game file and the client file should be stored in the same folder on the local hard drive. The instructor should then open the downloaded game software using NetLogo. To have the data file from the game output to the desktop, the instructor should make a slight modification to the code so that the software prints the data to the correct location. Instructors should click on the “Code” button of the main screen (upper center), and find the line that begins with the file-open command. The file-open command is followed by the destination for the data file. For Mac OS users, instructors should type the following after the file-open command (including quotation marks), ““/Users/(user)/Desktop/PublicGoodsGameClassRoomData.txt”. Importantly, the (user) aspect should be replaced by the name of the user on the computer. Instructors will see "Leighton" listed in that slot in the basic download and can replace "Leighton" with their Mac OS username. For instructors operating Windows systems, the instructor would have to change the path to, "c:\Users\(user)\Desktop" and again change (user) to your local username on the computer.
Upon opening the downloaded software, the instructor will be given a prompt to start a session name, and should give a unique name to the session. The instructor should also click the box indicating that they would like to broadcast the game. After opening the simulation, the instructor should see a screen that contains multiple simulation outputs and a series of buttons that control game flow (Figure 1).
The instructor should either have the students to download NetLogo to their laptops or local computer, or have the students download NetLogo before the class begins. Alternatively, if the game is run in a computer lab the instructor may download NetLogo onto the computers for the students. Students will then open the "Hubnet" software that is found in the same folder as the NetLogo software.
Entering the public goods game environment
After the instructor has opened the game, students should open the "Hubnet" program on their laptops. Hubnet is a program that is downloaded with NetLogo and will allow the students to interact in the simulation. After opening Hubnet, students will be asked to enter a name they will have for themselves and they should also enter the IP address of the computer hosting the game. The IP address can be found on the screen that appears after the instructor successfully hosts the game. At this point, all of the students should be logged into the game that is being hosted by the instructor. The student screen will allow them to see how much cash they have accumulated, what the average amount of cash invested is, and the average proportion of cash invested in the communal bank (Figure 2). Additionally, the NetLogo screen portrayed in Figure 2 will display all participant's names, the amount of money the individual has, the proportion they invested in the previous turn, but will not display participant names if in the anonymous scenario (see below). In situations where the instructor has turned on labels, students will also be able to see the names of the other students and how much cash the other students have.
Suggested game scenarios
The suggested set of scenarios I present will step students through several mechanisms that are thought to maintain cooperation. Each of these scenarios will expose students to a concept in the evolution and maintenance of cooperative behavior. The instructor can visualize the findings two ways. First, the view from the instructor's screen can be projected onto a white board to show how cooperation changes in real time. Second, the instructor can cut and paste the values from the game that are output to the text file into an Excel spreadsheet and graph the investment in each of the three scenarios.
Learning Goal: Demonstrate that anonymous interactions in public goods games hinder the maintenance of cooperative behavior.
Expected Outcome: As seen in other public goods games research, cooperative investment will start at relatively high values and will quickly erode as there is not a mechanism in place to enforce cooperation.
The first situation is the most basic, where there is total anonymity and no punishment. Here, the instructor will have to switch the "label’s-on?” switch to "off". When the game starts, only the amount of cash each of the students has will be displayed in the screen. This way, students can only compare the amount of cash they have and the amounts other students own without knowing which specific student has which specific dollar amount. The instructor can then run a certain number of steps (suggested is between 3-5 steps) where money is collected from the students, multiplied, and then redistributed. These three commands (collection, multiplication, and redistribution) can be performed by either: pressing the "Go" button once, or by pressing the "Take Money" and "Give money" buttons. After running the defined number of steps, the instructor can give students time to assess their relative standing and change the proportion of their cash they want to invest. While the instructor may choose to have students update the proportion they choose to invest while clicking through steps, providing a short amount of time would allow students to more accurately gauge their relative standing. Importantly, for this scenario and the following scenarios, the total number of steps, or iterations, should be known only to the instructor so as to avoid mass defection on the last step (Axelrod and Hamilton ; Axelrod ).
Learning Goal: Demonstrate that introducing reputation can influence the maintenance of cooperative behavior.
Expected Outcome: Students will be able to visualize the names of other students on the screen and this will incorporate reputation effects. Since both the shame of not investing and the honor of investing a lot promote cooperation (Jacquet et al. ), the average level of cooperation should be higher than in scenario 1.
In this scenario, the instructor can turn labels on from the main screen, so that students can now see the investment of other students in the group. This scenario will work best if students know each other before the simulation starts and can assign names to specific individuals. Scenario 2 is intended to teach how cooperation may be maintained by image scoring (Nowak and Sigmund , ). Additionally, if an instructor would like to focus on reputation and reciprocity, they may choose to allow students to form their own smaller groups after the entire population competes, as suggested in West et al. (). This would emphasize that students that want to attain the highest score would have to locate the most cooperative group members.
Learning Goal: Demonstrate that self-policing can influence the maintenance of cooperative behavior.
Expected Outcome: The average level of cooperation will be higher than in scenario 1 because the richest student will be exposed to monetary punishment from peers. The high level of monetary punishment should induce higher levels of investment so as to avoid suffering punishment for extended periods of time from other players.
The third scenario can be implemented with or without names though the progression of scenarios listed here would suggest including names. At this point, the instructor can allow students to punish the richest player by clicking on the "Punish the richest player" button on the student's Hubnet windows (Figure 2). This scenario introduces self policing and may help stabilize some investment in the public good (Boyd et al. ). As the game is set up now, the individual who punishes the richest player pays $1 to reduce the richest player's cash by the amount determined on the slider on the instructor's screen (Figure 1), though this can be changed in the code easily. Importantly, this button can be clicked multiple times and multiple individuals can punish the richest individual.
Learning Goal: Demonstrate that a dedicated police force can influence the maintenance of cooperation.
Expected Outcome: Cooperation will be maintained at higher average levels than in scenario 1 and potentially scenario 3, as the instructor will definitely punish individuals that do not cooperate at specified levels. Since levels of punishment are unambiguous students will cooperatively invest more.
In the final scenario, the instructor can log into the simulation using Hubnet from their own computer to act as the dedicated police force. The instructor may set the rules, but an example is that the instructor will always contribute the average investment of the group so as to not outcompete the students. In contrast, the instructor may also vary their contribution to the group (i.e. invest 25% of the average proportion of students) so that the police force becomes costly for members, and observe this effect on the average levels of cooperation. The instructor can also specify the rule for when they will punish the richest player. For example, the instructor may state that they will punish the richest player only if the richest player contributed less than half of the group average investment. The goal of this scenario is to have a police force without having interacting individuals have to perform policing behaviors themselves.
Currently, the software will create an output file and place the file on the desktop given some minor code alterations (see Setup section above). After each step in the simulation, the software writes the average proportion of cash invested by the individuals in the simulation. This output allows the instructor to plot the average proportion invested after the simulation is over and use the data to potentially explain concepts to the students (see below).
To help refine and improve the interactive game, a valuable next step would be to test if and how these games improved understanding of public goods and the maintenance of cooperation. Preliminary exercises using this software suggest that students are able to readily identify evolutionary mechanisms that can maintain cooperation (Leighton, unpublished data), though a more rigorous analysis is needed. Such analysis would allow instructors to further change how the game is implemented based on the intended learning goals. An additional and interesting test would be to perform these public goods games in classes of different sizes and examine the influence of punishment empirically. While variation in class size may yield insight into the effectiveness of punishment, instructors may also be interested in performing inter-group experiments within a single class. Intergroup competition has received both empirical support (West et al. ) and theoretical support (Wilson and Wilson ) as being able to support cooperation in humans. Therefore, instructors could perform the scenarios described above one day, and then break the class into groups of five students each and award points to the group that is able to acquire the largest communal bank after 10 rounds. The new balance between where within-group competition is reduced, along with increased group competition, should promote higher levels of cooperation in individuals (Bowles ). Finally, instructors may be interested in varying the level of communication between students. For instance, communication in smaller groups may more effectively facilitate cooperation than allowing for communication between students in larger classes, i.e. 20+ students. Such scenarios would further underline the problem of trying to maintain public goods in large groups.
Given the myriad of public goods relevant to human society, e.g. CO2 emissions, vaccinations, group work in class, performance-enhancing drugs in major league sports, and group hunting, this set of games presents a tangible and relatable set of exercises for instructors to expose students to basic concepts in evolutionary biology.
GML conceived of the project, modified the agent-based model, and wrote the article.
Archetti M, Scheuring I: Coexistence of cooperation and defection in public goods games. Evolution 2010, 65(4):1140–1148. doi:10.1111/j.1558–5646.2010.01185.x doi:10.1111/j.1558-5646.2010.01185.x 10.1111/j.1558-5646.2010.01185.x
Axelrod R: The complexity of cooperation: agent-based models of competition and collaboration. Princeton University Press, Princeton, NJ; 1997.
Axelrod R, Hamilton WD: The evolution of cooperation. Science 1981, 211(4489):1390–1396. 10.1126/science.7466396
Barta Z, McNamara JM, Huszar DB, Taborsky M: Cooperation among non-relatives evolves by state-dependent generalized reciprocity. Proceedings of the Royal Society B-Biological Sciences 2011, 278(1707):843–848. doi:10.1098/rspb.2010.1634 doi:10.1098/rspb.2010.1634 10.1098/rspb.2010.1634
Bourke AFG: Principles of social evolution. Oxford University Press, Princeton, NJ; 2011.
Bowles S: Group competition, reproductive leveling, and the evolution of human altruism. Science 2006, 314(5805):1569–1572. doi:10.1126/science.1134829 doi:10.1126/science.1134829 10.1126/science.1134829
Boyd R, Gintis H, Bowles S: The evolution of altruistic punishment. PNAS 2003, 100(6):3531–3535. 10.1073/pnas.0630443100
Boyd R, Gintis H, Bowles S: Coordinated punishment of defectors sustains cooperation and Can proliferate when rare. Science 2010, 328(5978):617–620. doi:10.1126/science.1183665 doi:10.1126/science.1183665 10.1126/science.1183665
Darwin C: On the origin of the species by means of natural selection. Random House, New York, NY; 1859.
Darwin C: The descent of Man. Random House, New York, NY; 1871.
Fehr E, Gachter S: Altruistic punishment in humans. Nature 2002, 415: 137–140. 10.1038/415137a
Fischbacher U: z-tree: Zurich toolbox for ready-made economic experiments. Experimental Economics 2007, 10(2):171–178. 10.1007/s10683-006-9159-4
Foster K: Diminishing returns in social evolution: the not-so-tragic commons. Journal of Evolutionary Biology 2004, 17(5):1058–1072. doi:10.1111/j.1420–9101.2004.00747.x doi:10.1111/j.1420-9101.2004.00747.x 10.1111/j.1420-9101.2004.00747.x
Frank SA: Mutual policing and repression of competition in the evolution of cooperative groups. Nature 1995, 377(6549):520–522. 10.1038/377520a0
Grimm V, Railsback SF: Agent-based and individual-based modeling: a practical introduction. Princeton University Press, Princeton, NJ; 2011.
Hamilton W: Genetical evolution of social behaviour I. Journal of Theoretical Biology 1964, 7(1):1–16. 10.1016/0022-5193(64)90038-4
Hardin G: Tragedy of the commons. Science 1968, 162(3859):1243. 10.1126/science.162.3859.1243
Hardin G: Extensions of "the tragedy of the commons". Science 1998, 280(5364):682–683. 10.1126/science.280.5364.682
Hughes WOH, Oldroyd BP, Beekman M, Ratnieks FLW: Ancestral monogamy shows kin selection is key to the evolution of eusociality. Science 2008, 320(5880):1213–1216. doi:10.1126/science.1156108 doi:10.1126/science.1156108 10.1126/science.1156108
Jacquet J, Hauert C, Traulsen A, Milinski M: Shame and honour drive cooperation. Biology Letters 2011, 7: 899–901. 10.1098/rsbl.2011.0367
Kropotkin P: Mutual Aid: a factor of evolution. Random House, New York, NY; 1902.
Lehmann L, Keller L: The evolution of cooperation and altruism - a general framework and a classification of models. Journal of Evolutionary Biology 2006, 19(5):1365–1376. doi:10.1111/j.1420–9101.2006.01119.x doi:10.1111/j.1420-9101.2006.01119.x 10.1111/j.1420-9101.2006.01119.x
Lukas D, Clutton-Brock T: Cooperative breeding and monogamy in mammalian societies. Proceedings of the Royal Society B-Biological Sciences 2012, 279: 2151–2156. 10.1098/rspb.2011.2468
Maynard Smith J, Wynne-Edwards VC: Group selection and kin selection. Nature 1964, 201(492):1145–1147. 10.1038/2011145a0
Maynard Smith J, Szathmáry E: The major transitions in evolution. Oxford University Press, Princeton, NJ; 1997.
Nowak M, Sigmund K: Evolution of indirect reciprocity by image scoring. Nature 1998, 393(6685):573–577. 10.1038/31225
Nowak M, Sigmund K: Evolution of indirect reciprocity. Nature 2005, 437: 1291–1298. 10.1038/nature04131
Rankin DJ, Bargum K, Kokko H: The tragedy of the commons in evolutionary biology. Trends in Ecology & Evolution 2007, 22(12):643–651. doi:10.1016/j.tree.2007.07.009 doi:10.1016/j.tree.2007.07.009 10.1016/j.tree.2007.07.009
Sherman PW: Kinship, demography, and Belding's ground squirrel nepotism. Behavioral Ecology Sociobiology 1981, 8: 251–259. 10.1007/BF00299523
West S, Gardner A, Shuker D, Reynolds T, Burton-Chellow M, Sykes E, Guinnee M, Griffin A: Cooperation and the scale of competition in humans. Current Biology 2006, 16(11):1103–1106. doi:10.1016/j.cub.2006.03.069 doi:10.1016/j.cub.2006.03.069 10.1016/j.cub.2006.03.069
Wilensky U: NetLogo. Center for Connected Learning and Computer-Based Modeling, Evanston, IL; 1999.
Wilson DS, Wilson EO: Rethinking the theoretical foundation of sociobiology. Quarterly Review of Biology 2007, 82(4):327–348. 10.1086/522809
I would like to thank Adrienne DuBois for providing assistance with running the simulation on multiple computers. I would like to thank Volker Grimm and Steven Railsback for providing instruction in NetLogo. This work was supported by a grant from the National Science Foundation (DDIG #1210500).
The author declares that he has no competing interests.
Electronic supplementary material
About this article
Cite this article
Leighton, G.M. Multiple interactive public goods games allows for exploration of evolutionary mechanisms that maintain cooperation. Evo Edu Outreach 7, 19 (2014). https://doi.org/10.1186/s12052-014-0019-y
- Social evolution
- Interactive game
- Public goods