The evolution of social philopatry in female primates

The transition from solitary life to sociality is considered one of the major transitions in evolution. In primates, this transition is currently not well understood. Traditional verbal models appear insufficient to unravel the complex interplay of environmental and demographic factors involved in the evolution of primate sociality, and recent phylogenetic reconstructions have produced conflicting results. We therefore ana-lyze a theoretical model for the evolution of female social philopatry that sheds new light on the question why most primates live in groups. In individual-based simulations, we study the evolution of dispersal strategies of both resident females and their offspring. The model reveals that social philopatry can evolve through kin selection, even if retention of offspring is costly in terms of within-group resource competition and provides no direct benefits. Our model supports the role of predator avoidance as a selective pressure for group-living in primates, but it also suggests that a second benefit of group-living, communal resource defense, might be required to trigger the evolution of sizable groups. Lastly, our model reveals that seemingly small differences in demographic parameters can have profound effects on primate social evolution.

phylogenetic reconstructions have produced conflicting results. We therefore analyze a theoretical model for the evolution of female social philopatry that sheds new light on the question why most primates live in groups. In individual-based simulations, we study the evolution of dispersal strategies of both resident females and their offspring. The model reveals that social philopatry can evolve through kin selection, even if retention of offspring is costly in terms of within-group resource competition and provides no direct benefits. Our model supports the role of predator avoidance as a selective pressure for group-living in primates, but it also suggests that a second benefit of group-living, communal resource defense, might be required to trigger the evolution of sizable groups. Lastly, our model reveals that seemingly small differences in demographic parameters can have profound effects on primate social evolution.

K E Y W O R D S
behavioral reaction norms, individual-based simulations, kin selection, primate sociality, social evolution, socioecological model

| INTRODUCTION
The transition from solitary life to sociality is considered one of the major transitions in evolution (Maynard-Smith & Szathmary, 1995). To explain the evolution of sociality in primates and the resulting variation in primate social systems, several verbal models have been developed over the past decades (Clutton-Brock, 1974;Crook & Gartlan, 1966;Isbell, 2004;Sterck, Watts, & van Schaik, 1997;van Schaik, 1989;Wrangham, 1980). Even though some of these models disagreed over the ultimate causes for the evolution of group-living (van Schaik, 1989;Wrangham, 1980), they partially built on each other and eventually resulted in a synthetic model that became known as the "socioecological model" (Sterck et al., 1997). This model attempts to explain variation in group size, group composition, and social relationships among group members in terms of differences in predation pressure, resource distribution, and infanticide risk. The socioecological model (hereafter SEM) has constituted the major paradigm for research on primate social evolution for the past two decades, but it has recently been subject to severe criticism (Clutton-Brock & Janson, 2012;Thierry, 2008): perhaps most importantly, it has been argued that the model fails to explain interspecific variation in female philopatry (Clutton-Brock & Janson, 2012;Schülke & Ostner, 2012), a trait which has always been a core element of the SEM (Sterck et al., 1997) and other models (Isbell, 2004;van Schaik, 1989;Wrangham, 1980). Moreover, the SEM has dominated the field of primatology to such an extent that primatologists have often neglected alternative accounts to social evolution, both within and outside the field of primatology. For example, a large body of theoretical work suggests that kin selection and habitat saturation play important roles in the evolution of group formation (e.g., Cadet, Ferrière, Metz, & van Baalen, 2003;Cant & Johnstone, 2009;Emlen, 1982;Giraldeau & Caraco, 1993;Higashi & Yamamura, 1993;Kokko & Lundberg, 2001;Port, Schülke, & Ostner, 2017;Taylor, 1988). Likewise, a verbal model of primate social evolution developed by Isbell (2004) proposed constraints on female dispersal (usually a consequence of habitat saturation) as a major cause for the evolution of female sociality. By contrast, according to the SEM, habitat saturation merely affects female social relationships (Sterck et al., 1997). Lastly, it has been criticized that the SEM relies entirely on verbal logic, making its assumptions and predictions difficult to test empirically (Thierry, 2008). This criticism illustrates that the evolution of primate sociality reflects a complex interplay of diverse environmental and demographic factors that are difficult to disentangle using verbal reasoning. Some authors have consequently called for a more rigorous, quantitative approach (Koenig & Borries, 2009). The present study addresses this need. We develop a comprehensive individualbased model that "goes back to the roots" of primate socioecology: by synthesizing core ideas of primate socioecology with theoretical advances developed outside the field of primatology, we re-examine the question why most primates live in groups.
Early studies of primate sociality have usually invoked predation pressure as the ultimate reason for the evolution of group-living in primates (Alexander, 1974;Clutton-Brock, 1974;Crook & Gartlan, 1966;Eisenberg, Muckenhirn, & Rudran, 1972). However, in the early 1980s, Richard Wrangham suggested that communal resource defense rather than predator avoidance was the most important reason for the evolution of primate sociality (Wrangham, 1980): according to Wrangham's resource defense hypothesis, female primates teamed up with other females, preferentially close kin, to defend communal resource patches against other (groups of) females. Communal resource defense, therefore, led to the evolution of female philopatry, which then constituted the starting point for the further evolution of primate sociality.
Yet although Wrangham's ideas were certainly intriguing, support for his theory remained scarce: The resource defense hypothesis was generally tested on the prediction that, if it was true, and larger groups had a competitive advantage over smaller ones, per capita female reproductive success should increase (at least initially) as group size increases. In contrast to this prediction, the observed relationship between female reproductive success and group size was negative in the majority of primate populations studied (e.g., Jolly et al., 2002;Kappeler & Fichtel, 2012;Robinson, 1988;Sommer & Rajpurohit, 1989;van Noordwijk & van Schaik, 1999;van Schaik, 1983), a finding generally interpreted as evidence for within-group resource competition. The observed pattern seemed to support the traditional notion that primate groups form for reasons of predator avoidance, and that within-group feeding competition constrains the evolution of group size (Terborgh & Janson, 1986;van Schaik, 1983). Thus, although Wrangham's ideas were considered in later attempts to explain female social relationships (Sterck et al., 1997;van Schaik, 1989), it soon became consensus that communal resource defense is not a significant cause for the evolution of group-living in primates (Schülke & Ostner, 2012;Terborgh & Janson, 1986;van Schaik, 1983;van Schaik, 1989).
Wrangham's theory was also challenged by a recent phylogenetic reconstruction of primate social evolution, which proposed a novel, stepwise scenario for the origins of primate sociality (Shultz, Opie, & Atkinson, 2011). According to this scenario, sociality first progressed from solitary foragers into loose aggregations of (unrelated) social foragers. The stable and complex societies of most contemporary primates are then derived from these foraging aggregations after, in a second step, sex-biased dispersal evolved. Hence, social philopatry is viewed as a consequence rather than a cause of primate sociality. The phylogenetic reconstruction of Shultz and colleagues (Shultz et al., 2011) supports the role of predation in primate social evolution, but it challenges not only Wrangham's model but also the SEM, which generally predicts more flexible transitions between the various types of primate social systems (Shultz et al., 2011). More recent phylogenetic reconstructions partially refuted the conclusions of Shultz and colleagues by showing that some of the proposed transitions are not supported by the available data if a different classification of social systems is used (Kappeler & Pozzi, 2019;Lukas & Clutton-Brock, 2013). Nevertheless, Shultz et al.'s study certainly contributed additional uncertainty to the already heated debate on the evolution of primate sociality.
The apparent limitations of traditional models of primate sociality (Clutton-Brock & Janson, 2012;Thierry, 2008), together with the divergent results of phylogenetic reconstructions (Kappeler & Pozzi, 2019;Lukas & Clutton-Brock, 2013;Shultz et al., 2011) illustrate that the origins of primate sociality remain still poorly understood. The present study aims to shed new light onto this question by quantifying possible selective pressures favoring the transition from a solitary social organization to sociality. We developed an individual-based (also known as agent-based) evolutionary model (DeAngelis & Mooij, 2005), which allows us to examine how selection changes our traits of interest over the generations and, as a result, the behavior of individuals and the social organization of the population. This approach enables us to study possible adaptive causes of primate social evolution more systematically and quantitatively than would be possible by verbal reasoning.
We focus on a population in which females are initially living solitarily in discrete home ranges. This type of social organization is considered the ancestral condition in primates and other mammals (Kappeler & Pozzi, 2019;Lukas & Clutton-Brock, 2013). In addition, we consider an alternative scenario, in which any female in our population is associated with a single male. In this scenario, female social philopatry evolves from a pair-living social organization, as recently suggested by Kappeler and Pozzi (2019). Females acquire home ranges by either finding a vacant home range (an area not inhabited by another female) or by displacing and established resident female from her home range (takeover). Group formation may occur via natal philopatry, but females suffer from within-group competition over resources, which can be either of the scramble or of the contest type, or a combination of both (Koenig & Borries, 2002;Terborgh & Janson, 1986;van Schaik, 1983;van Schaik, 1989). In our model, these costs of within-group competition may be compensated by two possible benefits of sociality. First, sociality may provide primates with better protection from predators (Alexander, 1974;Crook & Gartlan, 1966;van Schaik, 1983); second, group-living females may be more effectively able to defend their communal home range against other females. This latter assumption incorporates Wrangham's idea of communal resource defense into our model, though we stress that it does not strictly reflect the type of between-group competition envisaged by Wrangham (or the SEM; see Section 4 for details).
We study the evolution of social philopatry based on the evolution of two behavioral strategies: a (juvenile) female's propensity to stay in the natal home range and a resident female's propensity to tolerate her within her home range. These strategies are assumed to be heritable traits that evolve as a consequence of mutation, natural selection, and genetic drift. We start by asking (a) whether social philopatry can evolve if group-living does not provide benefits. Next, we examine (b) how our proposed benefits (predator avoidance and communal resource defense) affect the evolution of group-living; first, if these benefits act in isolation from each other, and second, if they both act together. Finally, (c) we study how variation in demographic parameters affects group formation and group size.

| Model overview
We consider a population structured into m discrete home ranges. These home ranges are usually referred to "patches" or "territories" theoretical models of social evolution (e.g., Kokko & Lundberg, 2001;Pen & Weissing, 2000;Taylor, 1988). They provide sufficient resources to support one or more individuals. If not indicated otherwise m = 1,000. We focus on females, which can either be residents occupying a home range or floaters. Only resident females can reproduce successfully. Floaters can become residents by either discovering an empty home range (i.e., an area not inhabited by another female) or by displacing another female from its home range (takeover). After a successful takeover, the former residents become floaters. When not evicted by floaters, a female resident remains in her home range until her death. The present study does not consider the possibility that floaters peacefully join groups of established residents (Port et al., 2017). The set of strategies required to incorporate this option would mean a substantial extension of the present model and is thus beyond the scope of our study (see Section 4 for details).
Our simulations proceed in discrete time steps. In each time step, four processes happen in the following sequence:

| Reproduction
Each resident female produces on average F(n,R) offspring, where n denotes group size and R the female's rank in the group. Concerning the male contribution to reproduction, we consider two scenarios: either one male is permanently (until death) associated with all females in the group ("male residency"), or males are floaters, and each female mates at random and independently from the other females of her group with a floating male ("male roaming").

| Group increase and dispersal
All newly produced males disperse and become floaters. Newly produced females have an inherited propensity x(n) to stay in the group, while resident females have an inherited propensity y(n) to accept juvenile females born within their home range to the group. A juvenile female will stay in the group with probability x(n)*y(n), where y(n) is the acceptance propensity of the highest-ranked female in the group. As indicated by the notation, both propensities depend on group size n. The propensities x(n) and y(n) are evolvable strategies that change over the generations subject to mutation, natural selection, and genetic drift. The population-level group size distribution in the model results from the individual decisions to stay and to accept juveniles wanting to stay, and it is therefore an emergent property of the evolved strategies x(n) and y(n).

| Survival
Female and male floaters survive to the next time step with probability S F and S M , respectively. Residents survive with probability S R (n), which may be dependent on group size n. Home ranges become empty if all resident females have died.

| Colonization and take-overs
If a female floater discovers an empty home range, she occupies the home range and becomes the new resident. If a female floater encounters a home range already occupied by a female (or a group of females), she attempts a takeover, which is successful with probability t(n), where n is the female group size in the home range.
For each set of parameters, we run 20-100 replicate simulations for 2.000 generations. An evolutionary equilibrium was typically reached after about 1,000 generations.

| Model details
In this section, we provide details on the rules and functions used to

| Reproduction
Owing to density dependent within-group scramble competition, female fecundity (F) declines as group size increases. Moreover, we allow for contest competition leading to reproductive skew among females, such that higher-ranking females have higher reproductive success than lowerranking females. Combining these assumptions, we express the fecundity (F) of a female of rank R in a group of size n by the function: where F 0 (usually assumed to be 1) is a female's baseline fecundity in terms of offspring that survive until the dispersal stage, φ gives the intensity of scramble competition, and δ the intensity of contest competition. According to Equation (1), female fecundity declines as group size increases, where the magnitude of the decline is given by the parameter φ. Furthermore, if δ = 0, the effect of density dependence (scramble competition) is the same for all individuals, but as δ increases, reproductive success of low-ranking females declines compared to the reproductive success of high ranking females. Equation (1) reflects key ideas of primate socioecology (scramble and contest competition) and follows the empirical observation that female fecundity usually declines as group size increases (Jolly et al., 2002;Kappeler & Fichtel, 2012;Sommer & Rajpurohit, 1989;van Noordwijk & van Schaik, 1999;van Schaik, 1983). Note, however, that in the male residency scenario, this formulation (Equation 1) does not account for possible feeding competition with the resident male. Different types of function, for example allowing for a humped-shaped relationship between female reproductive success and group size, yield qualitatively similar results (Port, unpublished data).

| Group increase and dispersal
A juvenile female's inherited propensity x to stay in the natal home range, and a resident female's inherited propensity y to accept (rather than to evict) her are both conditional on group size (n) and characterized by two behavioral reaction norms. We model these reaction norms as logistic functions: where x(n) and y(n) are sigmoidal functions that are each characterized by two (heritable) parameters that determine the shape of the Irrespective of group size, daughters are always selected to stay on the natal home range. In contrast, the propensity of the most dominant female to tolerate an additional group member decreases with group size and approaches zero for group sizes of 3 and above. Reaction norms are calculated as means (solid line) ± SD (shaded area) over 100 simulations. Simulation parameters: m = 1,000, For example, the propensity x(n) to stay in a group of size n is determined by the parameters β 0 and β 1 . A positive value of β 1 means that the probability to stay declines with group size, whereas a negative value of β 1 means that the probability to stay increases with group size, and the absolute value of β 1 determines the steepness of the response. The inflection point of the sigmoidal function x(n) is determined by both β 0 and β 1 and is located at n = −β 0 /β 1 .
Likewise, the reaction norm relating a resident's propensity y(n) to accept an offspring is determined by two parameters α 0 and α 1 with a similar interpretation. x(n) and y(n) can take on values between 0 (disperse/ evict) and 1 (stay/ accept). Group formation occurs whenever an offspring decides to stay in the natal home range, and the established resident(s) decide to accept her, which occurs with probability x(n)*y(n), where y(n) is the acceptance propensity of the highest ranking female in the group. New adult group members attain the lowest rank position, and only increase in rank if a female above them in the hierarchy dies.
We also considered several model variants. For example, we considered the scenario that new adult group members do not start their reproductive career at the lowest rank position, but that they attain the rank directly below the rank of their mother. Moreover, we extended the behavioral reaction norms by not only making them dependent on group size n, but also the mother's rank R. All these modifications had only a marginal effect on our results (Port, unpubl. modeling results) and are therefore not pursued further.

| Survival
Group living may have the advantage that individual females face a lower predation risk, owing to enhanced vigilance, dilution effects, predator confusion, and/or group defense. We assume that the survival probability of a resident (male or female) from one time step to the next in a group of n females is given by: where S R (n) is an increasing function that starts at S B = S R (1), the survival probability of a solitarily breeding female, and asymptotically approaches the maximum survival probability S max . The parameter σ specifies the magnitude of the survival benefit of a larger group: higher values of σ mean that survival increases more strongly as group size increases. We refer to S B as the (species-specific) baseline survival probability (in most simulations S B = 0.8). S max is set to 0.95 in all simulations (Table 1).

| Takeovers
The probability that a resident female is challenged by k floaters is determined by a Poisson distribution with mean λ = ε n F , where ε is the "speed" with which floaters discover home ranges, and n F is the number of female floaters in the population (an emergent parameter that changes as the behavioral reaction norms evolve). The k floaters are drawn at random from the floater pool and challenge the female sequentially (i.e., one at a time). We model the probability t(n) that any attempt of a floater to take over a home range defended by n group members is successful using the following function: where t 0 is the (baseline) takeover probability of a home range defended by a lone resident. The parameter τ specifies how strongly the takeover probability depends on group size, with higher values of τ indicating that the takeover probability decreases more strongly as group size increases. After a successful takeover, all former resident females get evicted and become floaters, whereas the successful floater establishes itself as a resident.

Inheritance
The parameters α 0 , α 1 , β 0 , and β 1 determining the behavioral reaction norms of juvenile and resident females are heritable, subject to rare mutation and can, hence, evolve. To be specific, we consider variation at four diploid loci, each corresponding to one of the four parameters.
Each locus can harbor a broad spectrum of alleles ranging from very negative to very positive values. The two alleles at a (diploid) locus determine the reaction norm parameter in an additive manner (e.g., . When offspring are produced, they inherit one allele per locus from their mother and one from their father. Alleles are inherited randomly and independently from alleles at other loci. With a small probability μ (usually 0.01), a mutation occurs. In such a case, the allelic value of the parent is modified by a small random number drawn from a Cauchy-distribution with center 0 and width 0.1. At the start of our simulations, α 0 = β 0 = 5, and α 1 = β 1 = 0. This setting renders the behavioral reaction norms insensitive to group size, and x(n) = y(n) ≈ 0 (Equations 2a and 2b), corresponding to our initial condition, in which social philopatry has not yet evolved.

Relatedness
Given that in our model the most dominant female controls groupmembership, the relatedness of all other females to the most dominant female is more informative than the average relatedness among all females in a group. We determined the degree of relatedness to the most dominant female by first calculating the linear regression of the allelic values of the above gene loci of each female with rank R > 1 on the corresponding allelic values of the female with rank R = 1 (Gardner, West, & Wild, 2011;Michod & Hamilton, 1980; see also Quinones, van Doorn, Pen, Weissing, & Taborsky, 2016) and by subsequently averaging the regression coefficients.

| No benefits of group-living
We first consider the case σ = 0 and τ = 0, which implies that living in a larger group neither provides survival benefits (i.e., no protection against predators) nor yields a higher degree of protection against takeovers (i.e., no advantage of communal defense). Figure  By contrast, the residents' evolved reaction norm is highly sensitive to group size: resident females are tolerant toward their daughters as long as group size is low, but they tend to evict daughters as groups grow larger.
It is easy to understand why daughters evolve the tendency to stay in the natal home range despite significant costs of group-living.  (Giraldeau & Caraco, 1993;Higashi & Yamamura, 1993).
In line with intuitive expectation, these models predict that evolved group sizes should be positively related with relatedness. We can check this prediction by comparing the male-residency scenario (where males are permanently associated with the females in a group) with the roaming-male scenario (where females mate at random, and independently of their group members, with solitary floating males).
As expected, female relatedness is higher in the male-residency scenario, because females are usually full-sisters rather than half-sisters, and as a consequence, the evolved group size is also larger in the male-residency scenario (Figure 2, online Appendix A). Moreover, in the male residency scenario, increased survival (i.e., longer tenure) of the resident male leads to increased relatedness among females and the evolution of larger groups (Figure 2). Notice, however, that in the male residency scenario, we ignored possible feeding competition with the resident male. Evolved female group sizes are presumably lower if females also compete with the male over resources.
More generally, we found that even severe within-group competition does not favor voluntary dispersal of juvenile females, irrespective of whether competition is of the contest or scramble type (online Appendix B: Figures A2-A4). In almost all cases considered, group formation is determined by the resident's evolved degree of tolerance. This tolerance collapses to zero whenever the residents' inclusive fitness benefits are too small to compensate the direct fitness costs associated with living in a larger group. Terborgh & Janson, 1986;van Schaik, 1983) and is in line with empirical studies (Hill & Lee, 1998;Nunn & van Schaik, 2000;van Schaik & van Noordwijk, 1985): protection from predators can promote the evolution of group-living.

| Group-living provides benefits
However, our simulations also support Wrangham's suggestion that communal resource defense selects for group-living (Wrangham, 1980). Adding communal defense to the model without direct benefits leads to an increase in mean female group size, from     patterns. Finally, our model indicates that variation in demographic parameters (e.g., life-history) can have profound effects on the evolution of sociality, and that the direction of these effects depends on the underlying benefits of group-living. We will discuss each of these conclusions in more detail below. After that, we will discuss limitations of our model, highlight avenues for future research, and compare our model to theoretical models developed outside the field of primatology.

| Kin selection
Theoretical models have long suggested that kin selection should facilitate the evolution of group-formation (Cant & Johnstone, 2009;Giraldeau & Caraco, 1993;Higashi & Yamamura, 1993). Moreover, kin selection has been shown to be a driving force behind the evolution of animal societies with high degrees of reproductive altruism (eusociality (Hughes, Oldroyd, Beekman, & Ratnieks, 2008), cooperative breeding (Cornwallis, West, Davis, & Griffin, 2010;Lukas & Clutton-Brock, 2012b) (Sterck et al., 1997;van Schaik, 1989). However, the model remains vague about where these females should go, or why they should prefer to live with non-relatives rather than with relatives on the natal home range.

| Predation and communal resource defense
Our model supports the traditional notion that predator avoidance can select for group-living in primates (Alexander, 1974;Terborgh & Janson, 1986;van Schaik, 1983). However, it also suggests that, if within-group competition constrains group augmentation, predator avoidance alone does rarely lead to the evolution of sizable groups.
Our model rather provides new credence to Wrangham's classic idea that communal resource defense can be a (second) driver of groupliving in primates (Wrangham, 1980). If both benefits act together, they reinforce each other and strongly promote the evolution of primate sociality.
This result seems to be in contrast to many field studies, based on which communal resource defense was rejected as an explanation for the evolution of group-living in primates (reviewed in Janson, 1988;Jolly et al., 2002;Schülke & Ostner, 2012;Terborgh & Janson, 1986;van Schaik, 1983;van Schaik, 1989). How can we explain this difference? A prediction usually derived from Wrangham's theory is that, if communal resource defense provides a selective advantage of groupliving in primates, female fecundity should increase with increasing group size. Yet the observed relationship is in the opposite direction in most species (e.g., Jolly et al., 2002;Kappeler & Fichtel, 2012;Sommer & Rajpurohit, 1989;van Noordwijk & van Schaik, 1999;van Schaik, 1983). Our model shows, however, that the above prediction is not necessarily correct. In fact, female fecundity declines in our model F I G U R E 4 Effect of demography on the evolution of primate sociality. Evolved female group sizes (mean ± SD, calculated as in Figure 3) in three benefit scenarios for two values of baseline survival (S B = 0.8, S B = 0.9). All other parameters as in Figure 1 by assumption, and yet communal resource defense selects for the evolution of group-living. In other words, while within-group resource competition certainly constitutes an important cost of group-living, demonstrating these costs does not mean that communal resource defense can be excluded as a selective advantage of primate sociality.
Wrangham's theory, therefore, has been rejected based on the wrong prediction. But does that mean that Wrangham was right? Wrangham was certainly right to suggest that communal resource defense can be a strong selective advantage of group-living. Yet the scenario he had in mind when he developed his verbal model differs from the scenario addressed by our model. Wrangham (1980) considered communal defense of feeding patches (e.g., fruit trees), whereas our model considers communal defense of home-ranges. In most contemporary group-living primates, competition between groups occurs over feeding patches (i.e., the scenario envisaged by Wrangham), but groups rarely supplant each other from whole home ranges or territories. However, this was presumably different at the dawn of primate sociality (i.e., the scenario addressed by our model). The ancestral type of social organization in primates (and other mammals) was likely a solitary forager (Kappeler, 2014;Lukas & Clutton-Brock, 2013;Shultz et al., 2011), where females lived on individual home ranges, presumably showing varying degrees of association with males (Kappeler, 2014;Lukas & Clutton-Brock, 2013), a type of social organization still observed in many contemporary prosimians (Kappeler, 2012 Packer, 2015;Piper, Tischler, & Klich, 2000). We believe, therefore, that our population structure better than Wrangham's scenario reflects ancestral primate conditions. It is important to note, however, that resource competition, as we define it, cannot necessarily be equated with the types of between-group competition observed in contemporary, group-living primates. Whether between-group competition helps to maintain female sociality in contemporary primates is beyond the scope of our model and should be addressed by future theory.

| Habitat saturation and within-group resource competition
According to the SEM, contrasts in resource competition within groups most strongly predict contrasts in female dispersal patterns, that is, whether females habitually disperse or remain philopatric. A common argument is that, where within-group contest competition is weak (because food is evenly distributed and not monopolizable), such that females do not strongly benefit from kin support, female dispersal should be common (Sterck et al., 1997;van Schaik, 1989). This link between within-group contest competition and female dispersal is among the most strongly disputed predictions of the SEM (Clutton-Brock & Janson, 2012; Koenig & Borries, 2009;Schülke & Ostner, 2012;Thierry, 2008), mainly because it has proven difficult to quantify within-group resource competition empirically (Koenig & Borries, 2009;Snaith & Chapman, 2007). Our model suggests that such a link is likely not to be expected from a theoretical point of view: owing to high levels of habitat saturation, females are usually favored to remain on the natal home range. Compared to the strong effect of habitat saturation, the type (scramble vs. contest) and intensity of within-group competition is of marginal importance and does not exercise strong selection on voluntary dispersal.
Given the strong effect of habitat saturation predicted by our model, one might ask how strongly saturated the habitat is in which primates live? In this context, it is important to distinguish the concept of habitat saturation from the concept of carrying capacity. While carrying capacity is usually interpreted as the number of individuals a habitat can support, a habitat is considered saturated if all suitable home ranges are occupied, and a "surplus" of individuals is produced, which, in solitary species, lives as non-territorial floaters (Kokko & Lundberg, 2001; in social species, "surplus" individual might join existing social groups). It is reasonable to assume that most primates live in saturated habitats; otherwise, primate populations would not be able to maintain themselves. However, the strength of selection for social philopatry is not determined by the existence of habitat saturation per se, but by the intensity of habitat saturation (Figure 3a,f, see also Kokko & Lundberg, 2001). This intensity often varies as a result of contrasts in demographic parameters (e.g., mortality reduces habitat saturation, see demography, below).
Both our model and the SEM suggest that there are conditions under which females leave their natal group, but the underlying mechanisms are different: The SEM predicts that natal females disperse voluntarily (Koenig & Borries, 2002;Sterck et al., 1997;van Schaik, 1989), whereas our model predicts that females usually leave their natal group because they get evicted. In contrast to these (verbal) models, therefore, our model does not predict different dispersal patterns under different types of within-group competition (i.e., scramble, contest). Our model only predicts that increased within-group competition (particularly scramble competition) leads to elevated rates of evictions (online Appendix B). In this respect, our model resembles an alternative model of primate social evolution proposed by Isbell (Isbell, 2004

| Demography
Theoreticians have long recognized that demography and life-history can have profound effects on the evolution of sociality and altruism (Kokko & Lundberg, 2001;Lehmann & Rousset, 2010;Pen & Weissing, 2000;Port et al., 2011), and some predictions of theoretical models have been supported in comparative analyses (Arnold & Owens, 1998;Lukas & Clutton-Brock, 2012a). Like previous models, our results suggest that demographic parameters play a crucial role in the evolution of (primate) sociality, but our results also indicate that whether the effect of demographic parameters is positive or negative depends on the assumed benefit of group-living. If group-living improves communal resource defense, our model predicts that low resident mortality generally strengthens selection for group-living (owing to its effect on habitat saturation), resulting in the evolution of larger groups. If we take body size as a proxy for baseline mortality, this prediction appears to be well supported, as large-bodied primates tend to live in larger groups (Clutton-Brock & Harvey, 1977;Janson & Goldsmith, 1995). By contrast, the positive relationship between body size and group size could not easily be explained by the predation avoidance hypothesis, and prompted extensions and alterations of the SEM (Janson & Goldsmith, 1995).

| Limitations of the model and avenues for future research
The aim of this study was to quantify the selective pressures leading to the evolution of female sociality. To do so, we have started from a type of social organization where females are initially living solitarily (Lukas & Clutton-Brock, 2012b). Based on this scenario, we have then examined the conditions under which females evolved to be social. We examined two alternative scenarios: One in which females are not associated with a male, and one in which they are associated with a single male, rendering the starting-point in our model pair-living. We have shown that female social philopatry can evolve under both scenarios. However, we cannot answer the question whether (in the real world) female sociality directly evolved from solitary females to group-living females (Shultz et al., 2011), or whether it first progressed from solitary females to pair-living and then to groups consisting of multiple females (Kappeler & Pozzi, 2019;Lukas & Clutton-Brock, 2013). While no theoretical model will be able to provide a definite answer to this question, an extension of our model could be used to check the plausibility of alternative scenarios proposed by phylogenetic reconstructions (Kappeler & Pozzi, 2019;Lukas & Clutton-Brock, 2013;Shultz et al., 2011). In addition to female strategies, such a model would have to include evolvable male strategies, and would have to examine at what point in evolution males would be favored to permanently associate with (groups of) females.
Moreover, we have assumed that males inevitably disperse. We have thus excluded the possibility that males rather than females evolve to be philopatric, and we can consequently not explain why, in some primate species, males rather than females are the more philopatric sex. The evolutionary causes of sex-biased dispersal have been disputed for decades and are currently still not resolved (Clutton-Brock & Lukas, 2012;Greenwood, 1980;Lawson-Handley & Perrin, 2007). Yet in light of our current understanding of sex-biased dispersal, particularly the involvement of local mate competition (Perrin & Mazalov, 1999), we consider it highly unlikely that male rather than female philopatry evolved as a first step from an initially solitary social organization. We rather suggest that male philopatry (and female dispersal) evolved as a derived trait after the transition to sociality had occurred, and that it evolved in species where male tenure length exceeds female age at first reproduction, such that females face the risk of mating with their fathers (Lukas & Clutton-Brock,-2011 (Freed, 1986;Gour et al., 2013;Piper, Walcott, Mager, & Spilker, 2008). Lastly, takeovers are very common among males, both in primates and in other vertebrates (Arnold, 1990;Packer & Pusey, 1982;Piper et al., 2008;Port, Johnstone, & Kappeler, 2010;Snyder-Mackler, Alberts, & Bergman, 2012). We thus believe that this form of home range acquisition is a realistic assumption for the presumed ancestral primate social organization our model focuses on.
However, there are at least two possible alternative dispersal options, which we have omitted in this model: First, females may disperse to join non-relatives on a different home range. This form of dispersal has been addressed in detail in previous models (Port et al., 2011;Port et al., 2017;Port & Johnstone, 2013), but it is presumably less relevant in the present model. If females are given the option to join relatives on the natal home range, or non-relatives on a distant home range, they should usually prefer relatives over non-relatives, unless factors such as inbreeding avoidance (Lukas & Clutton-Brock, 2011) or local resource competition (Isbell, 2004;Perrin & Mazalov, 2000;West, Pen, & Griffin, 2002) constrain group formation among relatives. Second, females may try to acquire home ranges by "squeezing" themselves into the boundaries of neighboring home ranges (López-Sepulcre & Kokko, 2005). We leave the modeling of these alternative dispersal scenarios to future models, since they require a considerable extension of our model. The option of joining non-natal groups requires a substantial extension of the set of strategies (e.g., a condition-dependent floater strategy to join an already established group), while dispersal via territory-budding requires a spatially explicit model, that is, a model that explicitly incorporates the spatial configuration of home ranges.

| Comparison with other models
Our model is not the first quantitative model that addresses the evolution of social philopatry, and previous models for the evolution of group size, natal philopatry, or cooperative breeding obtained partially similar results. For example, optimal group-size models (Giraldeau & Caraco, 1993;Higashi & Yamamura, 1993) examined costs and inclusive fitness benefits of social living in relation to group size. Similar to our model, these models show that, if group-membership is determined by established residents, genetic relatedness to potential joiners facilitates group formation and leads to the evolution of larger groups. However, these models use rather abstract fitness functions based on the average fitness of group members. Later models derive more specific fitness expressions dependent on individual state (e.g., dominant, subordinate) and consider how aspects of social living affect specific fitness components such as survival or fecundity (Kokko & Johnstone, 1999;Kokko, Johnstone, & Clutton-Brock, 2001) (Kokko & Lundberg, 2001;Pen & Weissing, 2000). Yet these models

| Testing the model
Are there any predictions of our model that can be tested using empirical data of primates? Our model predicts that demographic parameters (mortality, fecundity) affect the evolution of group size. It might thus be tempting to test these predictions at a comparative level across primates. However, our model focuses on a scenario that likely reflects ancestral primate conditions, and in which several presumably derived traits, such as female dispersal between groups are not considered (see limitations of our model).
Testing our model in species exhibiting such traits would thus not be appropriate. Moreover, our model has shown that several other parameters affect the evolution of group size, perhaps most importantly, within-group scramble competition. As long as we cannot (also) measure these parameters, they will represent strong confounders that will be difficult to control in any comparative test of our model. Thus, rather than testing our model at a comparative level, it might be more suitable to parameterize our model with field data of a single or few species. For example, we envisage, that the quantities fecundity (F(n,R), Equation 1), survival probability of residents (S R (n), Equation 3), and takeover probability (t(n), Equation 4) can be estimated directly from field data (see, e.g., Port et al., 2012). Such an approach could then test whether our model correctly predicts the social organization (e.g., group size, kin structure) of the target species.
But is it really necessary to test our model? Providing testable predictions is not the sole (and often not even the most important) purpose of a model (Levins, 1966). By considering alternative scenarios, models can provide us with useful insights about the real world that we would likely not have gained with purely verbal reasoning.
Our model has drawn our attention to possible mechanisms and selec-