Shorter life and reduced fecundity can increase colony fitness in virtual Caenorhabditis elegans.

In the nematode Caenorhabditis elegans, loss of function of many genes leads to increases in lifespan, sometimes of a very large magnitude. Could this reflect the occurrence of programmed death that, like apoptosis of cells, promotes fitness? The notion that programmed death evolves as a mechanism to remove worn out, old individuals in order to increase food availability for kin is not supported by classic evolutionary theory for most species. However, it may apply in organisms with colonies of closely related individuals such as C. elegans in which largely clonal populations subsist on spatially limited food patches. Here, we ask whether food competition between nonreproductive adults and their clonal progeny could favor programmed death by using an in silico model of C. elegans. Colony fitness was estimated as yield of dauer larva propagules from a limited food patch. Simulations showed that not only shorter lifespan but also shorter reproductive span and reduced adult feeding rate can increase colony fitness, potentially by reducing futile food consumption. Early adult death was particularly beneficial when adult food consumption rate was high. These results imply that programmed, adaptive death could promote colony fitness in C. elegans through a consumer sacrifice mechanism. Thus, C. elegans lifespan may be limited not by aging in the usual sense but rather by apoptosis-like programmed death.

that greatly increase late-life mortality. We recently argued that in C. elegans, in contrast to most metazoans (including humans), natural selection could have favored mechanisms that cause senescence because they shorten life. Specifically, death of postreproductive adults in viscous populations could benefit isogenic larvae and reproductive adults by increasing food availability, an example of consumer sacrifice adaptive death .
Recent advances in C. elegans ecology suggest that its life cycle occurs at two distinct levels of organization. The lower level involves the life cycle of the individual nematode, in which fitness is measurable as the number of offspring per worm (Figure 1b). However, in the wild, C. elegans are found as colony-like, clonal populations existing upon spatially restricted food patches (e.g., rotting plant stems or fruit; Schulenburg & Félix, 2017). In their natural setting, C. elegans exhibit a boom-and-bust type life cycle (Frezal & Felix, 2015). They encounter and colonize a food patch, which then leads to rapid population growth and depletion of food. Dwindling food and high population density triggers larval entry into a diapausal dispersal stage: the dauer larva (Cassada & Russell, 1975). Dauers are resistant to environmental stress and can survive without food for up to 75-80 days (Banfield, Gomez, Lee, Clarke, & Larsen, 2008;Hu, 2007;Klass & Hirsh, 1976). Dauer dispersal is aided by various animal vectors, including isopods (e.g., woodlice), snails and slugs (Schulenburg & Félix, 2017). When a dauer encounters a new food patch, it resumes development and the boom-and-bust cycle rolls on. At this upper level, the life cycle can be considered as that of the colony (Cutter, 2015;Lohr et al., 2019;Yin & Haag, 2019;Figure 1b). Our working hypothesis is that adaptive death promotes colony level fitness (or, from another perspective, inclusive fitness; Kramer & Meunier, 2016;Wilson & Wilson, 2008) but not individual fitness ( Figure 1b); similarly, programmed death of individual cells in metazoans reduces fitness at the cell level but may increase fitness at the organismal level.
An additional feature of C. elegans life history that is predicted to facilitate the evolution of altruistic, adaptive death is protandrous hermaphroditism. The germline of the C. elegans hermaphrodite exhibits protandry, generating first sperm and then oocytes. Sperm are stored in spermathecae and used to fertilize oocytes. When sperm are depleted, reproduction ceases. Reproduction can continue for a longer period if hermaphrodites mate with males (Hodgkin & Doniach, 1997;Hughes, Evason, Xiong, & Kornfeld, 2007); however, males are extremely rare in the wild (Schulenburg & Félix, 2017).
The timing of the switch from sperm to oocyte production appears to be optimized to maximize population growth rate, balancing earlier onset of fertilization against greater sperm/progeny number (Hodgkin & Barnes, 1991). Consequently, in selfing populations C. elegans reproductive span is a mere 2-3 days. Importantly, the short reproductive span resulting from protandry is predicted to facilitate selection for altruistic death by precluding invasion of populations by nonaltruistic egoists, since they would possess no reproductive benefit Figure 1c). Androdioecy (having hermaphrodites and males) in C. elegans arose by evolution from an ancestor that was gonochoristic (having females and males; Ellis & Lin, 2014;Kiontke et al., 2011;Stewart & Phillips, 2002). This led us previously to suggest that adaptive death in Caenorhabditis species might evolve only after the appearance of hermaphroditism .
But is adaptive death in C. elegans a reality? Hypotheses about how particular traits might promote fitness are easy to formulate but can be difficult to prove or disprove (Williams, 1966). One way to test further for the plausibility of adaptive death is computer modelling. Previous patch occupancy model studies, including the ground-breaking work by J. M. J. Travis, have shown that in viscous populations, shorter lifespan can increase fitness (Dytham & Travis, 2006;Markov, 2012;Travis, 2004). In one such model that included resource consumption by adults, lifespan was found to be inversely correlated with food consumption rate (Werfel, Ingber, & Bar-Yam, 2015, consistent with consumer sacrifice. Here, we describe a new computer model recapitulating key features of C. elegans life history; this contrasts with previous models where simulations used relatively abstract organism representations. We describe how the behavior of the model supports the view that programmed death in C. elegans could increase colony level fitness through a consumer sacrifice mechanism and that protandrous hermaphroditism could facilitate selection for adaptive death. Behavior of the model also revealed other, unexpected mechanisms by which reduction of individual fitness could enhance colony fitness by minimizing food consumption that is futile (i.e., does not lead to increased dauer production).

| Design of the in silico C. elegans colony life cycle model
An in silico model organism was designed that resembles C. elegans. In the C. elegans life cycle adulthood is preceded by four larval stages, L1-L4 (Wood, 1988;Figure 1b). If eggs hatch in the absence of food, L1s can form a limited dispersal stage, which can survive for several weeks (Baugh, 2013;Johnson, Mitchell, Kline, Kemal, & Foy, 1984). With low food and high population density, as populations transition from boom to bust, L1 larvae can also develop via the L2d stage to the long-lived dauer dispersal stage (Hu, 2007;Klass & Hirsh, 1976). In our simplified C. elegans model, we included only L1, L1 arrested (in the absence of food), L2, dauer and adult (Figure 2a).
To model a single boom-and-bust cycle, we created a dwelling space with a grid of 300 × 300 cells. In the centre of the grid, a food patch was placed which can be represented as a 2D Gaussian such that the food level maximum was at the centre of the grid (Figure 2b). The starting amount of food (in most cases) was ~10 6 food units. The simulations were started by placing (in most cases) a single larva in the food patch and then running the model to observe population growth (Figure 2c) and dauer production under different sets of life history parameters. In the absence of food, due to either food depletion or worm exit from the food patch, L1s became L1 arrested and L2s became dauers.
Variables specifying five life history traits were defined in each version of virtual worm to assess effects on fitness: adult reproductive schedule, mortality rate, migration speed, survival without food (in days) and food consumption rate. Fecundity and mortality rate were set as a function of increasing age (Figure 2d). The fecundity of larvae was 0, and for adults, age-specific progeny production was determined by the formula Number of progeny (age) = F1 − F2*age 2.5 , where F1 is the number of progeny produced on day 1, and F2 is the parameter determining the rate at which fertility declines with age ( Figure 2e). Where F2 = 0, there is no reproductive decline with age.
Mortality was set as a probability of death, that is at each timepoint (day) for each individual the coin is tossed with a set probability of dying. Larval mortality was set at 0.05 per day for all larval stages, except dauers for which it was 0.005 per day. For adults the probability of death was determined by the formula p death (age) = 1 − M2 (M1 + age) .
Here, M2 determines the speed at which p death (probability of dying) approaches 1. Where M2 = 1, aging does not occur. In our model, we varied M2 from 0.99 (mean lifespan 12 days) to 0.8 (mean lifespan 2.4 days), see Figure 2f,g. Although under standard laboratory conditions lifespan is 2-3 weeks (Klass, 1977), C. elegans in the wild certainly experience much shorter lifespans to which genetic determinants are likely to contribute ; thus, though our model tests benefits of programmed aging, we assume that extrinsic factors (especially infection and starvation) will amplify its effects.
Available evidence suggests that wild C. elegans colonies typically exist as clonal populations of selfing hermaphrodites with barely any F I G U R E 2 Design of the in silico Caenorhabditis elegans model. (a) C. elegans stages included in the model: early stages are reduced to L0 (egg), L1 and L2. In the absence of food, L1 and L2 stages can undergo developmental arrest (L2s becoming dauers) and survive a set number of days; see (d). Where arrested individuals encounter food, they resume development into L2s or adults, respectively. (b) For modelling, we use a 300 × 300 grid where food is distributed as a 2D Gaussian in the centre of the grid. (c) Snapshot of a growing virtual worm population on a virtual food patch. Only dauers are shown here for timepoint 15. The parameters are: no reproductive decline, adult food consumption-1,000, M2 = 0.99, dispersal speed-9, progeny production rate-50 progeny per timepoint. (d) Eleven parameters that determine the model. F1 and F2 define reproductive schedule and reproductive rate. M_larva, M1 and M2 set larval mortality and adult mortality as a function of age. Other parameters control dispersal speed, food consumption rate and survival without food for arrested larvae. (e) Illustration of how parameters F1 and F2 determine selected reproductive schedules used in simulations. (f) Estimated mean lifespans for M1 = 0.5 and different M2 values (means of 5,000 trials). (g) Cumulative probability of death is where M1 = 0.5 and with different values of M2 males (Barriere & Felix, 2007;Frezal & Felix, 2015;Petersen et al., 2015;Richaud, Zhang, Lee, Lee, & Félix, 2018). Therefore, our in silico C. elegans correspond to hermaphrodite-only populations, where all progeny contain the same genes as their parent.
Because we were interested in inclusive fitness (rather than individual fitness), we measured dauer yield per colony rather than number of progeny per worm (Figure 1b). Colony dauer yield is a metric of the capacity to disperse and found new colonies, that is of colonies to replicate. This involves an implicit assumption that colony dauer yield is directly proportional (1:1) with the capacity to found new colonies, but in the real world more complex relationships may exist.
Animals were assigned two locomotory modes: that when hungry and that when fed. The speed for hungry worms was set at maximal (9 cells/day). This mimicked the behavior of C. elegans, which congregate and show reduced motility within food patches (Gray et al., 2004;Sawin, Ranganathan, & Horvitz, 2000). For fed worms, speed was varied from 1 to 9 cells/day. We also defined survival times for larvae in the absence of food: 6 days for L1s and 30 days for dauers, consistent with the longer dauer survival time (Johnson et al., 1984;Klass & Hirsh, 1976). For simplicity's sake, our model did not include an effect of food deprivation on adult survival. Finally, we defined two food consumption parameters; for most conditions they were for adults 1,000 units per cycle (or 50-1,000, when varied) and for larvae 50 units per cycle (or 25-500 when varied; Figure 2d). Figure S1 shows how the model parameters determine the relationships be- We first asked whether shorter lifespan could increase fitness in our C. elegans-like in silico model. In previous patch occupancy-based models, shorter lifespan could sometimes evolve when fertility declined with age, and progeny dispersal was limited (Markov, 2012;Travis, 2004). We tested five aging rates that gave mean lifespans ranging from 2.4 to 12 days and nine dispersal speeds, ranging from 1 to 9 cells/day. Simulations were run to estimate fitness for all 45 aging rate × dispersal speed combinations. Dauers were set to survive without food for 30 days, and larval food consumption was 50 food units/day (i.e., 20 times lower than adults).

| The effect of lifespan on fitness depends on the progeny production rate when there is no agerelated reproductive decline
As an initial negative control, we measured the relative fitness of the 45 genotypes in the absence of any decline in reproduction with age, expecting to see no adaptive death. The number of progeny produced per day was varied from two up to 50; C. elegans fecundity in the wild is unknown, but is likely to be lower on average than that measured under nutritionally replete conditions in the laboratory (~300 progeny per worm). Given two progeny/day, the share of the available food consumed by adults was higher in longer-lived genotypes ( Figure 3a), and dauer number peaked shortly after that of adults (Figure 3b,c; Videos S1 and S2). Increasing progeny production rate led to increased colony fitness ( Figure S2a), which could be at least partly attributable to an increase in the proportion of food consumed by larvae ( Figure S2b). The reduction in relative food consumption by fecund adults is expected given the higher ratio of larvae to adults.
Consistent with the Travis and Markov models, in the absence of reproductive decline, but at low progeny production rates, the genotype with the slowest aging rate was the fittest, leading to the largest yield of both adults and dauers (Figure 3b,c). However, against expectation, from eight progeny/day upwards, shorter life increasingly enhanced inclusive fitness ( Figure 3e). One possibility is that this reflects reduction in food consumption by older adults which would otherwise lead to larval food deprivation. Consistent with this, reduction of adult lifespan reduces the proportion of food consumed by adults ( Figure S3) and increases the proportion of food that is consumed by larvae, for example from 36% to 48% at two progeny/day and from 63% to 73% at 50 progeny/day. This suggests that earlier adult death increases the proportion of food that is converted into dauer biomass.
Why might shorter life promote fitness in the absence of programmed reproductive decline? Perhaps because of the reproductive decline that will occur anyway in a high proportion of adults due to food depletion, which will cause starvation of newly produced L1s. We postulate that progeny production rates of >8 lead to an increasing proportion of adults where food consumption is futile, that is unproductive in terms of dauer yield. Programmed death in this group could promote fitness through consumer sacrifice, by increasing food availability for animals where food consumption is productive (e.g., existing L1s).
As fecundity increased above 8 and earlier death began to increase fitness, the effect of population viscosity on colony fitness (dauer yield) also changed, from reducing fitness to increasing it (Figure 3e; see shift of red from right to left when progeny increases from 8 to 20).
This could reflect increased adult food consumption at high population viscosity due to fewer adults leaving the food patch, which deprives larvae of food and creates a fitness benefit to earlier adult death.
Consistent with this interpretation, high population viscosity slightly increases relative adult food consumption at low reproductive rates (2-5; Figure S3a,b). At reproductive rates of 30-50 progeny/day, the optimal dispersal speed was 1, and higher viscosity led to reduced relative adult food consumption ( Figure S3c,d). This could reflect adults competing for food with large numbers of larvae at the same location.

| Early death increases fitness when reproduction is curtailed
The condition of protandrous hermaphroditism in C. elegans leads to early cessation of reproduction, which could facilitate the evolution (e) Heat maps representing the sums of dauers produced by the end of the simulations for 45 lifespan × dispersal speed combinations for different progeny production rates. The initial scheme (top; right) illustrates reproductive schedules for different progeny production rates when there is no reproductive decline of adaptive death . To model the effects of the evolution of protandry from a gonochoristic ancestor, we tuned down the reproductive schedule from 30 progeny per adult over 10 days, down to 4 progeny on day 1 only (Figure 4a). Results showed that at the longest reproductive span, the fittest genotypes are the longest lived and least viscous ( Figure 4b). However, as reproductive span falls, a shorter lifespan (3-4 days) becomes optimal for fitness. The same set of 100 simulations were performed for the shortest reproductive span (4 progeny on day 1 only) as part of a later test and gave very similar results (Figure 6b, magenta), verifying this finding. Thus, shorter lifespan can increase colony fitness more where reproductive span is shorter (given moderate levels of fecundity).
Notably, where reproduction declined with age, adaptive death was favored by lower viscosity at all reproductive spans (Figure 4b).
Comparing results in Figures 3e and 4b could imply that when reproductive rate is low, it is always beneficial to reduce food consumption by postreproductive adults, either by their departure from the food patch or by their death. Consistent with this interpretation, for all reproductive spans the proportion of the food consumed by adults drops, though only slightly (typically 0.5%-1.5%), as dispersal rate increases ( Figure S4a-g).
One possibility is that the observed colony fitness benefits of shorter life are peculiar to the particular conditions of the model.
To probe this, four of the normally invariant model parameters were varied: the number of founder worms, the size of the grid, amount of food in the food patch and the morphology of the food patch. To detect both increases and decreases in optimal lifespan, a control parameter set was selected in which an intermediate lifespan was optimal (including 4 progeny on day 1 only). Optimal lifespan was not altered by increasing the number of founders from 1 to 3, 5 or 7 ( Figure S7), or changing of the grid size from 300 × 300 to 200 × 200 or 500 × 500 cells ( Figure S8), and was only slightly altered by a flatter or steeper food patch morphology ( Figure S9). By contrast, optimal lifespan was markedly reduced by a fivefold increase in food patch size and modestly increased by halving the food patch size ( Figure S10), suggesting that C. elegans lifespan is optimized to a particular food patch size. These tests suggest that the adaptive value of death is not particularly sensitive to parameters that are constant in the other simulations.

| Increasing early reproduction favors adaptive death
That early death increases fitness when reproductive span is short is consistent with the occurrence of consumer sacrifice. According to this interpretation, postreproductive parents compete with their progeny for a limited food supply, such that programmed death in older adults increases food availability for progeny, thereby increasing dauer yield . To test this further, we limited reproduction to day 1 of adulthood and increased competition between parents and larvae by increasing reproductive output from 2 to up to 50 progeny per worm. Results of simulations showed that increasing larva to adult ratio does indeed cause shorter adult lifespans to be optimal for fitness ( Figure 5).
Optimal mortality rate increases from M2 = 0.9-0.95 given 2 larvae to 0.85-0.8 at 5 progeny and above. This is consistent with action of consumer sacrifice.
Interestingly and unexpectedly, an output of 50 progeny only on day 1 gave a greater colony yield (6,400 dauers) than 50 progeny per day with no age decline in reproduction (5,800 dauers; compare Figures 3e, and 5b, bottom right panel). To verify this surprising finding, a second set of simulations were carried out, with similar results (day 1 reproduction only: 6,300 dauers; no reproductive decline: 5,900 dauers). This suggests that an early burst of progeny production is optimal for colony fitness. A possible reason for this is that sustained fecundity leads to too much food competition. Such competition could be between larvae or between adults and larvae, but the former is more likely, since sustained reproduction only slightly reduced the proportion of food consumed by adults (27% compared to 30% with reproduction on day 1 only; Figure S5a; highest viscosity in each case). Notably, the proportion of animals reaching the dauer stage was 8.5% given reproduction on day 1 only, but only ~3% in the absence of reproductive decline ( Figure S5b). This implies that sustained reproduction increases the proportion of larvae that starve before reaching the dauer stage. Thus, the behavior of our in silico worm supports a new view of how C. elegans life history combines a brief burst of reproduction with short lifespan to optimize fitness in the context of existence as clonal colonies on small food patches.

| Where adults are greedier, it is better for them to die sooner
As a further test of the possible action of a consumer sacrifice mechanism, we varied relative adult and larval food consumption rates. Our expectation was that the more food (relatively) that adults consumed, the greater would be the fitness benefits of their early death. In these simulations, we specified a short reproductive span (4 progeny on day 1 only) and a dauer lifespan of 30 days. As in all previous simulations, larval food consumption (food units/day) was 50, but adult food consumption was varied from 50 up to 1,000. As predicted, increasing food consumption increased fitness at shorter lifespans and reduced optimal lifespan (Figure 6a,b). Moreover (and as expected), the share of the food consumed by adults increased when adult food consumption rate was higher, rising from 0.15-0.3 to 0.5-0.7 (Figure 6b,c). Thus, in our virtual worm, adult greed favors the evolution of shorter lifespan.
To confirm this, we varied adult to larval food consumption ratio in a different way: by tuning larval food consumption rate from 25 up to 500 while keeping adult food consumption constant at 1,000 ( Figure S6a,b). As predicted, the adaptive value of short life declined with increasing larval food consumption (i.e., with reduced relative adult food consumption; Figure S6b). The share of adult food consumption decreased from 0.8 to 0.2 (blue lines) for the longest lifespan and from 0.6 to 0.05 (red lines) for the shortest lifespan as relative larval food consumption is increased from 1/40 (25 food units) to ½ (500 food units; Figure S6c,d).

| Age-related decline in adult food consumption can promote colony fitness
In aging C. elegans, the rate of feeding (pharyngeal pumping) declines rapidly from day 4 of adulthood onwards (Huang, Xiong, & Kornfeld, 2004). Our findings raise the possibility that natural selection has favored an age decline in food consumption in C. elegans because it reduces futile food consumption, thereby increasing colony fitness. To test this possibility, we incorporated into our model an age decline in food consumption approximating that described by Huang et al., but this did not increase dauer yield ( Figure S11). However, under wild conditions pumping rate, like mortality rate, may change more rapidly with age. To probe this, we introduced an earlier, precipitous decline in feeding rate, from 100% on day 2 to 0 on day 3. This increased dauer yield, consistent with adaptive aphagy, and also suppressed the benefit of early F I G U R E 4 Programmed death can increase fitness given short reproductive span. (a) The scheme shows how F1 and F2 parameters model different curtailed reproductive schedules. The table represents all the parameters for the simulations. (b) Heat maps representing the sums of dauers produced by the end of the simulations for 45 lifespan × dispersal speed combinations for the different progeny production schedules shown in (a) death, consistent with consumer sacrifice ( Figure S11). Thus, it is possible that the age decline in feeding rate in C. elegans is to some extent a maturational rather than a senescent change. For a summary figure comparing relative colony fitness (dauer yield) across multiple conditions, see Figure S12.

| D ISCUSS I ON
A full understanding of C. elegans biology should include an account of how it optimizes fitness, but how should fitness be understood? We have proposed that C. elegans life history has evolved to maximize colony fitness, measurable in terms of number of dauer colony propagules. But what is the best way for the individual C. elegans life history to maximize dauer yield? One strategy would be to live as long as possible in order to lay as many eggs as possible. However, the behavior of our virtual worm presents a different picture, in which key to maximizing fitness is minimizing food consumption that does not promote dauer production.
Our findings suggest the importance of three types of futile food consumption: first, as initially proposed, food consumption and S3) since on a dwindling food patch they become postreproductive as far as dauer yield is concerned (Figure 6d). Futile food consumption in postreproductive adults can also be reduced by a programmed age decline in food consumption rate (Huang et al., 2004), which our findings suggest could have evolved to promote colony fitness ( Figure S11).
Futile larval food consumption can also be reduced by other means. It was previously suggested that C. elegans actively limit their brood size in order to limit population growth and conserve resources (Hughes et al., 2007;Kocsisova, Kornfeld, & Schedl, 2019). Our findings suggest instead that curtailing individual reproduction could paradoxically increase dauer yield. Avoiding futile food consumption in early larvae involves a complex challenge for the lucky dauer larva that encounters a food patch and initiates a clonal population, as follows. It needs to generate a population of adults just large enough that there is sufficient food for as many of their progeny as possible to reach the dauer stage (Figure 6d).
Too high fecundity leads to increased futile early larval food consumption; consistent with this, in the virtual worm dauer yield was greater in a genotype with a burst of early reproduction than in one where reproduction was sustained (Figures 3e and 5b). This conclusion will chime well with anyone who has worked with C. elegans, where establishing a stock plate on an Escherichia coli lawn with three worms leads within a few days to a mixed stage population including second-generation adults, whereas starting with, say, 10 worms yields a population of mainly starved, early stage larvae. That C. elegans might limit its brood size to reduce competition for resources among progeny was suggested previously by Hughes et al. (2007).
That increasing adult food consumption increased the fitness benefits from early death (Figure 6b) provides a good illustration of the action of consumer sacrifice. A negative correlation between optimal lifespan and probability of exhausting resources by adults was also observed in a previous modelling study (Werfel, Ingber, & Bar-Yam, 2015). Notably, Werfel et al. also found that age-related reproductive decline is not required for shorter life to be adaptive, as observed here (Figure 3e).
The behavior of the model shows how continued adult survival could have antagonistic effects on C. elegans colony fitness: promoting it by allowing production of more eggs and reducing it by increasing futile food consumption. When progeny production rate is low (<8), longer lifespan is better because the fitness benefits of laying more eggs outweigh the costs in terms of futile food consumption. By contrast, when progeny production rate is high (>8), long life can increase the proportion of futile food consumption, particularly by early larvae doomed to starve before reaching the dauer stage, such that overall fitness is reduced.
Thus, shorter life can increase fitness even in genotypes without a set age decline in reproduction, probably by reducing progeny production (Figures 3e and 6d). This suggests that consumer sacrifice adaptive death could also have evolved in gonochoristic species of Caenorhabditis where reproductive span is not limited by protandry.
Our finding that increased fitness from early death can occur when population viscosity is low does not conflict with evolutionary theory. The prediction that adaptive death is beneficial where populations are viscous is based on population genetic reasoning (avoidance of exploitation of altruists by parasitic egoists; Hamilton, 1964;Lohr et al., 2019;Figure 1a). But this aspect of life history evolution is not included in our model. In contrast to earlier studies (Markov, 2012;Travis, 2004;Werfel et al., 2015), viscosity in our model affects efficiency of resource conversion into dauers rather than resource inheritance as defined in those studies (as we have only one genotype in each simulation).
How life-like is the model described here with respect to C. elegans? Clearly, a concern is that properties of the model and of C. elegans will differ such that any conclusions drawn here could be inapplicable to real C. elegans. Here, a problem is that for key parameters of the model, authentic values for wild C. elegans are lacking, including reproductive schedule, fecundity, larval mortality and lifespan. These values are likely to change as colony life history unfolds. One may deduce that in a boom-and-bust setting, the largest number of adults will exist at the point of maximum colony size, shortly prior to food depletion. From this and the presence of pathogenic microbes (Schulenburg & Félix, 2017), it may be safely assumed that mean lifespan of adult C. elegans in the wild is far shorter than that measured under optimal culture conditions, perhaps only 1-3 days rather than 2-3 weeks (Klass, F I G U R E 6 Shorter life promotes fitness more when adults are greedier. Increasing food consumption by adults favors adaptive death. (a) Scheme showing food consumption rate combinations for adults and larvae. In these simulations, adults produced 4 progeny only on day 1. (b) Heat maps depicting final dauer yield for the 3 levels of adult food consumption shown in (a). (c) Share of food consumed by adults at different food consumption rates. Color code for 3 adult food consumption rates (surrounding box) as in (a). Color code for 5 lifespans shown in (c). (d) Summary of conclusions based on behavior of virtual Caenorhabditis elegans. Colony fitness is optimized by maximizing efficiency of production of dauers from available food. Futile food consumption, that is that not leading to dauer production, is minimized by reducing individual fitness in order to increase colony fitness. This involves programmed death of adults (consumer sacrifice-type adaptive death) and optimization of population structure to avoid an excess of early larvae that are doomed to starve by means of a brief, early burst of reproduction 1977). This predicts that programmed, adaptive death mechanisms would need to be activated within days of reproductive maturity to produce any fitness benefits. Consistent with this, a number of degenerative changes have been observed in C. elegans during the first week of adulthood; reviewed by Lohr et al. (2019). This includes a collapse in protein folding homeostasis starting at the onset of reproduction, only 6 hr after the L4 to adult molt (Labbadia & Morimoto, 2015). Thus, arguably, inclusion in our model of lifespans as low as 2 days and brood sizes as low as 2 is not far-fetched.
In our simulations, increased reproduction increased the adaptive value of shorter lifespan (Figures 3e and 5b). Negative correlations between reproduction and lifespan are widespread in nature (Partridge, Gems, & Withers, 2005;Stearns, 1992). Such correlations can result from various forms of trade-off involving ecological and physiological costs (Speakman, 2008). The behavior of virtual C. elegans describes a reproduction-lifespan tradeoff where increased reproduction increases food competition between parents and offspring, thereby increasing the fitness benefits of consumer sacrifice-type adaptive death. Whether consumer sacrifice-type reproduction-lifespan trade-offs actually occur in the natural world is a question for future investigation.
In conclusion, the behavior of our computer model suggests that individual C. elegans life history can evolve to maximize colony fitness by minimizing futile food consumption. It does this not only by consumer sacrifice-type adaptive death, as we initially proposed, but also through a reproductive schedule that generates an optimal population structure ( Figure 6d). This joins a growing list of strategies by which androdioecious Caenorhabditis maximize early reproduction and population growth, including an early switch from sperm to egg production (Hodgkin & Barnes, 1991;Poullet et al., 2016), reduction of male frequency by various mechanisms (Garcia, LeBoeuf, & Koo, 2007;LaMunyon & Ward, 1997;Stewart & Phillips, 2002;Yin & Haag, 2019) and even earlier onset of reproduction in adults born from the first eggs (Perez, Francesconi, Hidalgo-Carcedo, & Lehner, 2017). Plausibly, reduction of individual fitness to minimize futile food consumption can only increase fitness in organisms such as C. elegans (colonial and with a dispersal form). However, it is interesting to consider whether food use efficiency might influence life history evolution in other types of organism, for example nonclonal, lacking a dispersal form or on extended food sources.
We have suggested that adaptive death is a peculiarity of organisms existing as viscous, clonal populations and that mutations extending C. elegans lifespan may act by suppressing adaptive death. But mutations in the insulin/IGF-1 signalling (IIS) pathway, for example, increase lifespan not only in C. elegans, but also in higher taxa (e.g., in Drosophila, mouse). To explain this, we previously suggested that genes with smaller effects on senescent pathology in other taxa were co-opted to promote adaptive death in C. elegans . Consistent with this, the magnitude of effects of IIS on lifespan in other animal groups is far less than in C. elegans. For example, mutation of the phosphatidylinositol 3-kinase catalytic subunit gene increases median lifespan by up to ~10-fold in C. elegans but only ~1.07-fold and ~1.02-fold in Drosophila and mice, respectively (Ayyadevara et al., 2008;Foukas et al., 2013;Slack, Giannakou, Foley, Goss, & Partridge, 2011).

| Further details of the model
When designing the model, in order to reduce computer processing time, C. elegans life history features were simplified and approximated. Our aim was not to generate the most realistic model possible, but to explore the feasibility of creating a C. elegans-like model and to test whether in such an approximation fitness benefits of adaptive death could be observed. The model provides a starting point for designing further iterations that more closely resemble C. elegans life history.
In more detail, simulations were performed on a 300 × 300 grid containing at its centre food distributed as a 2D Gaussian. During simulations, the food source was loaded as an CSV file, space_cen-tral_gauss.csv which can be found at Mendeley Data: Data/Scripts/ scripts/data/, which is a 300 × 300 table containing values of food units. Space_central_gauss.csv was created using Create_space.py script.
In our simplified model, each in silico worm was created as a Python object of class "Organism" defined in the file worms2.py. In the worms2.py script, we also defined functions determining how "worms" transition from one developmental stage to the next, how probability of survival for each age is determined, and how they reproduce and move. The simulation process was executed using mainloop_def_leg3_fast.py script, where all the functions defined in worms2.py are applied to each in silico worm at every timepoint.
Time was determined in discrete steps and all individuals were tracked.
As described above, for the sake of simplicity, we reduced the number of larval stages from 4 to 2. Each worm appears at the L0 stage (or egg) and at the next timepoint "develops" into an L1 (first stage larva). If food is available, it then develops into an L2 and then into an adult during the next successive timepoints.
Adults also become older with each timepoint (each object in the stage "adult" has an attribute "age"). At each timepoint, the script runs through the current population and applies all the functions from the script worms2.py in the following order. First, "worms" consume food. If the number of food units is higher than the consumption rate of an individual located in the cell, then the individual is flagged as fed, and if not as starved. Second, a staging function called "time" (in worms2.py) is applied to each individual.
The transformations happen according to the table below (see Figure S13a,b).
After stage determination, the function "survive" (defined in worms2.py) is applied to each individual. All L0s always survive. For all other individuals, whether they die or not is determined randomly according to their probability of death. The probability of death for L1, L1 arrested , L2 is set .05, for dauers −.005. For adults, it depends on age and is determined by a formula: p death (age) = 1 − M2 (M1 + age) , where M1 and M2 determine how quickly p death (age) approaches 1. Each individual is located at a particular cell on the grid. Next, each individual changes its location according to the function "move" (determined in worms2.py). The distance moved is determined by the fed status of the individual and limited with s_fed and s_hungry parameters when an in silico worm is fed or starved accordingly. Both direction and the distance of movement are determined randomly for x and y coordinates ( Figure S13c). For example, if s_fed = 0.5, the x or y coordinate can change from −5 to 5 cells away from the initial one; if initial coordinates are (150, 150), the next position can be (146, 155) or (150, 151). "Worms" cannot leave the grid, so if x or y exceed the limit, they are set to the limit. For example, if x is 305, it is set to 300 (when the grid size is 300 × 300).
Next, each individual that reached the adult stage reproduces.
The number of progeny is determined by the function "progeny_n" defined in worms2.py. This function calculates the number of progeny based on F1 and F2 parameters according to the formula Number of progeny (age) = F1 − F2*age 2.5 . The function number of progeny (age) was set to equal zero in all cases when it was below zero. Each individual reproduces according to the function "reproduce" (defined in worms2.py), and the determined number of progeny appears at the same location as the parent.
For each set of parameters, we measure colony fitness as the cumulative sum of dauers produced by simulation when the food is exhausted. In colony fitness assays, we initially measured not only the cumulative sum of dauers produced by a particular timepoint, but also peak dauer production. The inclusion of the latter metric was based on knowledge of C. elegans ecology: given that dauer dispersal by animal vectors is aided by dauer tower formation (Felix & Duveau, 2012), we reasoned that peak dauer number is a function of tower size which is, in turn, a metric for dispersal capacity and fitness. However, results for sum and peak dauer numbers were very similar (data not shown), and so, only the former are reported here.
Another possible colony fitness metric is rate of dauer production; this was not included here in order to limit the complexity of the analysis.
In simulations, because mortality was determined probabilistically (stochastically), in some cases, population establishment failed due to the death of the initiating larva. Simulations with this outcome were excluded, and mean fitness calculated using only those outcomes with non-null fitness. For most trials, an initiating population size of 1 was selected for simplicity's sake; by one estimate based on study of wild C. elegans, colonies (subpopulations or demes) are initiated by 3-10 individuals (Richaud et al., 2018).
Besides the closer resemblance of our model to C. elegans, significant differences in previous models (Markov, 2012;Travis, 2004) (Figure 1a), we opted instead to measure individual colony fitness rather than having different genotypes compete for the same patch. This means that effects of population viscosity in our model should be interpreted in a different way than for previous models: because we have only one genotype per food patch, dispersal speed determines efficiency of conversion of food into dauers rather than proportion of food consumed by kin.

| Coding of the model
Python 3.6 was used to implement the model and all scripts are available in Data S1.

| Running the simulations
Simulations were run using the UCL Myriad High Performance Computing Facility (Myriad@UCL) and associated support services. 100 repeat simulations for each condition were performed. To parallelize running between various nodes, additional bash scripts were written. Worms2.py contains the object oriented model of C. elegans. The run3_fast.py contains parameters which were changed before the run. Other python scripts were necessary to perform analyses, copy data and create graphs. Bash scripts were used to run parallel simulations in the Myriad cluster. After parameters were updated in run3_fast.py, the master script 8.sh was set to run 100 repeats for each of the 45 different conditions.

ACK N OWLED G M ENTS
We thank Y. Diekmann, M.G. Thomas and A. Timpson for advice on evolutionary modelling and J. Labbadia and E. Haag for useful discussion. This work was supported by a Wellcome Trust Strategic Award (098565/Z/12/Z) and a BBSRC equipment grant (BB/R01356X/1). We would also like to thank A. Markov, H.
Teotónio and three anonymous reviewers for their comments on the manuscript.

CO N FLI C T O F I NTE R E S T
The authors declare no competing interests.

AUTH O R CO NTR I B UTI O N S
DG and ERG conceived of the project. ERG constructed the in silico worm and performed the simulations. DG and ERG wrote the manuscript.

DATA AVA I L A B I L I T Y S TAT E M E N T
Raw as well as analysed data, scripts and graphs were deposited in Mendeley Data (Galimov & Gems, 2020).