Same-sex sexual behaviour and selection for indiscriminate mating

The widespread presence of same-sex sexual behaviour (SSB) has long been thought to pose an evolutionary conundrum, as participants in SSB suffer the cost of failing to reproduce after expending the time and energy to find a mate. The potential for SSB to occur as part of an optimal strategy has received less attention, although indiscriminate sexual behaviour may be the ancestral mode of sexual reproduction. Here, we build a simple model of sexual reproduction and create a theoretical framework for the evolution of indiscriminate sexual behaviour. We provide strong support for the hypothesis that SSB can be maintained by selection for indiscriminate sexual behaviour, by showing that indiscriminate mating is the optimal strategy under a wide range of conditions. Further, our model suggests that the conditions that most strongly favour indiscriminate mating were probably present at the origin of sexual behaviour. These findings have implications not only for the evolutionary origins of SSB, but also for the evolution of discriminate sexual behaviour across the animal kingdom. A model of sexual reproduction creates a theoretical framework for the evolution of indiscriminate sexual behaviour, showing that it is the optimal strategy under a wide range of conditions, and supporting the hypothesis that same-sex sexual behaviour can be maintained by selection for indiscriminate sexual behaviour.

stand its presence, a more salient question would be to understand its absence. They hypothesize that indiscriminate sexual behaviour (that is, mating without determining the sex of one's partner) is the ancestral condition, realizing that discriminate sexual behaviour (that is, directing sexual behaviour at members of the opposite sex) must evolve through mechanisms controlling sexual signalling and mate choosiness. Of course, the existence of indiscriminate mating as the ancestral condition does not explain its current prevalence 33 . While in some cases (for example, broadcast spawning and wind pollination) indiscriminate mating predominates as a result of little potential benefit to (or opportunity for) sexual discrimination, it is oftentimes unclear why indiscriminate mating persists.
Building on the perspective of Monk et al. 4 , we argue that selection may actually favour indiscriminate sexual behaviour (or prevent the evolution of sexual discrimination) under a wide range of conditions observed in nature. We create a theoretical framework for understanding the conditions that favour indiscriminate sexual behaviour and provide a test of whether SSB is likely to result from selection for indiscriminate sexual behaviour. We start with a simple optimization model of sexual reproduction, and then support this approach with a population genetic model that explicitly tracks evolutionary dynamics. We find that indiscriminate mating is the optimal strategy for many parameter combinations and produce testable predictions about the conditions that favour SSB resulting from indiscriminate mating.

Optimization model
We present the optimization model in full in the Methods and provide a basic summary of its features here. Our approach explores one of many potential hypotheses for SSB (that it results from indiscriminate mating) without considering the evolution of same-sex preferences that have evolved in some vertebrates and may result from complex social or genetic interactions (see Table 2 in Bailey and Zuk 1 ). As a result, and because our model does not make assumptions consistent with sexual behaviour in humans, this study should not be considered in relation to human sexuality. We assume that a population consists of two sexes (the searching sex and the targeted sex), where a proportion σ is of the targeted sex. We make no assumptions about the identity of the sexes and use the terms searching and targeted liberally. For example, if our model were applied to an insect in which males seek females to display to, males would be the searching sex and females would be the targeted sex.
We assume that reproduction occurs in discrete bouts (corresponding to generations) where each member of the searching sex has only one opportunity to mate per bout (an assumption that biases against indiscriminate mating since SSB cannot be corrected for within one reproductive bout). We assume that an individual of the searching sex finds another individual of either sex with which to attempt to mate with probability f. The evolutionarily labile parameter of our model a controls whether the searching sex attempts to mate discriminately. In particular, a is the proportion of bouts in which a member of the searching sex attempts to sexually discriminate. Of course, members of the searching sex can mate discriminately only if they identify some signal (or cue) that an individual is of the opposite sex. We define s as the proportion of bouts in which a member of the targeted sex provides a signal of their sexual identity. Then, as shown in the Methods, given that a member of the searching sex finds a mate, it will be of the opposite (targeted) sex with probability σ + (1 -σ)as. Thus, if members of the targeted sex always signal (s = 1) and members of the searching sex always attempt to discriminate (a = 1), a member of the searching sex is guaranteed to find a member of the targeted sex. Furthermore, without any signal from the targeted sex (s = 0) or any attempt to discriminate from the searching sex (a = 0), the probability of finding a mate of the

Same-sex sexual behaviour and selection for indiscriminate mating Brian A. Lerch ✉ and Maria R. Servedio
The widespread presence of same-sex sexual behaviour (SSB) has long been thought to pose an evolutionary conundrum, as participants in SSB suffer the cost of failing to reproduce after expending the time and energy to find a mate. The potential for SSB to occur as part of an optimal strategy has received less attention, although indiscriminate sexual behaviour may be the ancestral mode of sexual reproduction. Here, we build a simple model of sexual reproduction and create a theoretical framework for the evolution of indiscriminate sexual behaviour. We provide strong support for the hypothesis that SSB can be maintained by selection for indiscriminate sexual behaviour, by showing that indiscriminate mating is the optimal strategy under a wide range of conditions. Further, our model suggests that the conditions that most strongly favour indiscriminate mating were probably present at the origin of sexual behaviour. These findings have implications not only for the evolutionary origins of SSB, but also for the evolution of discriminate sexual behaviour across the animal kingdom.
opposite sex is simply the proportion of the population of that sex σ. We discuss the interpretation of a and s further in the Methods.
Even on finding a mate of the opposite sex the searching sex may be rejected by their potential mate (with probability r), in which case they do not reproduce in the reproductive bout. We assume that matings suffer a fecundity cost p associated with the sexual signal. Individuals from the searching sex die between reproductive bouts with probability d in the absence of sexual discrimination. They also carry an additional survival cost c when they attempt sexual discrimination (a search cost), such that a member of the searching sex will survive to the next reproductive bout with probability 1 -(d + ac).

Analysis and results
The model above results in a wide range of parameter space in which indiscriminate mating is an optimal strategy. Specifically, one can derive from this model the expected lifetime reproductive success of a member of the searching sex, R 0 . Differentiating R 0 with respect to a gives the fitness gradient dR 0 /da (Methods). At a given amount of sexual discrimination a, the sign of the fitness gradient gives the expected direction of evolution. Values of a for which the fitness gradient is 0 are potential evolutionary optima. In analysing the optimal amount of sexual discrimination, one can determine under what conditions, if any, individuals should attempt to mate indiscriminately. If the optimal strategy is indiscriminate mating, then SSB is expected to be frequent.
Of particular interest is whether indiscriminate mating (a = 0) is ever an optimal strategy. We show in the Methods that the fitness gradient at a = 0 will be negative (and thus sexual discrimination should never evolve) whenever Given a 1:1 sex ratio (σ = 0.5), equation (1) simplifies to c > (1 -d)ds. Equation (1) shows that even under restrictive conditions in which the targeted sex always provides a sexual signal (s = 1), the optimal strategy may be to never attempt sexual discrimination. Without sexual signalling (s = 0), if there is any cost to attempting to sexually discriminate, sexual discrimination is not expected to evolve. Although this is obvious given the formulation of the model, it formalizes the important point that the origin of sex and the origin of providing signals of one's sex are not the same. Logically, such cues probably evolved after the origin of sexual reproduction 4 , so our model suggests that selection for sexual discrimination was unlikely to follow immediately upon the origin of sex, strengthening the hypothesis that indiscriminate sexual behaviour is ancestral 4 .
Similarly, the conditions for maximum attempted discrimination a = 1 to be the best strategy are derived in the Methods and shown in Table 1. If neither condition is met, then an intermediate level of sexual discrimination will evolve (an outcome that occurs in a small but non-trivial portion of the parameter space).
A high cost to sexual discrimination c and poor signalling by the targeted sex s promote indiscriminate mating as the optimal strategy (equation (1) and Fig. 1). Sexual discrimination is most likely to evolve when the sex ratio is biased in favour of the searching sex (equation (1)). When the majority of the population is of the targeted sex (1 > σ » 0.5), individuals are more likely to find a member of the opposite sex with which to mate by chance, so attempted sexual discrimination is a worse strategy than when the targeted sex is rare.
Interestingly, an intermediate death rate d favours the evolution of sexual discrimination (Fig. 1). When death is rare (small d), members of the searching sex are expected to have many reproductive opportunities in their lifetime. Under these conditions, the best strategy is to live as long as possible by not attempting to sexually discriminate. The cost of SSB in this case is low because one failed mating due to SSB will probably be made up for by chance later in life. On the other hand, when d is high, members of the searching sex are unlikely to ever mate. In this case, they cannot afford to pay any additional cost and their optimal strategy is to mate indiscriminately and rely on luck. Of course, indiscriminate mating will result in SSB being common (Fig. 1, bottom row).
Although they do not affect the optimal level of discrimination, increasing the cost of sexual signals p and the probability of mate rejection r and decreasing the probability of finding any individual f cause the selection gradient to approach 0 (that is, weaker selection; Table 2 and Supplementary Video 1 show the effect of each parameter). If indiscriminate mating is ancestral, these conditions are more conducive to the transient maintenance of indiscriminate sexual behaviour by reducing the efficacy of selection and making the stochastic loss of discriminate mating more likely. Thus, discriminate mating is less likely to evolve in sparse populations (low f) or when the targeted sex is choosy or the searching sex is competitive (high r).
We test the generality of our results by modifying our assumptions to allow same-sex matings to carry an additional cost (Supplementary Appendix 1), to include mortality from different sources acting multiplicatively (Supplementary Appendix 2), to assume the cost to sexual discrimination is due to fecundity as opposed to survival (Supplementary Appendix 3), and to assume a semelparous life history (Supplementary Appendix 4). We formally develop each of these models in the Supplementary Methods and show the conditions for no or complete sexual discrimination to evolve given these assumptions in Table 1. We consider the existence of additional costs to SSB as an extension since while such costs have been found 34 (and are often suggested 3 ), other studies fail to support that such costs exist 35,36 . Our primary results are robust to all of these changes, with each version of the model predicting an appreciable region of parameter space for which indiscriminate mating is the optimal strategy. Of course, assuming that SSB carries Table 1 | conditions for no discrimination or complete discrimination to be the optimal evolutionary strategy given an equal sex ratio for each of the models we consider =2s I δ is an additional survival cost to a same-sex mating (see Supplementary Appendix 1). explicit costs (in addition to the opportunity costs implicit in the above analysis) results in more restrictive conditions for sexual discrimination to evolve, although small costs to SSB have only small impacts on the model outcomes. The only qualitative differences between the model versions occur with discrimination favoured by high death rates d when mortality is multiplicative, low signalling costs p when discrimination cost is to fecundity, or low death rates d when the searching sex is semelparous. Qualitative outcomes of the models are compared in Table 3.

Dynamical model
Although our optimization model is analytically tractable and clarifies costs and benefits, lifetime reproductive success is not necessarily maximized by selection 37 . As such, we also build a single-locus population genetic model with haploid genetics and overlapping generations that makes similar assumptions to the approach above. Importantly, the population genetic model extends the optimization approach by incorporating frequency dependence and allowing the sex ratio to change naturally from feedbacks with mortality due to discrimination costs. Since p, r and f play no role in this framework, they are ignored. We still assume that a background mortality of d afflicts both sexes and a survival cost of attempted discrimination of ac is suffered only by the searching sex. The probability of finding a mate of the opposite sex is still σ + (1 -σ)as, but now the sex ratio σ emerges from the model. We use successive invasions to determine the evolutionarily stable values of attempted sexual discrimination a. Although not analytically tractable, this model makes no assumptions a priori about the quantity that selection maximizes.
The results from this population genetic model align strikingly well with the optimization approach, with the range of conditions under which indiscriminate mating is uninvadible being practically identical between approaches ( Supplementary Fig. 1). A stable polymorphism identified by mutual invasibility occurs only in about 2% of 10,000 randomly generated parameter combinations and is especially common at low or high death rates d and strong sexual signals s. This model shows that not attempting to discern the sex of potential mates can be a convergent stable evolutionary optimum. implications SSB is often considered a result of mistaken identity [38][39][40] , as is suggested to account for about 80% of reported cases in arthropods 3 . Our model provides an evolutionary perspective on this mistaken identity hypothesis, suggesting that poor sex identification could occur as an optimal strategy. This evokes hypotheses that SSB may result from a mating strategy of attempting copulation with any encountered conspecific owing to low probability of encounter 21 or low costs to SSB 22,30 . The costs of missing an opportunity to mate and of attempting SSB have been discussed [41][42][43] in the context of the acceptance threshold hypothesis 44 -a general theory suggesting that erroneous associations (for example, between mates or cooperative partners) become more likely with poor discrimination ability and low costs to mistaken associations. We provide a formal application of this hypothesis to SSB and show which conditions favour indiscriminate mating.
Indiscriminate mating is, of course, only one of many hypotheses for SSB. Some particularly prevalent arguments instead consider when SSB occurs with same-sex sexual attraction, as is seen in many vertebrates. In these cases, SSB may evolve as a means of strengthening social bonds [45][46][47] or due to non-Mendelian inheritance 31 (see Table 2 in Bailey and Zuk 1 ). Such cases of derived SSB are best viewed as fundamentally different from SSB that results from indiscriminate mating and may be ancestral. Overall, which mechanisms are at play depends on specific cases, with indiscriminate mating a likely explanation in a number of taxa (especially invertebrates). It was argued by Parker 48 that six evolutionary transitions (the 'sexual cascade') drove unicellular asexual organisms to become behaviourally complex, sexual organisms. One such transition is the evolution of the movement of males towards females before sperm release during external fertilization (an example of sexual discrimination referred to as 'female targeting' 48 ). To our knowledge, Parker's model 48 is the only study addressing whether sexual discrimination evolves. Direct comparison between Parker's model and our model is difficult, but we seem to find more restrictive conditions for the evolution of sexual discrimination, which can be attributed to imperfect signalling (our s) of the targeted sex (as is likely at the origin of sexual reproduction 4 ) and a search cost 49,50 (our c) for attempting to sexually discriminate (instead of a trade-off with gonad expenditure 48 ). These models are complementary; our model applies to cases not considered by Parker 48 such as SSB in species with internal fertilization (for example, insects 3 ) or species with limits on their ability to find and identify mates (for example, those with search costs, those with poor signals of sexual identity and deep-sea species 21,23,24 ).
It is interesting to consider how the predictions of the model relate to the conditions expected at the origin of sexual behaviour. Echinoderms are probably good proxies for such animals 4,48 , supported by their position as an outgroup to chordates (where most complexity in sexual behaviours arises). Consistent with the model's predictions for species that mate indiscriminately, long-lived adults are common in echinoderms 51,52 . Additionally, it is reasonable to expect that cues to determine sex in echinoderms are relatively limited both because visual cues cannot be relied on and because there exists little evidence in this taxon for chemical cues for sex-specific recognition from a distance 53,54 . Indeed, multiple studies suggest that some echinoderm species form mating pairs without consideration for sex 23,24,55 . This suggests that if indiscriminate sexual behaviour is the ancestral condition 4 , sexual discrimination was unlikely to have evolved readily.
This model relates to previous work on mate choice in which there can be a direct cost of mating with one category of individuals versus another 56 , in finding that costs can prevent mating preferences from evolving. In fact, all cases where there are direct viability or fecundity benefits to choosing one type of mate are also analogous. However, the costs of indiscriminate mating in the current model are much higher than in many other cases with direct benefits, as SSB results in a mating that cannot produce any offspring at all. The mechanisms operating here are most similar to the evolution of preferences for conspecifics, where mating with a heterospecific produces no viable hybrids. In both cases, costs of discrimination will trade off against the peril of producing no offspring. In the current context, the unexpected consequence is that SSB often results.
By showing that there are a broad range of conditions for which indiscriminate mating can be an optimal strategy, we extend recent work 4 suggesting the evolutionary origins of discriminate sexual behaviour as a new and fruitful area of research. Our model provides an important proof-of-concept regarding whether indiscriminate mating can be an optimal evolutionary strategy and what conditions facilitate its evolution. One important result from this modelling exercise is that sexual discrimination can be favoured by either low, intermediate or high mortality rates depending on other features  Increasing r decreases the selection gradient but has little effect on the optimal strategy of the system ( Table 3). As such, mortality rates alone are unlikely to predict whether indiscriminate mating is an optimal strategy. Costs to discrimination c and strengths of sexual signals s are more likely candidates for the drivers of indiscriminate mating, but their values in natural populations are unknown. Attempts to measure these (or related) parameters are important gaps to fill in determining whether SSB results from selection for indiscriminate mating in nature. Specifically, our model leads to the predictions that species that mate indiscriminately have high costs to discrimination, search costs to survival rather than fecundity (since this results in more stringent conditions for sexual discrimination; Supplementary Appendix 3) and subtle differences between the sexes. In this way, our model suggests which features of organisms are likely to predispose them to indiscriminate mating, providing a guide for future work to determine how widespread selection favouring indiscriminate mating is in nature.

Methods
Optimization model. We assume that a population consists of obligate sexually reproducing organisms that belong to either the searching sex or the targeted sex.
As discussed above, our model makes no further assumptions about sexual identity and these terms are meant to be used liberally. We form a simple model for the expected lifetime reproductive success of members of the searching sex (which can sexually discriminate). We do not explicitly consider the lifetime reproductive success of the targeted sex here, as they do not express the ability to sexually discriminate (but they are accounted for in the population genetic model, below). We assume that reproduction occurs in discrete bouts (corresponding to generations) and that individuals have only one opportunity to reproduce per breeding bout. Considering that the cost of failure to sexually discriminate is that some individuals will not get to reproduce as a result of indiscriminate SSB, this assumption biases against SSB, as it maximizes the cost that individuals pay relative to how often they breed. We assume that the probability that a member of the searching sex (the sex with the opportunity to sexually discriminate) finds an individual of either sex with which to attempt to mate during a breeding bout is f. Then, the probability that they find an individual of the opposite sex while randomly searching is the proportion of the population that is of the targeted sex σ. The strength of attempted sexual discrimination a increases the likelihood that the individual found is of the correct sex. Of course, discrimination can occur only if individuals of the targeted sex provide some signal s of their sexual identity. Such a signal could take on many forms, such as a chemical cue or visual dimorphism. Specifically, we assume that a member of the searching sex attempts to discriminate with probability a and a member of the targeted sex signals with probability s. These need not be taken to literally mean that the attempt to search and sexual signal are binary. Rather, a and s are the proportion of time that the attempt to discriminate or sexual signal has an effect. It is worth noting that the parameters a and s can also be interpreted as a strength of attempted discrimination and signal, respectively. With these definitions, given that a member of the searching sex finds a conspecific, the probability that they will be of the opposite (targeted) sex ζ is Here, the first term ((1 -a)(1 -s)σ) represents failures to signal and attempt to discriminate simultaneously, the second term ((1 -a)sσ) represents a sufficient signal but no attempt to discriminate, and the third term (a(1 -s)σ) represents an attempt to discriminate but no signal. In each of these cases, the proportion of opposite-sex matings is given by the sex ratio (hence, each term is multiplied by σ). Finally, the fourth term is when both the signal and attempt to discriminate occur, in which case all matings are between individuals of the opposite sex (so this term can be thought of as being multiplied by unity). Complete sexual discrimination occurs if, and only if, a = s = 1, and no sexual discrimination occurs if a = 0 or s = 0. We further assume that even if a member of the searching sex finds a member of the correct sex they are rejected as a mate with probability r. Again, 'rejection' should be used liberally, as this could not only reflect a conscious choice to reject a mate, but could also correspond to 'rejection' by sperm competition.
We assume that no individual variation in reproductive output from a successful mating exists. Of course, if an individual of the searching sex attempts to mate with a member of their own sex, then that mating will produce no offspring. We allow for the possibility that providing sexual signals comes at a relative reproductive cost p for the targeted sex. This cost is considered to be a result of energy expenditure lost by sexually signalling. As such, each mating produces 1 − sp offspring. Thus, individuals that sexually signal have a fitness of 1 − p relative to those that do not signal. Note that 0 ≤ p < 1.
We assume that individuals of the searching sex have a baseline death probability of d in between each reproductive bout. We further assume that attempting sexual discrimination comes with an additional survival cost c such that individuals that attempt to sexually discriminate suffer an additional probability of death c. This cost could correspond, for example, to increased energy expenditure or conspicuousness to predators in attempting to identify mates of the opposite sex. Then, the probability of surviving to the next breeding bout ρ is where 0 ≤ c < 1 -d to guarantee the cost is valid for any value of a. From here, it is easy to compute the expected lifetime reproductive success R 0 of a member of the searching sex. R 0 is an infinite sum of powers of ρ given by This converges to Substituting back the original parameters, we get which can be thought of as a function of sexual discrimination a. We can use basic calculus tools to find the extrema of R 0 . These are potential evolutionary singular points.
In particular, we can compute the fitness gradient dR 0 /da, which has a sign that gives the direction of evolution at a given value for a. The fitness gradient is Solving for where dR 0 /da = 0 gives potential evolutionary optima. Although tractable, this is not particularly enlightening. Still, equation (7) gives the exact form of the fitness gradient, and analysing it numerically allows for a determination of optimal evolutionary strategies. In particular, the top row of Fig. 1 is made by calculating the values of a for which dR 0 /da = 0 and ensuring that this is a fitness maximum and not a fitness minimum (that is, d 2 R 0 /da 2 < 0).
It is possible to derive conditions from equation (7) for the evolution of sexual discrimination. The sign of the fitness gradient evaluated at a = 0 is of particular interest. Whenever dR0 da a¼0 <0 I , selection acts against attempts to sexually discriminate in the absence of discrimination. In other words, the values for which dR0 da a¼0 <0 I are vital as these are the conditions for completely indiscriminate mating to be selected for. Fortunately, this can easily be derived. First, note that the first three terms in the numerator are always positive. Then, because of the negative sign at the front, the fitness gradient will be negative whenever the last term in the numerator is positive; that is, whenever Evaluating equation (8) at a = 0 and rearranging gives the condition The implications and interpretation of equation (9) are discussed above. Note that, if a = 0, then the searching sex suffers no additional cost, so it could be argued that the sex ratio would be expected to be equal under these conditions. Assuming an equal sex ratio, equation (9) simplifies to Thus, given an equal sex ratio, when equation (10) is satisfied, indiscriminate mating is an evolutionary optimum.
Finally, it is also desirable to know what conditions favour maximal attempts to discriminate. In other words, when is the fitness gradient positive at a = 1? Again assuming an equal sex ratio (for simplicity), reversing the inequality from equation (8) and evaluating at a = 1 gives this condition as Whenever equation (11) is satisfied, sexual discrimination is expected to evolve to completion. Note that our assumption of an equal sex ratio when a = 1 (invoked only to find equation (11)) is not expected to be satisfied owing to search costs of sexual discrimination; however, decreasing the proportion of the population of the targeted sex will only make the conditions for complete discrimination to evolve more restrictive. Of course, if neither equation (9) nor equation (11) is satisfied, then there is an evolutionary optimum for an intermediate value of a (Fig. 1).
Population genetic model. Although the approach described above easily lends itself to analytical techniques, it relies on expected lifetime reproductive success being the target of selection. This is not necessarily true, in general. To get a better sense of the realism of the optimization model, we also developed a population genetic model that makes similar assumptions. Owing to the similarity of these models, we note that the definitions of parameters are the same as given above and avoid redefining them here.
We will consider a scenario where attempted sexual discrimination is controlled by a single locus with two alleles A 1 and A 2 that attempt to sexually discriminate a proportion of the time a 1 and a 2 , respectively. The proportion of the (haploid) population carrying the allele A i is x i , where the census is taken at the beginning of each reproductive bout. We will make the standard assumption that the population size is fixed between time steps so that x 1 + x 2 = 1, although the x i may not sum to 1 at other stages of the life cycle and is thus only a true genotype frequency at the census point. In this scenario, it is important to differentiate between the searching sex and the targeted sex, even though the A allele is expressed only by the searching sex. We denote the targeted sex with the superscript t and the searching sex with the superscript s. As an example, the proportion of the population that consists of the searching sex that carries the A 1 allele is denoted by x s 1 I . The first step in the life cycle is death. A proportion d of members of the targeted sex die before breeding. The searching sex suffers an additional cost due to attempt to discriminate. In particular, a proportion d + a i c of x s i I die prior to breeding. The number of surviving members of each sex will be denoted with a prime symbol.
Following the assumptions made for the optimization model, we next form mating pairs. As the searching sex is limiting, the number of pairs formed cannot exceed the number of individuals left from the searching sex. Once again ζ = σ + (1 -σ)as (derived above) is the probability that a member of the searching sex finds an individual of the opposite sex to mate with. Note that now the sex ratio emerges naturally from our model. With these assumptions in mind, the number of matings between a member of the searching sex with the A i allele with a member of the targeted sex with the A j allele p ij is The number of individuals of the searching sex carrying allele i that will not mate successfully owing to attempting a same-sex mating n ss The n ss i I will not be accounted for further in the current reproductive bout as they cannot reproduce successfully.
We assume that each mating produces equal reproductive output and that there is sufficient reproductive excess to keep the population size fixed. As such, the proportion of A 1 offspring produced in the population is Likewise, the proportion of A 2 offspring is From equations (15) and (16), it can be seen that adding parameters such as f, r and p (described above) will have no effect on the model, as each pair experiences them equally and they will perfectly cancel. They have thus been ignored. New recruits are then added to the population relative to the proportions N 1 and N 2 . Doing so returns the system to the population size of 1, so the x i are again frequencies.
The resulting dynamical equations are too complex for meaningful analytical work; however, they can readily be analysed numerically. In particular, evolutionarily stable strategies (ESSs) can be found. To do so, we use the initial conditions of x = 0.01 and determine whether the rare allele can invade and replace the resident. Starting with steps of 0.1 between a 1 and a 2 and using successively smaller steps, one can determine the ESS with an arbitrary degree of accuracy. We use 10 −4 in the analysis here. We also test for the possibility of a stable polymorphism by checking for mutual invasibility with starting frequencies of 0.99 and 0.01 for the common and rare allele, respectively.
Reporting Summary. Further information on research design is available in the Nature Research Reporting Summary linked to this article.

Data availability
This manuscript does not use data.

code availability
Code to replicate results can be found on Dryad at https://doi.org/10.5061/dryad. gxd2547jg.