The model is written in TrueBasic®, with code provided in Additional File 1 for the main model. Populations were initially modeled as haplodiploid with a wasp-like life history. In the first generation 200 solitarily-nesting females, all homozygous for non-helping (genotype aa), mated to either 1, 2, or 5 males. To be consistent with terminology used elsewhere, departures from monogamy are equated only with mating status (monoandry versus polyandry). I do not consider the case of multiple females breeding simultaneously (i.e., polygyny in social insects). Each mother could produce a maximum of 50 offspring. Offspring were produced sequentially either one at a time or in groups of five. Sex of each offspring was randomly chosen and equally likely to be female or male. Between each successive reproductive event, mothers had an expected survival rate of s (varied between 0.3 to 1.0, depending on the simulation). Offspring survival required at least one adult on the nest until their cohort matured. Without an adult, any remaining offspring died. Mature offspring either became helpers or were seeded into a common reproductive pool for the next generation.
For each offspring, the maternal allele contribution was randomly chosen with equal probability. If the offspring was female, the father was randomly chosen from the mother's mates. All sons, irrespective of genotype, became reproductives. All aa daughters (and aA daughters if A was recessive) became reproductives. The first aA daughter produced (AA if recessive) became a helper on the nest. The only exception was for the last possible cohort (i.e., where the nest reaches the maximum of 50 offspring). At this point, there is no possibility to provide help and all daughters were added to the common reproductive pool. Although this behavior is framed as beneficial 'helping' from a daughter, the model is the same if A is defined as a susceptibility to being manipulated into remaining by the mother. Neither mothers, fathers nor helpers were added to the common reproductive pool. Each generation was a new sample of potential parents and helpers.
Helping arose in the form of mutation from allele a to A. The mutation rate was 0.001 per generation for every allele in sons and non-helper daughters. Because the main variable of interest was the rate at which helping spread due to mating strategy, back mutations were not relevant and, therefore, were not considered in the simulations.
Only one helper could be present on a given nest at a time in most simulations because survival benefits tend to rapidly decline with helper number . The helper's inter-cohort survival rate was the same as her mother's. This assumes there are no 'queen-like' preadaptations in mothers to reduce foraging or otherwise increase their own survival rates. Helpers did not reproduce in the presence of their mother, and mothers did not increase cohort size or maximum cohort numbers with helpers. These assumptions follow the headstart or assured fitness return models of cooperation where the helper's benefit for the mother and her siblings is for potential nest survival if the mother should die [21, 22]. If both mother and helper were present, all other daughters entered the common reproductive pool. If the mother survived and the helper died during some interval, a new helper could be recruited. If the mother died and the helper survived, the helper became the new mother on the nest and mated with the same number of males as her mother. The following cohort of offspring was still the previous mother's, but the subsequent cohort was the offspring of the promoted helper. Again, a new helper could be potentially recruited. Sequential monogyny with the death and replacement of a single dominant egg-layer are common life histories in primitively eusocial species . Nest inheritance and mating by helpers created totipotence for all individuals in the model. There was no permanently sterile caste, and as such this appears to violate the initial premise of the monogamy hypothesis. Boomsma [5, 6] proposes that a 'monogamy window' is evolutionarily needed for transition from cooperative breeding to full eusociality with division of labor across castes in social insects. However, even in highly eusocial species, workers will often reproduce after the death of the queen [24, 25], which was what happened in this model. Thus the reproductive life history modeled here would apply to both cooperatively-breeding and eusocial species.
The next generation was initiated after reproduction was tallied across all nests. Two hundred new females and the appropriate number of mates were randomly chosen from the common reproductive pool. This pool was then discarded, to be filled again from the new generation of nests. Each simulation ran until either a predetermined frequency of helping was reached (e.g., A composes 50% of the population). If the target frequency level was not reached in 500 generations, the simulation was terminated with the conclusion that helping was selectively disadvantaged. Each set of conditions was simulated 100 times. One complication was that as A reaches higher frequencies, drawing out females to be daughter helpers biases the reproductive pool towards males. To counter this, I included an increasing initial sex biasing factor such that each offspring produced had a slightly increased probability of being female (e.g., 52-54% female). Because most of the analyzed results examine the initial change in the frequency of A, the biasing correction factor has a trivial effect. The simulations were repeated as described under cases where A is recessive or males are diploid. In the latter case, each offspring had a randomly chosen father (if mothers were polygamous), and its contributed allele to the offspring was randomly chosen.
The above simulations compared the rate of increase of helping in populations that differed in the number of matings per female. Within populations, all females mated the same number of times. To examine within-population advantages for mating number, I used two methods to compare the fitness. In both maternal mating strategy was randomly assigned as having 1 or 5 mates. Daughters that inherited nests mated with the same number of males as their mother. In the first method, fitness was calculated as the total number of offspring produced on a nest where females mated either once or five times. This method determined whether monogamous or polygamous nests were intrinsically more productive as helping spread through the population. However, differences in reproductive output may not necessarily translate to differential selection on mating number itself because mating preference was not heritable. Therefore in a second method, I started with populations having fixed frequencies of a dominant A allele ranging between 0.05 and 0.95, randomly distributed across individuals. In this case mothers also varied genotypically for mating strategy with alleles specified for mating with 1 or 5 males. At the beginning of each simulation, each allele was set at 50% of the initial population. A mother's expressed mating strategy was the rounded average of her two alleles (e.g., a mother with alleles for mating once or five times, mated with three males). Nests reproduced as described above for one generation and alleles contributed to the next generation's reproductive pool were tallied for each mating strategy.
Another model variation eliminated the possibility of helpers gaining indirect fitness by helping kin. In these simulations, all individuals that became helpers were randomly distributed across surviving nests for every cohort of offspring produced across all mothers. Biologically, this is as if helpers drift within the population and randomly associate with any other nest. In this situation the average helper is unrelated to the individuals on the nest she joins. Although such a system of completely random, drifting helpers has never been observed, this variation serves an important function for understanding the model results. In the above scenarios, helping has both indirect fitness returns (i.e., assuring survival of non-descendant kin) and direct fitness (i.e., the possibility of inheriting a nest and rearing own offspring). With drifting helpers, only direct fitness returns to the potential helper can select for helping behavior.
A final variation of the model allowed up to four helpers to be simultaneously present on a nest. To make the benefit of helping equal from the first to the fourth helper, nest survival was increased by a constant 5% for every helper present. Therefore, if a nest with only the mother present had a 70% intercohort survival probability (s), the same nest with four helpers would have a 90% survival probability. The design is such that fitness benefits of multiple helpers accrues linearly. The mother's intercohort survival rate was equal to her survival rate by herself. Thus, daughters inherited the nest with the same probability as in the previous simulations. Nest inheritance was always by the oldest helper present. In this variation, A was only considered as a dominant allele, offspring came in cohorts of five, and s ranged from 0.7-0.8.