## Abstract

In-group favoritism is a central aspect of human behavior. People often help members of their own group more than members of other groups. Here we propose a mathematical framework for the evolution of in-group favoritism from a continuum of strategies. Unlike previous models, we do not pre-suppose that players never cooperate with out-group members. Instead, we determine the conditions under which preferential in-group cooperation emerges, and also explore situations where preferential out-group helping could evolve. Our approach is not based on explicit intergroup conflict, but instead uses evolutionary set theory. People can move between sets. Successful sets attract members, and successful strategies gain imitators. Individuals can employ different strategies when interacting with in-group versus out-group members. Our framework also allows us to implement different games for these two types of interactions. We prove general results and derive specific conditions for the evolution of cooperation based on in-group favoritism.

## Introduction

In-group bias is a central aspect of human behavior. Across a variety of scenarios, people tend to be more helpful to members of their own group rather than to those of other groups^{1,2,3,4,5}. In-group favoritism has been shown to occur based on real-world salient groupings, such as ethnicity^{6}, religiosity^{7} and political affiliation^{4,8}, and has also been artificially manufactured in the laboratory using trivial groupings^{1,3,9}. Discrimination based on group identity is a powerful force for both good and ill in human societies. Therefore understanding the evolutionary dynamics of group identity and discrimination is of primary significance^{10}. Evolutionary game theory offers a powerful framework for exploring such issues^{11,12,13,14,15,16,17,18,19,20,21,22,23,24}.

In-group bias is common, yet the implementation of that bias is dynamic and flexible^{8,25,26}. Thus culture and cultural evolution^{27} must play an important role in the evolution of bias. The dynamic nature of bias results from complex social network interactions which play a central role in human societies^{28,29,30,31,32,33,34,35,36}, with genetic as well as social components affecting network formation^{37,38,39}. Such network dynamics can turn yesterday's allies into today's competitors, and drive former enemies together in the face of a common threat. This is true of many hunter-gather societies which are characterized by fission-fusion dynamics^{40}, suggesting the importance of flexible groupings for early human societies. Group identities are also flexible in today's modern world: the dynamic remodeling of in-group bias was recently demonstrated in a behavioral study using economic games^{8}. During the 2008 US presidential election, supporters of Democratic primary candidates Barack Obama and Hillary Clinton formed two separate groups, and showed strong bias against each other. After the transition from the primary to the general election, the two groups fused and intra-Democrat bias disappeared.

Thus group membership is itself an evolving feature of humans. If membership in a particular group is associated with a particular strategy, it can be beneficial to act differently towards members of different groups. This was demonstrated in a recent behavioral experiment involving a series of coordination games^{9}. In each round, subjects chose both a cultural group (represented by one of two arbitrary markers) and an action in a coordination game. Subjects tended to change tag and action together, or to change neither. This created an association between group membership and strategy, and in-group favoritism emerged: subjects preferred to interact with members of their own group.

The multi-faceted, dynamic and emergent nature of group identity is central to bias. Its evolution, however, has not yet been explained, as previous models considered either competition between stable fixed groups, or a priori imposed in-group bias on agents. In this paper we introduce a novel model to address this issue (Fig. 1, see model details in Methods section). We utilize the framework of evolutionary set theory^{23}. Agents are members of one of many different groups. We allow players to take different actions towards in-group and out-group members. Learners imitate group membership as well as strategy and both imitations occur with potential mistakes (set and strategy mutation rates). Thus a strong association between group membership and strategy exists (as in the experiments of Efferson *et al.*^{9}), although no selection occurs at the level of the group. In this setting, natural selection favors preferential cooperation with in-group members. Furthermore, we observe dynamic group compositions. Players tend to join groups with many successful members and abandon groups whose members earn low payoffs. Sometimes certain groups are abandoned entirely; sometimes empty groups are re-populated when an individual strikes out on her own. Thus group membership is varied, endogenous and fluid, and in-group bias emerges through co-evolution of group membership and strategy without invoking the mechanism of multi-level selection^{41,42}.

## Results

Although our framework allows us to study many different evolutionary games, in the main part of this paper we focus on cooperative dilemmas, where individuals choose between cooperation and defection. A strategy is given by two parameters, (*p, q*), where *p* denotes the probability to cooperate with another individual in the same set and *q* denotes the probability to cooperate with an individual in another set. If *p* > *q*, then cooperation is biased towards in-group members. If *p* < *q*, then cooperation is biased towards out-group members. Our strategy space consists of a continuum of strategies represented by the unit square, [0, 1]^{2}. It includes ‘always defect’ (0, 0) and ‘always cooperate’ (1, 1), strategies which either do not recognize group membership or choose to ignore it. The strategy (1, 0), conversely, shows maximum in-group favoritism: it always cooperates with in-group members but never with out-group members.

In Fig. 2 we show computer simulations of the stochastic evolutionary dynamics of our system. We use agent based simulations for intermediate intensities of selection. Each individual is characterized by a particular (*p, q*) strategy. The figure shows the stationary distribution of strategies that is reached in this mutation-selection process. We observe that the distribution is either peaked around ‘always-defect’ (0, 0), or maximum in-group favoritism (1, 0). We are interested in finding the conditions for evolution of in-group favoritism (Fig. 3).

Using the analytical theory for weak selection we calculate the region of the strategy space that is favored by natural selection. In the online material we perform this calculation for all cooperative dilemmas, but here we present the result for the simplified Prisoner's Dilemma, where cooperation implies a cost, *c*, for the donor and a benefit, *b*, for the recipient, where *b* > *c* > 0. Defectors pay no cost and distribute no benefit. We find that the (*p, q*)-strategy space is intersected by a straight line, given by the equation *q* = *K*(*p* − 1/2) + 1/2, where *K* is the slope of the line. The explicit expression of *K* depends on the benefit-to-cost ratio, *b/c*, the number of sets, *M*, and the rescaled strategy mutation rate, *µ*, and the rescaled set mutation rate, *ϑ* (see the online material for derivations). Strategies below the line (lower *q* values) are favored by selection, and strategies above the line (higher *q* values) are opposed by selection (Fig. 2). The line always intersects the strategy (1/2, 1/2) which is neutral for all parameter choices. The maximum slope of the line is +1 and the minimum slope is −∞. If the slope is negative (*K* < 0) then the most favored strategy is always-defect (0, 0). If the slope is positive (*K* > 0) then the most favored strategy is maximum in-group favoritism (1, 0).

There is another interesting threshold. If *K* < −1 then the average *p* value in the population is less than the average *q* value. In this (paradoxical) case, individuals are more likely to cooperate with out-group members rather than in-group members. The reason is the following: for these population structures cooperation is not selected and, moreover, most interactions occur within sets; it is therefore more costly to cooperate with individuals in the same set rather than with individuals from another set. Hence, for *K* < −1 our system predicts some level of out-group favoritism. For *K* > −1 the average *p* value in the population is greater than the average *q* value. Thus *K* > −1 is the crucial condition for the evolution of at least some degree of in-group favoritism, while *K* > 0 is the condition for selection to favor maximal in-group favoritism (1, 0).

Furthermore, these two critical thresholds of *K* also determine the population average levels of in-group helping *p* and out-group helping *q*. The average *p* is greater than 1/2 greater than the average *q* for *K* > 0, the average *q* is smaller than the average *p* smaller than 1/2 for −1 < *K* < 0, and the average *p* is less than the average *q* less than 1/2 for *K* < −1. Note that natural selection always disfavors out-group helping (the average *q* is less than 1/2 for all parameter choices), whereas in-group cooperation can be favored by selection (the average *p* is greater than 1/2) if *K* > 0.

For large population size and in the limit of low strategy mutation, *µ* → 0, the condition *K* > −1 leads to while *K* > 0 leads to

We observe that increasing the number of sets, *M*, reduces both critical benefit-to-cost ratios. Increasing the set mutation rate, *ϑ*, always reduces the critical benefit-to-cost ratio that is needed for the evolution of some in-group favoritism (1), but for evolution of maximum in-group favoritism (2) there is an intermediate optimum set mutation rate (of order of ) which minimizes the critical benefit-to-cost ratio. We also note that condition (2) is the same condition that is needed for evolution of cooperation in set structured populations^{23}. Noteworthy, the evolution of some in-group favoritism can be promoted for any benefit-to-cost ratios if the set mutation rate *ϑ* is above a certain threshold depending on the number of sets *M* ≥ 3 and the strategy mutation *µ*. In the online material we provide further discussion of these conditions and also study the effect of the strategy mutation rate, *µ*. Our analytical results are in excellent agreement with the agent based simulations.

## Discussion

We have demonstrated how individual-level selection can favor the emergence of in-group bias in a world of dynamic social ties and group identities. We consider the full continuum of strategies for both in-group and out-group interactions, not just those that show in-group favoritism. We also include strategies which do not discriminate between in-group and out-group members, as well as strategies which give preferential treatment to out-group members. We derive the conditions for natural selection to favor the recognition of group membership, and for the ensuing success of in-group favoritism (Fig. 2).

Previous theoretical studies have examined the thought experiment of the green-beard effect (or tag-based cooperation), finding that cooperation can evolve when similar others receive preferential treatment^{15,18,19,21,22}. Phenotypic tags in these models can be regarded as a sort of minimal grouping. In contrast to our present model, these previous models assume *a priori* that individuals never cooperate with out-group members, and therefore group structure (as in an island model) supports the evolution of within-group helping^{48,49}. Yet empirical evidence indicates that although people exhibit more in-group cooperation than out-group cooperation, cooperation with out-group members is still far above zero^{8,44}. Thus unlike previous models, we allow the possibility of both in-group and out-group cooperation, and determine the conditions under which preferential in-group cooperation is favored by selection. As seen experimentally, we find the emergence of in-group bias together with substantial levels of out-group cooperation.

A second set of previous models consider in-group helping and out-group harming in the context of explicit intergroup conflict with discrete (binary) strategies^{20,24,50}. Two of these models use simulations to explore the evolution of such ‘parochial altruism’, and find that explicit inter-group conflict is needed for selection to favor bias^{20,24}: groups with more in-group helpers and/or out-group harmers battle and replace other groups. A third model also considers intergroup conflict as the driving force behind bias, and derives analytical results. However, we note that their approach requires infinitely many groups of fixed size, applies only to additive games, and only gives the direction of selection (rather than any actual evolutionary dynamics) for mutant invasion attempts at a locus without polymorphism at the other locus. Unlike these models, we show that sensitivity to group identity need not be the result of such intergroup conflict, but instead can result from particular population structures. Furthermore, our approach yields general analytical results, characterizing the full evolutionary dynamics of our system, and can easily be applied to a range of “in-group/out-group” interactions (including, but not limited to, additive games).

Our mutation-selection analysis shows that increasing the strategy mutation rate *µ* always makes it harder for cooperation to predominate (Fig. 3c), but that this is not the case for the set mutation rate *v*: there is an optimal level of *ϑ* for promoting in-group cooperation (Fig. 3d). In our model, prosperous groups tend to attract new individuals, which can be seen as ‘payoff-biased migration’^{45,46,47}. However, this non-random migration cannot promote the success of in-group solidarity if the set mutation rate, or ‘confusion about the other's set’, is too low. Without flexibility in group identity (*ϑ* → 0) all individuals eventually end up in the same group, and then the system is prone to exploitation of in-group members. This is why some out-group favoritism can evolve under this circumstance. On the other hand, when the set mutation rate is excessively high (*ϑ* → ∞) and thus group identities are overly fluid, the association between strategy and group membership breaks down. In our model, as in behavioral experiments^{9}, this correlation between strategy and group membership is essential for the establishment and maintenance of in-group favoritism. Thus evolution cannot favor in-group cooperation if *ϑ* is too large. An intermediate set mutation rate is optimal, maintaining a delicate balance between mobility and consistency.

Our work generates testable predictions about evolved human behavior. For example, we find that a larger number of possible groups leads to stronger selection for in-group bias (Fig. 3b). This has implications both for laboratory experiments and field studies. Most existing laboratory experiments with economic games use binary groupings^{8,9}, but our theory predicts stronger in-group bias if a richer set of groupings was used. Psychological research is consistent with this prediction^{52}. Our results also suggest that people who developed their intuitions in more diverse communities, where a wider range of possible social groups exist, will demonstrate stronger in-group bias. Evaluating these predictions using quantitative empirical analysis is a promising research direction.

The framework we introduce here is not limited to the study of cooperation. It is a general theory for studying situations where one game is played with in-group members while another game is played with out-group members. For example, our framework can explain the evolution of costly in-group helping and costly out-group harming^{42} (see the online material). Applying this model to a variety of other social behaviors such as coordination, trust and bargaining^{51} is an important topic for future study, as is exploring situations where individuals are members of multiple groups with competing allegiances. Extending this framework to coalition formation^{53,54}, which cannot always be reduced to pairwise interactions, will be useful.

In-group bias is a central aspect of human behavior^{1,2,3,4,5,6,7,8,9,25,44}. This sensitivity to group membership may seem to imply a key role for inter-group conflict in human evolution. Yet, while inter-group conflict can promote the evolution of in-group bias^{20}, to do so it requires stable groups whose membership remains largely unchanged over time. Contrary to this vision of stable groups, experiments^{8,25} and anthropological evidence^{40} have demonstrated that group identity and membership is often flexible. Over short timescales, the relevant grouping can be remodeled, leading to dramatic changes in behavior towards the same set of others. Here we show how in-group bias can evolve and thrive when group compositions are constantly shifting. It can be advantageous to love your friends, even when today's comrades might be tomorrow's enemies.

## Methods

## Model

We study the evolutionary dynamics of a population of finite size, *N*, which is distributed over *M* sets. Each individual belongs to one set. Without constituting more complicated group culture or identity, this minimal group setting in our model is similar with trivial groupings in previous empirical studies^{1,3,9}. Individuals engage in evolutionary games and accumulate payoff from pairwise interactions. Note that the payoff of an individual depends both on its strategy and on the set it belongs to. They reproduce proportional to payoff and inherit both strategy and set membership. Reproduction can be genetic or cultural. That said, successful strategies spawn imitators and successful sets attract more members. Therefore, the population structure is dynamic and driven by the social interactions. To study the limiting distribution of strategies under mutation-selection equilibrium, we include a strategy mutation rate, *u*, and a set mutation rate, *v*. The latter represents random migration between sets. It is useful to consider the rescaled mutation rates, *µ* = *Nu* and *ϑ* = *Nv*, in the theoretical analysis. At times some sets can become empty to be re-populated later. It is also possible that occasionally the whole population clusters in one set, although increases in set mutation tend to make the population dwell in a mixture of different sets most of the time.

Each individual plays with all others: interactions occur both between individuals in the same set and between individuals in different sets. Here we consider equal interaction rates within and between sets, an assumption that can be easily modified by introducing an additional model parameter (see the online material). What varies between in-group and out-group interactions is the strategy used by each individual, and potentially the nature of the game that is played. At any one time the interaction structure of the population is given by a two-colored graph (Fig. 1). The individuals represent the vertices of the graph. The colors signify the two types of interactions: within sets (in-group) and between sets (out-group). The graph changes as individuals move between sets. Individuals may use different strategies for in-group and out-group games. We can also consider situations where different games are being played within and between sets. For example, the game between sets could be an aggression game, but the game within the set could be a Prisoner's Dilemma.

## Analysis

In the online material we develop a general analytical theory for such “in-group/out-group” evolutionary processes. We consider two different games for the two types of interactions and each game can have any number of strategies. The behavioral rule of an individual is given by a pair of strategies determining the behavior with members of the same set and with members of other sets. Our model does not involve inter-group conflict^{20}: there is no reproduction of groups and no competition between groups. Instead, our model is based on evolutionary set theory^{23} and uses a general result for evolutionary game dynamics in structured populations^{43}. We derive a condition for a behavioral rule being favored by natural selection in the limit of weak selection. In this limit the two games (within and between sets) make additive contributions. The population structure is described by six structural coefficients (three for each game) that depend on the number of sets *M*, the strategy mutation rate *µ* and the set mutation rate *ϑ*.

Specifically, the analysis is greatly simplified for in-group and out-group interactions both with two strategies. Suppose the in-group game matrix (*A* vs. *B*) is given by [*R*, *S*; *T*, *P*] and the out-group game matrix (*A*′ vs. *B*′) is given by [*R*′, *S*′; *T*′, *P*′]. If *A* (*A*′) is a cooperative strategy and *B* (*B*′) is a defective strategy, then we have *R* > *P* and *R*′ > *P*′. The strategy (*A*, *A*′) is favored over (*B*, *B*′) if where *k*'s are structural coefficients determined by model parameters and, for low strategy mutation and large *M*, we have: We can see that the in-group game can promote cooperation (*k*_{1} > *k*_{2}), but the out-group game always opposes cooperation (). This result can help us intuitively understand the evolution of in-group favoritism from a full continuum of strategies.

## References

- 1.
Tajfel, H., Billig, R. P. & Flament, C. Social categorization and intergroup behavior.

*Eur. J. Soc. Psychol.***1**, 149–178 (1971). - 2.
Tajfel, H.

*Human Groups and Social Categories*(Cambridge Univ. Press, 1981). - 3.
Yamagishi, T., Jin, N. & Kiyonari, T. Bounded generalized reciprocity: Ingroup boasting and ingroup favoritism.

*Adv. Group Process***16**, 161–197 (1999). - 4.
Fowler, J. H. & Kam, C. D. Beyond the self: social identity, altruism, and political participation.

*J. Polit.***69**, 813–827 (2007). - 5.
Yamagishi, T. & Mifune, N. Does shared group membership promote altruism? Fear, greed, and reputation.

*Ration. Soc.***20**, 5–30 (2008). - 6.
Whitt, S. & Wilson, R. K. The dictator game, fairness and ethnicity in postwar Bosnia.

*Am. J. Polit. Sci.***51**, 655–668 (2007). - 7.
Sosis, R. & Ruffle, B. J. Religious ritual and cooperation: testing for a relationship on Israeli religious and secular Kibbutzim.

*Curr. Anthropol.***44**, 713–721 (2003). - 8.
Rand, D. G., Pfeiffer, T., Dreber, A., Sheketoff, R. W., Wernerfelt, N. C. & Benkler, Y. Dynamic remodeling of in-group bias during the 2008 presidential election.

*Proc. Natl. Acad. Sci. USA***106**, 6187–6191 (2009). - 9.
Efferson, C., Lalive, R. & Fehr, E. The coevolution of cultural groups and ingroup favoritism.

*Science***321**, 1844–1849 (2008). - 10.
Wilson, E. O.

*On Human Nature*(Harvard Univ. Press, 1979). - 11.
Maynard Smith, J.

*Evolution and the Theory of Games*(Cambridge Univ. Press, 1982). - 12.
Hofbauer, J. & Sigmund, K.

*The Theory of Evolution and Dynamical Systems*(Cambridge Univ. Press, 1988). - 13.
Weibull, J. W.

*Evolutionary Game Theory*(MIT Press, 1995). - 14.
Cressman, R.

*Evolutionary Dynamics and Extensive Form Games*(MIT Press, 2003). - 15.
Riolo, R. L., Cohen, M. D. & Axelrod, R. Evolution of cooperation without reciprocity.

*Nature***414**, 441–443 (2001). - 16.
Doebeli, M. & Hauert, C. Models of cooperation based on the Prisoner's Dilemma and the Snowdrift game.

*Ecol. Lett.***8**, 748–766 (2005). - 17.
Hammond, R. A. & Axelrod, R. The evolution of ethnocentrism.

*J. Conflict Resol.***50**, 1–11 (2006). - 18.
Jansen, V. A. A. & van Baalen, M. Altruism through beard chromodynamics.

*Nature***440**, 663–666 (2006). - 19.
Traulsen, A. & Nowak, M. A. Chromodynamics of cooperation in finite populations.

*PLoS ONE***2**, e270 (2007). - 20.
Choi, J.-K. & Bowles, S. The coevolution of parochial altruism and war.

*Science***318**, 636–640 (2007). - 21.
Masuda, N. & Ohtsuki, H. Tag-based indirect reciprocity by incomplete social information.

*Proc. R. Soc. Lond. B Biol. Sci.***274**, 689–695 (2007). - 22.
Antal, T., Ohtsuki, H., Wakeley, J., Taylor, P. D. & Nowak, M. A. Evolution of cooperation by phenotypic similarity.

*Proc. Natl. Acad. Sci. USA***106**, 8597–8600 (2009). - 23.
Tarnita, C. E., Antal, T., Ohtsuki, H. & Nowak, M. A. Evolutionary dynamics in set structured populations.

*Proc. Natl. Acad. Sci. USA***106**, 8601–8604 (2009). - 24.
García, J. & van den Bergh, J. C. J. M. Evolution of parochial altruism by multilevel selection.

*Evol. Hum. Behav.***32**, 277–287 (2011). - 25.
Sherif, M., Harvey, O. J., White, B. J., Hood, W. R. & Sherif, C. W.

*Intergroup Conflict and Cooperation: The Robbers Cave Experiment*(University of Oklahoma Book Exchange, 1961). - 26.
Palla, G., Barabasi, A. L. & Vicsek, T. Quantifying social group evolution.

*Nature***446**, 664–667 (2007). - 27.
Lumsden, C. J. & Wilson, E. O.

*Genes, Mind, and Culture: The Coevolutionary Process*(Harvard Univ. Press, 1981). - 28.
Santos, F. C., Pacheco, J. M. & Lenaerts, T. Cooperation prevails when individuals adjust their social ties.

*PLoS Comput. Biol.***2**, 1284 (2006). - 29.
Ohtsuki, H., Hauert, C., Lieberman, E. & Nowak, M. A. A simple rule for the evolution of cooperation on graphs and social networks.

*Nature***441**, 502–505 (2006). - 30.
Szabó, G. & Fáth, G. Evolutionary games on graphs.

*Phys. Rep.***446**, 97–216 (2007). - 31.
Perc, M. & Szolnoki, A. Coevolutionary games – A mini review.

*BioSystems***99**, 109–125 (2010). - 32.
Fowler, J. H. & Christakis, N. A. Cooperative behavior cascades in human social networks.

*Proc. Natl. Acad. Sci. USA***107**, 5334–5338 (2010). - 33.
Hill, A. L., Rand, D. G., Nowak, M. A. & Christakis, N. A. Emotions as infectious diseases in a large social network: the SISa model.

*Proc. R. Soc. Lond. B Biol. Sci.***277**, 3827–3835 (2010). - 34.
Hill, A. L., Rand, D. G., Nowak, M. A. & Christakis, N. A. Infectious Disease Modeling of Social Contagion in Networks.

*PLoS Comput. Biol.***6**, e1000968 (2010). - 35.
Rand, D. J., Arbesman, S. & Christakis, N. A. Dynamic networks promote cooperation in experiments with humans.

*Proc. Natl. Acad. Sci. USA***108**, 19193–19198 (2011). - 36.
van Veelen, M., Garcia, J.Rand, D. G. & Nowak, M. A. Direct reciprocity in structured populations.

*Proc. Natl. Acad. Sci. USA*, 10.1073/pnas.1206694109 (2012). - 37.
Fowler, J. H., Dawes, C. T. & Christakis, N. A. Model of genetic variation in human social networks.

*Proc. Natl. Acad. Sci. USA***106**, 1720–1724 (2009). - 38.
Guo, G. Genetic similarity shared by best friends among adolescents.

*Twin Res. Hum. Genet.***9**, 113–121 (2006). - 39.
Fowler, J. H., Settle, J. E. & Christakis, N. A. Correlated genotypes in friendship networks.

*Proc. Natl. Acad. Sci. USA***108**, 1993–1997 (2011). - 40.
Marlowe, F. W. Hunter-gatherers and human evolution.

*Evol. Anthropol.***14**, 54–67 (2005). - 41.
Traulsen, A. & Nowak, M. A. Evolution of cooperation by multilevel selection.

*Proc. Natl. Acad. Sci. USA***103**, 10952–10955 (2006). - 42.
Nowak, M. A. Five rules for the evolution of cooperation.

*Science***314**, 1560–1563 (2006). - 43.
Tarnita, C. E., Ohtsuki, H., Antal, T., Fu, F. & Nowak, M. A. Strategy selection in structured populations.

*J. Theor. Biol.***259**, 570–581 (2009). - 44.
Bernhard, H., Fischbacher, U. & Fehr, E. Parochial altruism in humans.

*Nature***442**, 912–915 (2006). - 45.
Boyd, R. & Richerson, P. J. Voting with your feet: Payoff biased migration and the evolution of group beneficial behavior.

*J. Theor. Biol.***257**, 331–339 (2009). - 46.
Aktipis, C. A. Is cooperation viable in mobile organisms? Simple Walk Away rule favors the evolution of cooperation in groups.

*Evol. Hum. Behav.***32**, 263–276 (2011). - 47.
Helbing, D. & Yu, W. The outbreak of cooperation among success-driven individuals under noisy conditions.

*Proc. Natl. Acad. Sci. USA***106**, 3680–3685 (2009). - 48.
Uyenoyama, M. & Feldman, M. W. Theories of kin and group selection: A population genetics approach.

*Theor. Pop. Biol.***17**, 380–414 (1980). - 49.
Rogers, A. R. Group selection by selective emigration: The effects of migration and kin structure.

*Am. Nat.***135**, 398-413 (1990). - 50.
Lehmann, L. & Feldman, M. War and the evolution of belligerence and bravery.

*Proc. R. Soc. Lond. B. Biol. Sci.***275**, 2877–2885 (2008). - 51.
Axtell, R. L., Epstein, J. M. & Young, H. P. in

*Social Dynamics*(eds. Durlauf S., & Young H. P.) 191–211 (MIT Press, 2001). - 52.
Hewstone, M., Rubin, M. & Wills, H. Intergroup bias.

*Annu. Rev. Psychol.***53**, 575–604 (2002). - 53.
Milchtaich, I. & Winter, E. Stability and segregation in group formation.

*Games Econ. Behav.***38**, 318–346 (2002). - 54.
Goldstone, R. L., Roberts, M. E. & Gureckis, T. M. Emergent processes in group behavior.

*Curr. Dir. Psychol. Sci.***17**, 10–15 (2008).

## Acknowledgements

We are grateful for support from the Harvard Milton fund, the Harvard Society of Fellows, the John Templeton Foundation, the National Science Foundation/National Institute of Health joint program in mathematical biology (NIH grant no. R01GM078986), the Bill and Melinda Gates Foundation (Grand Challenges grant 37874), NSFC (grant nos. 10972002, 60736022 and 61020106005), the National Institute on Aging (P-01 AG031093 and P30 AG034420) and the National Science Foundation (SES-0719404) and J. Epstein.

## Author information

## Author notes

- Feng Fu
- & Corina E. Tarnita

These authors contributed equally.

## Affiliations

### Program for Evolutionary Dynamics, Harvard University, Cambridge, Massachusetts 02138, USA

- Feng Fu
- , Corina E. Tarnita
- , David G. Rand
- & Martin A. Nowak

### Department of Medicine, Harvard Medical School, Boston, MA 02115, USA

- Nicholas A. Christakis

### Center for Systems and Control, State Key Laboratory for Turbulence and Complex Systems, College of Engineering, Peking University, Beijing 100871, China

- Long Wang

### Department of Health Care Policy, Harvard Medical School, Boston, MA 02115, USA

- Feng Fu
- & Nicholas A. Christakis

### Harvard Society of Fellows, Harvard University, Cambridge, Massachusetts 02138, USA

- Corina E. Tarnita

### Department of Mathematics, Harvard University, Cambridge, Massachusetts 02138, USA

- Corina E. Tarnita
- & Martin A. Nowak

### Department of Sociology, Faculty of Arts and Sciences, Harvard University, Cambridge, MA 02138, USA

- Nicholas A. Christakis

### Department of Psychology, Harvard University, Cambridge, Massachusetts 02138, USA

- David G. Rand

### Department of Organismic and Evolutionary Biology, Harvard University, Cambridge, Massachusetts 02138, USA

- Martin A. Nowak

## Authors

### Search for Feng Fu in:

### Search for Corina E. Tarnita in:

### Search for Nicholas A. Christakis in:

### Search for Long Wang in:

### Search for David G. Rand in:

### Search for Martin A. Nowak in:

## Contributions

F.F. and C.E.T. contributed to this work equally. F.F., C.E.T., N.A.C., L.W., D.G.R. and M.A.N. performed analyses, discussed the results, and contributed to the text of the manuscript.

## Competing interests

The authors declare that they have no competing financial interests.

## Corresponding authors

Correspondence to David G. Rand or Martin A. Nowak.

## Supplementary information

## PDF files

- 1.
### Supplementary Information

Supplementary information for Evolution of in-group favoritism

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

This work is licensed under a Creative Commons Attribution-NonCommercial-No Derivative Works 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/