A population dynamics tipping point for aging as a cause of adult death


 Populations are a fundamental level of biological organization that poses major challenges for analysis. Individual traits that influence development, diapause, reproduction, aging, and lifespan interact in complex ways to determine birth and death. Birth and death drive population dynamics and determine whether a population survives or is doomed for extinction. However, we lack a deep understanding of the relationships between individual traits and population dynamics, a major challenge in the emerging field of ecology-development (eco-devo). Here we establish a laboratory ecosystem using the model organism C. elegans and a computational simulation that realistically models the laboratory ecosystem. We used these platforms to investigate the conditions that permit animals in the population to die of old age, a critical step in understanding the role of aging in population dynamics. Old age as a cause of death was influenced by three conditions: maximum lifespan, rate of adult culling, and progeny number/food stability. Remarkably, populations displayed a tipping point for aging as the primary cause of adult death. With high numbers of progeny, almost all adults in a population died young, whereas a slight decrease in progeny number caused a dramatic shift in the population, and almost all adults died of old age. The conditions defined here establish a conceptual framework for understanding why certain animals die of old age in the wild, such as mayflies and elephants.


Introduction
Animals maintained in laboratories or captivity, where conditions are gentle and consistent, display agerelated degenerative changes that cause progressive frailty; this frailty eventually becomes so severe that it results in death, which is referred to as dying of old age. By observing animals in these conditions, it is possible to determine the maximum adult lifespan, a life history trait that is characteristic of a species. Maximum adult lifespan varies widely between species, ranging from ~ 1 day in may ies, ~ 40 days in C. elegans, ~ 80 years in Asian elephants, and ~ 120 years in humans. A major goal of aging biology research is to understand the mechanisms that control age-related degenerative changes and establish these characteristic maximum lifespans. However, animals evolved in the wild, where conditions are neither gentle nor consistent, leading to an important question: do animals living in the wild also display age-related degenerative changes that result in frailty and lead to death? Alternatively, animals in the wild may consistently succumb to other causes of extrinsic mortality such as disease, predation, accident, or starvation before the onset of age-related frailty. In a foundational paper that has in uenced the eld for decades, Medawar suggested that the answer to this question is important for developing a theory of the evolutionary biology of aging 1 . Furthermore, based on the studies of eld scientist of that time, Medawar thought that few senescent-related deaths would ever occur in wild populations because individuals typically succumbed to extrinsic mortality. This understanding is deeply imbedded in the theory he proposed. However, starting in the 1990s, extensive eld studies have been conducted to carefully examine this question, and the results are clear. Field studies have documented senescence in wild animals from insects to birds and mammals [2][3][4] . For many different species, animals living in the wild do display age-related degenerative changes that are likely to contribute to mortality, although they do not typically display the extreme frailty that can be observed in animals aged in captivity. Today we know that senescence patterns display a broad diversity among the tree of life 5 . Despite these advances, a conceptual framework for understanding how aging and limited lifespan in uence population dynamics has not been established.
To gain a deeper insight into how individual traits such as lifespan impact on population dynamics, we used C. elegans, a nematode worm that has been a major model system to investigate the molecular and cellular control of aging. C. elegans is well suited for life history trait experiments with its average lifespan of 15 days, ability to build clonal populations due to its hermaphroditism, and well de ned lifecycle 6 . When individual C. elegans are cultured in the laboratory they display age-related degenerative changes that ultimately result in frailty and death, similar to other animals in captivity. However, culture of isolated individuals in a constant environment is very different from the wild, where animals live in populations and environmental conditions uctuate. To begin to understand the role of aging in a population, we established a laboratory ecosystem comprised of C. elegans and the bacteria E. coli that serves as its food source. Laboratory ecosystems, also referred to as experimental microcosms, have been used to investigate a variety of important questions in ecology. These ecosystems have been developed for Didinium nasutum and its prey Colpidium campylum, as well as Daphnia and its prey phytoplankton, revealing important aspects of population dynamics and predator-prey interactions [7][8][9] .
Agent-based models have been used in a variety of applications from economics to ecology. In this modeling approach, the system consists of agents that operate in an environment. At each time step, the model updates the environment and each agent. The characteristics of the agents are speci ed by a series of rules, and the model computes agent behaviors at each time interval. These models are powerful because the behavior of individuals considered in aggregate results in emergent properties of the population, which are not directly speci ed. This approach is well suited for determining how the traits of individuals in uence the properties of the population.
Here we describe the development of a laboratory ecosystem in which a population of C. elegans with an E. coli food source can be propagated inde nitely. By measuring the number of worms and the amount of bacteria, we can monitor the population as it uctuates over time. One important feature of this laboratory ecosystem is that it was designed to be well suited for simulation, and the coordinated development of the laboratory ecosystem and the agent-based model is a distinctive feature of this study 10 . We describe the development of an agent-based model that is informed by measurements of individual worms in a variety of food environments. The model speci es how worms feed on bacteria, grow, transition between stages, lay eggs and die from old age, starvation or culling. The model is based on conceptualizing the C. elegans life cycle as a ux system, and the outputs include intuitive graphical representations of life cycle dynamics during a simulation. Thus, the model links the development and biochemistry of individual worms to the emergent properties of the population. The behavior of individual worms in the model closely resembles individuals in the lab, and the emergent property of population dynamics in the model closely resembles population dynamics in the laboratory ecosystem. We used these approaches to determine how environmental conditions and intrinsic traits of worms in uence whether animals in a population die of old age. We show that large numbers of progeny destabilize food availability, resulting in adult death from starvation. Controlling progeny number by culling stabilizes the bacterial food supply and permits adults to die of old age. The transition between these states displayed tipping point behavior. Whereas culling the larval stages promotes adults dying of old age, culling the adult stage has the opposite effect and diminishes the chance that an adult will die of old age. Finally, we examined maximum adult lifespans. Short adult lifespans promoted death from old age, whereas long adult lifespans diminished it. These results de ne conditions that make it possible for animals in a population to die of old age, and suggest that populations may alternate between periods when conditions permit animals to die of old age and conditions where this is a rare event.

Results
Development of a laboratory ecosystem for C. elegans and E. coli C. elegans is well suited for analyzing population dynamics because of their brief, well-de ned lifecycle of ~ 3 days and brief mean lifespan of ~ 15 days 6 . In addition, worms can be cultured in liquid medium and counted using an automated system, enabling frequent monitoring of large populations. Furthermore, individual properties such as fecundity or lifespan can be accurately measured, which is critical for developing a realistic computational model. To establish a laboratory ecosystem, we introduced 250 larvae into 5 mL of liquid S-Medium in a 50 mL culture bottle and cultured at 20°C (Fig. 1A). To analyze the ecosystem, we removed 500 µL (10% volume) samples at regular intervals. We refer to removing volume as culling, since it mimics extrinsic mortality caused by predation, disease or accidents. However, culling is randomly distributed over the population, whereas extrinsic mortality in the wild may be in uenced by properties of individuals. To maintain a constant volume and provide a source of food, we added 10 mg live E. coli in 500 µL S-Medium immediately after culling. Culling and feeding were performed every 24 hours for 100 days. With regular feeding and culling, these populations can be maintained inde nitely (Note 1).
Samples were analyzed using (1) a COPAS Biosort to count the number of worms, and (2) a spectrophotometer to measure OD600, which was converted to bacterial concentration (mg/mL) ( Figure   S1). These populations consistently displayed two phases: (1) an initialization phase that extends from the beginning of the culture until the population peaks and returns to the average size, and (2) the culture phase that extends from the end of the initialization phase until the end of the experiment on day 100 (Fig. 1B). The initialization phase displayed a steady increase to a maximum of ~ 127,000 worms on day 29, and then declined to ~ 74,000 worms on day 40 (Table S1). This pattern re ects the concentration of bacteria, which accumulated during days 1-5, since bacteria are added daily and there are few worms at the beginning (Fig. 1C). As the number of worms increases, they consume the excess food and settle into a pattern in which the daily feeding is largely consumed in ~ 5 hours (Fig. 1C'). During the culture phase (day 41 to 100), the worm population number oscillated with a maximum of ~ 112,000, minimum of ~ 58,000 and average of ~ 81,000. To address reproducibility, we analyzed biological replicates of laboratory ecosystems conducted in parallel or years apart. While every culture displayed a unique pattern of uctuations of the worm number, the overall features are consistent (Fig. 1D,E, Table S1).

Development of a realistic computational simulation informed by measurements of individual animals
The laboratory ecosystem does not reveal important features of the system, such as the developmental stages of individuals or longitudinal information about individual life histories. To complement the laboratory ecosystem and address these issues, we created an agent-based computational model where the agents are C. elegans [11][12][13] . The environment of the simulation consists of bacteria in a 5 mL volume. We conceptualized the C. elegans lifecycle as a ux system that accounts for individuals and mass ow (Fig. 1F,G). This system contains ve nodes corresponding to developmental stages of worms: egg, larva, dauer, adult, and parlad (parent/larva/dauer). Dauer is an alternative L3 larval form that is stress resistant; parlad, also called "bag of worms", is the result of matricidal hatching, which occurs when hermaphrodites stop laying eggs and self-fertilized eggs hatch into larvae and mature into dauers inside the hermaphrodite. Each node is characterized by two values: the number of individual worms in that developmental stage, and the total mass of those worms. The nodes are connected by arrows labeled worm transition (wt) that represent rates in the units worms/time or mass/time. An egg transitions to a larva when it hatches. A larva eats bacteria and grows; it transitions to an adult when food is plentiful and to a dauer when food is limiting. A dauer transitions back to a larva when food is plentiful. An adult eats bacteria, grows, and generates eggs when food is plentiful, thereby transferring germline parental biomass to progeny. An adult transitions to a parlad when food is limiting. A parlad generates dauers, thereby transferring somatic parental biomass to larval progeny. A worm transitions out of the system when it dies from one of three possible causes: all stages can die from culling, larvae and adults can die of starvation, and adults can die of old age.
The system contains one bacteria node that has a value equal to the mass of bacteria in the system. The bacteria node is connected by arrows labeled bacterial transition (bt) that represent rates in the units mass/time (Fig. 1G). Bacterial mass enters the node by periodic feeding and can exit the system by culling. Bacterial mass transitions to C. elegans larval and adult mass as a result of feeding. The system is grounded by conservation of mass -worms must consume bacterial mass to grow and produce progeny. The model uses discrete time steps of 3 hours. At each time step, the environment and every virtual worm is evaluated and updated based on a de ned set of decision trees described in detail in Note 2. The frequency and amount of bacteria input, and the frequency and percent culling rate are userprogrammable parameters speci ed for each run. The model compiles the complete trajectory of each individual, including rates of growth, time of transitions, production of progeny and cause and time of death (Table S2,S3). The individual data of one simulated population can be combined to create the emergent property of population dynamics.
To create a realistic model, we measured the properties of individuals cultured in conditions similar to the laboratory ecosystem: growth of larvae and adults, egg-laying by adults, transition of dauer to reproductive growth, and adult lifespan. We varied the concentration of bacteria to establish how this key environmental factor affects these properties and de ne the extremes of individual worm performance. Growth, egg-laying, and dauer transition to reproductive growth were highly sensitive to the concentration of bacteria, whereas adult lifespan was relatively insensitive ( Fig. 2A-P). These measured data were coded into the decision trees so that virtual worms mimic the behavior of real worms. Simulated individual worms and worms measured in the laboratory displayed similar behavior, providing a rst level of validation ( Fig. 2A Comparisons of population dynamics in the laboratory ecosystem and the computational simulation Having calibrated individual in silico worms to laboratory measurements, we next compared population dynamics in silico to population dynamics in the laboratory ecosystem. Three biological replicates of the laboratory ecosystem and three simulation replicates were performed using 10% culling and 10 mg bacterial feeding every 24 hours for 100 days (Fig. 3A,B, Figure S8, Table S8). The simulation initialization phase displayed a steady increase to a maximum of ~ 165,000 on day 11, and then declined to ~ 60,000 on day 15. This pattern re ects the concentration of bacteria, which accumulated for 6 days before declining into a daily oscillation (Fig. 3C,D'',D'''). The laboratory ecosystem initialization phase displayed a steady increase to a maximum of ~ 120,000 on day 26, and then declined to ~ 36,000 on day 29. During the culture phase (day 29 to 100), the simulated population oscillated with an average of ~ 62,000, a maximum of ~ 136,000, and a minimum of ~ 19,000; the laboratory ecosystem population oscillated with an average of ~ 32,000, a maximum of ~ 71,000, and a minimum of ~ 3,000. Although the simulated population displayed larger average, minimum and maximum numbers of worms, the overall patterns of initialization and culture phases were similar.
The simulation data includes longitudinal measurements of every individual, allowing a detailed understanding of population dynamics. By graphing the number of animals in each node, we can observe the progression of population peaks and valleys ( Fig. 3D-E). For example, the population reached a minimum size of ~ 17,000 animals on day 41, including ~ 3,000 adults. With food available, these adults produced a burst of eggs that peaked on day 43 with ~ 60,000 eggs. Eggs hatched into larvae that peaked at ~ 85,000 on day 45. The large population depleted the bacterial food, triggering starvation as adults transitioned to parlads on day 44 and larvae transitioned to dauers that peak on day 46. As the population declines and food becomes more available, adults begin to appear on day 47 and a new cycle begins. The average behavior of the system can be displayed graphically, which reveals that most worms are eggs, larvae, and dauer, with few adults and parlads. Adults primarily generate progeny by forming eggs, and primarily die of starvation and culling; very few die of old age. Most larvae starve or form dauer; relatively few transition to adults (Fig. 3E). These results resemble C. elegans populations isolated from nature that sometimes consist of just larvae and adults and sometimes consist of mostly dauers 14 .
Population dynamics in the laboratory ecosystem and the computational simulation display similar responses to changes in feeding and culling We predicted that decreasing the amount of bacterial feeding would decrease the average worm number, whereas decreasing the culling percent would increase the average worm number. To test these predictions and the correspondence between the laboratory ecosystem and the simulation, we reduced bacterial feeding from 10 mg/24h to 5 mg/24h. (Fig. 4B,C, 5B,C, S9A,D, Table S8). Using 5 mg/24h feeding, we reduced culling from 10%/24h to 5%/24h. (Fig. 4C,D, 5C,D, S9B,E, Table S8). Finally, we changed both culling and feeding simultaneously by comparing 10 mg bacteria and 10% culling every 24 hours to every 48 hours (Fig. 4A,B, 5A,B, S9C,F Table S8). The trends in the laboratory ecosystem and the simulation were similar: the average number of worms positively correlated with feeding amount and inversely correlated with culling percent (Fig. 4E,F). In the feeding and culling every 48-hour regime, the number of worms in the laboratory ecosystem and simulation are very similar, whereas with feeding and culling every 24 hours the simulation tended to have higher numbers of worms (Fig. 4G, Table S8). It is important to note that the simulation parameters (see Note 3) were xed according to the training set ( Fig. 4B) and never changed afterwards to t laboratory data.
Progeny number affects the frequency of old age as a cause of adult death The simulation of the laboratory ecosystem indicates adults typically die of starvation and culling, but rarely die of old age. These results resemble C. elegans populations isolated from nature that lack senescent individuals 15 ; however, senescent individuals may exist in the wild under speci c conditions and be di cult to isolate due to their fragility 16 . We reasoned that culling only dauer and larva stages would (1) decrease competition for food, thereby reducing starvation as a cause of adult death and (2) by de nition eliminate adult culling as a cause of death. When dauer and larva culling was varied from 0-85%/24h, the average number of worms decreased from ~ 66,000 to ~ 13,000 (Fig. 6A). The fraction of eggs and adults increased progressively, whereas the fraction of larva, dauer, and parlads decreased progressively ( Fig. 6B,C, Table S9). The amount of bacteria in the system increased progressively, indicating overall consumption decreases as dauer and larva culling increases (Fig. 6D). Aging as a cause of adult death displayed tipping point behavior (Fig. 6E). With 75%/24h dauer and larva culling, periodic episodes of food deprivation caused ~ 99% of adults to die of starvation, whereas only ~ 1% died of old age (Fig. 7A). Slightly increasing dauer and larva culling to 80%/24h reduced food deprivation to just 3 episodes at the transition to the culture phase, and ~ 52% of adults died of starvation whereas ~ 48% died of old age (Fig. 7B). Slightly increasing dauer and larva culling to 85%/24h eliminated episodes of food deprivation, and 100% of adults died of old age (Fig. 7C). The simulation makes it possible to examine the behavior of each node in these different environments ( Figure S10-19). The egg laying behavior of individual adults revealed that dauer and larva culling of 10%/24h results in a low average total progeny number of 25, because adults frequently die of starvation. By contrast, dauer and larva culling of 85%/24h results in a maximum average total progeny number of 106, since adults live their entire lives with adequate bacterial food (Fig. 6F).
Intrinsic lifespan affects the frequency of old age as a cause of adult death Having established conditions where all adults die of old age, we investigated the effects of intrinsic adult lifespan and adult culling. Maximum adult lifespan is a user-programmable parameter that was initially set to 40 days based on laboratory measurements 17 . To explore this variable, we analyzed virtual worms that were short or long-lived (maximum lifespan 25 or 60 days). All three cases displayed a tipping point, but the percent dauer and larva culling necessary to cause 50% of adults to die of old age shifts from 77-80% to 85% as maximum adult lifespan increased ( Fig. 8A-B, Table S9-11). Thus, if maximum adult lifespan is longer, then juvenile culling must be more stringent to allow adults to die of old age.
Adult culling affects the frequency of old age as cause of adult death Starting with conditions that cause 50% of adults to die of old age and 50% to die of starvation, we analyzed the effect of adult culling. When adult culling was varied from 0-40%/24h, aging and starvation as causes of adult death decreased rapidly, replaced by culling ( Fig. 8C-E, Table S12-14). Longlived worms were the most sensitive to adult culling, with no animals dying of old age at an adult cull rate of ~ 20%/24h. By contrast, short-lived worms maintained some adults dying of old age until 40%/24h adult culling (Fig. 8F). Thus, these observations de ne three factors that in uence aging as a cause of adult death: (1) Large numbers of juveniles create food instability, increasing starvation as a cause of adult death and thereby decreasing old age as a cause of adult death.

Discussion
Establishment of a laboratory ecosystem and computational simulation for C. elegans and E. coli -a new platform to investigate the relationships between individual traits and the emergent property of population dynamics. Biological systems are characterized by levels of organization that proceed from microscopically small to immense, and every level displays emergent properties. Atoms combine to form simple molecules, such as H 2 O, and properties such as polarity emerge that are not displayed by atoms alone. Simple molecules combine to form complex macromolecules, such as DNA, which displays the fascinating emergent property of self-replication that is the essence of life. Macromolecules assemble to form organelles and cells, which display emergent properties such as ion gradients. Cells assemble to form organs and organisms, which display emergent properties such as blood pressure. These levels of organization encompass the elds of biochemistry, cell biology, physiology and developmental biology. In the next level of biological organization, organisms assemble to form populations, which display the emergent property of population dynamics. Whereas individual organisms are born and die, when these individuals assemble in populations, the age-structure and total number of organisms uctuates over time. Finally, populations of different species assemble to form complex ecosystems, a level of organization encompassed by the eld of ecology 18, 19 . Populations with their emergent property of population dynamics are an interdisciplinary level of organization, because it bridges the traits of individual organisms, the domain of physiology and developmental biology, with the behavior of populations of organisms, the domain of ecology. A key objective in biology is to understand how the properties of the assembled parts determine the nature of emergent properties at the next level.
Population dynamics is of fundamental importance, because when the number of organisms in the population uctuates to zero, the population is extinct. Extinction is a crisis in the modern world due to human activity. More fundamentally, extinction of populations and species is a driving force in evolution. Thus, it is of considerable value to develop approaches to study extinction. There are two basic approaches to experimentally address population dynamics and extinction: eld studies of wild ecosystems and laboratory ecosystems. While eld studies are by de nition relevant to natural conditions, they suffer from practical limitations. For example, many species are impossible to reliably track because they are too small or hard to observe, wild populations exist in complex ecosystems affected by many variables, and manipulation of these ecosystems may not be possible or ethical. Laboratory ecosystems represent a reductionist approach to the problem of the ecosystem complexity rooted in the idea that fundamental aspects of population dynamics will apply to small populations in a laboratory. Because they can be readily manipulated and exhaustively analyzed, laboratory ecosystems overcome the major limitations of eld studies [20][21][22][23] . Of course, laboratory ecosystems have their own limitations. They lack the complexity of the natural world, and laboratory conditions can be highly arti cial.
The continuity of populations depends on the replacement of the ancestor generations by future generations. In principle, population dynamics is a straightforward function of birth and death, which has led to extensive modeling based on equations. However, modeling birth and death is far from straightforward, since these outcomes depend on complex interactions between individual organisms and the environment. Commonly used matrix models simulate populations as birth and death rates and neglect the adaptive behavior of the individual. To address the complexity of modeling birth and death, we developed an agent based model. This approach is ideal for this purpose, since the rules that govern the behavior of individuals can include complex interactions between the stage of the animals and environmental conditions, which is not possible with mathematical equations. The behavior of the individual worms is based on measured traits of individual C. elegans in the laboratory. Although all worms operate by the same rules, each displays a unique life trajectory including growth rates, time in the dauer stage, and reproductive output, etc., depending on the uctuations in the environment during its life. This allows a realistic simulation of in silico worms and their population dynamics. Furthermore, this is a sturdy platform to investigate in silico mutant worms that have properties distinct from wild-type worms.
We reasoned that speci c traits of individual organisms determine population dynamic behavior when these organisms assemble, and that rules that govern the interface between the level of individual organisms and the level of population dynamics could be elucidated by combining a simple laboratory ecosystem and computational simulation. To bridge the gap between laboratory experiments of isolated individuals and complex natural ecosystems, we developed a laboratory ecosystem with just two species: C. elegans and its food source E. coli. A complementary computational model that simulates C. elegans population dynamics as a ux system based on measured individual traits adds data depth and predictive power. Controlled laboratory ecosystem have been previously established, mainly with plankton-algae ecosystems in large water tanks 24 . These have been used to investigate multiple topics such as prey evolution 22 , steady state biomass levels 8 , or toxic effects of heavy metals 24 . Although the zooplankton species Daphnia magna is used as a model organism 25 , it is rarely used in aging studies. By contrast, C. elegans is a premier model organism for studies of development, physiology and aging 26 . It can be reliably measured in different environmental conditions such as variable food concentrations. In addition, the COPAS biosort is an automated counting machine developed speci cally for C. elegans that makes it possible to perform high throughput monitoring of population dynamics. The experimental system described here is distinct from previous laboratory ecosystems in several respects. (1) The C. elegans laboratory ecosystem was designed with the goal of creating a complementary agent-based model, so it well suited for this purpose. (2) The simulation outputs include intuitive graphical representations of the C. elegans life cycle, conceptualized as a ux system. Thus, the simulation outputs integrate the development and physiology of individuals with the properties of the population. (3) The simulation was designed to make it convenient to analyze in silico mutant worms, creating a platform that complements the large collections of C. elegans mutants that can be analyzed in the laboratory ecosystem.
C. elegans is an example of a species that is di cult to analyze in a natural ecosystem because of its small size and subterranean lifestyle. C. elegans can be recovered from nature, but the process is time consuming and does not support direct measurements of population dynamics. It is hypothesized that wild C. elegans populations undergo boom-bust cycles 14 . A cycle begins when a dauer enters a new food patch, such as a rotten apple or wood. The dauer transitions into a larva, matures, and reproduces to initiate a new population. This population proliferates until the food source is exhausted, leading to the generation of many dauers. These dauers must disperse to nd a new food patch to restart the cycle. Galimov and Gems (2020) used a computational approach to test the hypothesis that programmed death is an adaptive strategy for C. elegans to secure food for clonal progeny 27 . This computational simulation models single boom-bust cycles on a prede ned single food patch. The authors concluded that adult death has tness advantages de ned as amount of dauers produced in a single boom-bust cycle. The laboratory ecosystem described here is a liquid culture that involves regular addition of E. coli as a food source. During the initialization phase, the population expands rapidly since food is abundant, similar to what is hypothesized to occur when a dauer disperses to a new food patch. This phase is characterized by adults, eggs, and larval stages. When bacterial food is depleted, the stage composition changes and is characterized by parlads and dauers, similar to what is hypothesized to occur when a food patch is exhausted. Thus, the laboratory ecosystem appears to model key features of the boom-bust cycle that is proposed to occur in the wild. In addition, the laboratory ecosystem and simulation could be adapted to speci cally model the episodic food cycle proposed to occur in the wild. The current system cannot model dispersal of dauers to new food sources, since the simulation is a single food environment. However, the agent based model could be adapted to have multiple food sources separated in space, so in principle dauer dispersal could be incorporated into an expanded model.
For animals living in a population, dying of old age depends on conditions. To begin to elucidate how aging and lifespan in uence population dynamics, we identi ed environmental and intrinsic factors that in uence whether animals in a population die of old age. In a controlled laboratory setting, individual C. elegans become frail and die of old age. While it is not possible to directly determine if this occurs in the wild, it has been suggested to be unlikely 28-31 . In the laboratory ecosystem that we analyzed, our simulation modeling indicates that adults typically die of starvation and culling rather than old age. We used the simulation to identify conditions where adults do die of old age. One key factor is progeny number, which we manipulated by stage speci c culling. Interestingly, old age as a cause of adult death displays tipping point behavior -it rarely occurs with high levels of progeny but can become frequent when progeny levels are reduced to a critical level. The tipping point suggests the populations can exist in two states. State 1 is characterized by frequent episodes of starvation and an abundance of dauers; state 2 is characterized by a stable food supply and an absence of dauers. This result may be related to observations in the wild -abrupt shifts of ecosystems from one state to another state have been observed and described 32,33 . A second key factor is adult culling. As expected, when adult culling increases, fewer adults die of old age. This factor did not display tipping point behavior but was relatively continuous. The third key factor was maximum adult lifespan. In silico worms with a 25-day maximum lifespan died of old age more frequently, whereas in silico worms with a maximum adult lifespan of 60 days died of old age less frequently. Thus, conditions that promote adults dying of old age include, (1) reproductive restraint, which leads to food stability and minimizes death from starvation, (2) infrequent adult culling, and (3) a short maximum adult lifespan. By contrast, conditions that inhibit adults from dying of old age include (1) abundant reproduction, which leads to food instability and death from starvation, (2) frequent adult culling, and (3) a long maximum adult lifespan.
We speculate that these results could be relevant to the natural world, and shifting environmental conditions might cause populations to alternate between time periods when few or no adults die of old age and time periods when many adults die of old age. The factors de ned here provide a framework that can explain diverse animals that die of old age in the wild (Table 1). For example, elephants are intrinsically long-lived animals that have been observed to have aging as a cause of adult death in nature. Our model predicts that elephants must have a low level of adult culling and a small number of juvenile animals. Indeed, elephants make very few progeny, and their large size makes them essentially immune to predation [34][35][36] . May ies have a very short intrinsic lifespan and have been observed to have aging as a cause of adult death in nature. These adults do not feed, so they are immune to starvation, and even though they are subject to high levels of adult culling, the lifespan is so short they can still frequently die of old age 37,38 . Our future goal is to combine this powerful experimental platform with the advanced tools of C. elegans genetics to bridge the gap between individual traits and the behavior of populations and expand our understanding of "eco-devo" 39 .

Experimental methods:
All experiments were conducted at 20°C with E. coli OP50 and the C. elegans wild-type strain N2. Eggs were isolated by bleach treating gravid adults (2 mL NaOH, 4 mL NaClO, 4 mL H 2 O) and incubated in M9 for 15-18 hours on a shaker to allow L1 larvae to hatch and arrest development.

Measurements of individual worms
Egg-laying Hatched larvae were cultured in 1 mg/mL E. coli/S-Medium for 72 hours until the L4 larval stage, washed 3x with S-medium, and single animals were placed into 96 well plates. The nal volume was 150 µL per well with E. coli concentrations of 4, 0.5, 0.25, 0.125, or 0.061 mg/mL. Worms were transferred to new wells every 24 hours, and hatched progeny were counted.

Growth
Hatched larvae were cultured in 25 mL S-Medium with 16, 12, 4, 2 and 0.4 mg/mL E. coli. Worms were imaged every 24 hours with a Leica M80 microscope equipped with a camera, and images were analyzed with Image J and the worm sizer plugin 40 . Worms were scored as adults when they displayed eggs, and measurements were continued until the rst progeny matured to adults. Worm mass was calculated using the measured volume and reported mass densities 41 .

Lifespan
Lifespan assays were conducted as described 42 . Hatched larvae were cultured in 96 well plates with approximately 5-10 larvae per well. Each well contained 100 µl S-Medium and 16, 12, 4, 2, or 0.4 mg/mL E. coli. After 48 hours, 0.15 mM 5-uorodeoxyuridin was added to prevent progeny development. Adults were scored as alive or dead based on movement and body tension.

Dauer transition to larva
To obtain dauer larvae, we cultured a population in liquid medium, starved the animals for 10 days or 2 months, and isolated dauers by treatment with 1% SDS for 30 min 43 . 5-10 dauers were placed in 96 well plates with 16, 12, 4, 2, 0.4, or 0 mg/mL E. coli. The transition to larvae was scored after 12 hours and every 24 hours thereafter by visual inspection. After 120 hours, we added 4 mg/mL E. coli to the control with no E. coli and measured transition to larvae.

Laboratory ecosystem
The population in the laboratory ecosystem was initialized with 250 larvae and 5 or 10 mg live E. coli in 5 mL of liquid S-Medium 42 in 50 mL cell culture bottle. To analyze the worm number and/or E. coli concentration, we removed 5-10% of the volume every 24 or 48 hours. To maintain a constant volume and provide a source of food, we immediately added 5 or 10 mg live E. coli in 250 or 500 µL S-Medium. Samples were analyzed using (1) a COPAS Biosort to count the number of worms in a 10-50 µL sample, which was used to calculate the total number of worms in the population, and (2) a spectrophotometer to measure OD600, which was converted to bacterial concentration (mg/mL) using a standard curve ( Figure  S1).

Statistics
Statistical analysis of egg-laying behavior of simulated worms in populations with different dauer & adult culling was done with R using a one-way ANOVA with F = 197.3, Df = 3, and p > 0.001 followed by a Tukey Post-hoc test (see Fig. 6F). All error bars show standard deviations.

Computational Simulation
The description of the agent-based model wormPOP follows the Overview, Design concepts, and Details

Process overview and scheduling
In each time-step of the simulation, the environment and the worms proceed through the following processes.
(1) The user-programmable feeding and culling schedule is consulted. If applicable, feeding/culling is performed at the beginning of the time step.
a. If the culling schedule calls for it, then worms are culled (removed from the simulation by extrinsic mortality) and/or bacteria are culled (removed from the simulation). Worms are randomly selected for culling based on their stage and according to a speci ed percentage of the group. This is implemented in code as a separate random probability that each worm at whatever stage will be removed from the system. Individual life histories of worms are updated, specifying cull as the cause of death. The state variable of bacteria concentration in the environment is updated.
b. If the feeding schedule calls for it, then a speci ed amount of bacteria (ng) is added, and the state variable of bacteria concentration in the environment (ng/ml) is updated.
(2) The "appetite" of every worm is computed. This is the amount of food it would eat if food were plentiful. The sum of appetites is used later to assure approximately uniform access to food, independent of computational ordering of the worms' eating behavior. iii. Larva use ingested mass for maintenance and growth. Individual life histories of worms are updated, specifying mass used for maintenance, growth, and growth e ciency loss.
iv. Larva stage progress to adult or starvation: larva can transition into adults or die of starvation. Individual life histories of worms are updated, specifying developmental stage.
c. Dauer i. Dauers do not eat or grow or lay eggs or starve to death. They only test the environment for available food and if it is greater than the (user-programmable) threshold, the dauer returns to the same larval stage and picks up just where it left off before it was a larva, with the same history and the same mass. (Note that the probability of this dauer transition to larva is dependent on the food available at the moment that this worm's turn comes up in the random ordering, so to this extent it is stochastic.) ii. Dauers stage progress to larva or starve: dauers can transition into larva based on the bacteria concentration. If dauers don't sense food for too long, they die of starvation.
Individual life histories of worms are updated, specifying developmental stage or starvation as cause of death. ii. A fraction of the mass is consumed in metabolism. The consumed food is apportioned between growth and egg mass.
iii. Adults use ingested mass for maintenance, growth and egg-laying: Individual life histories of worms are updated, specifying mass used for maintenance, growth, growth e ciency loss, eggs, and reproductive e ciency loss, and new eggs are added to the simulation as new agents.
iv. Adults die of starvation and transition to parlad: If adults don't get enough food, they die of starvation. Individual life histories of worms are updated, specifying starvation as the cause of death and transition to parlad.
v. Adults die of old age: If adults reach a speci ed age, they die from intrinsic causes called old age. Individual life histories of worms are updated, specifying old age as the cause of death.
e. Parlads stage progress: parlads can remain parlads or transition (burst) into dauers. Individual life histories of worms are updated, specifying developmental stage or death by starvation when the parlad bursts. When parlads burst, new dauers are added to the simulation as new agents.
(4) Various bookkeeping functions are performed, including removal of dead worms from the roster.

Basic principles
To exploit the power of agent-based models, we designed a simple laboratory ecosystem to be amenable for simulation. Several features make the ecosystem well suited for modeling: (1) The ecosystem includes only two species -each individual nematode is an agent, and the E. coli bacteria considered as a whole is one entity. (2) We can measure the population dynamics of worms and bacteria in the laboratory ecosystem, resulting in quantitative benchmarks for the behavior of the simulation. (3) We can measure the properties of individuals in conditions very similar to the laboratory ecosystem, which allows realistic simulations of individual behavior. The agent-based model complements the laboratory ecosystem by simulating the behavior of each individual worm in the population and allowing detailed analyses of the population with 3-hour resolution. Furthermore, we conceptualized the C. elegans life cycle as a ux system that links individuals to population phenomenon, and generated an intuitive graphical output that shows the ux of individuals through the life cycle. We implemented mass conservation, which is critical for long term studies of population dynamics. By using laboratory measurements of growth and reproduction at different environmental bacterial concentrations, the model incorporates the plasticity of individual worm responses to variable food environments. Details are in Notes 2 and 3.

Input data
Input data for the wormPOP model is periodic addition of bacteria and culling, and the frequency and amount is user programmable. Bacteria were added and culling was performed every 24 or 48 hours to mimic the laboratory ecosystem.

Data&Code availability
Datasets are included in the Supplementary Tables. The code used for all simulations will be freely available for download at https://github.com/.  (B) Analysis of summary statistics: time spans (black double arrows) and worm numbers (red double arrows) (C) Bacteria (black squares) and worms (gray circle) were analyzed daily. Yellow box indicates region enlarged in C'. (C') Bacteria were analyzed hourly on day 9; bacteria were added between 0 and 1 hour (indicated by red arrow). (D) Three worm populations were initiated on the same day with larvae from the same group of synchronized worms and bacteria from the same concentrated solution (replicate 1a-1c). For the next 100 days, these laboratory ecosystems were maintained separately and never mixed.

Declarations
We designate 1a-1c as biological replicates conducted in parallel. Replicate 1a is shown in panel B. (E) Replicate 2a was initiated on a different day with larvae from a different group of synchronized worms and bacteria from a different concentrated solution. We designate replicate 2a and replicate 1a/1b as biological replicates conducted at different times. Replicate 2a is shown in Figure 3A.    in initialization and culture phase; average, maximum, and minimum worm number in the culture phase (see Fig 1B). Culling and feeding schedules show the parameter that was varied in blue. The red simulated data show similar patterns as the black laboratory data with changing culling and feeding conditions.

Figure 5
Population dynamics in the computational simulation in four conditions. (A-D) Flow diagrams of simulated populations with indicated feeding and culling schedules. Panel B is the same as Figure 3F.
The key shows the relationship between node size and average number of worms in that node during the 100-day simulation. Similarly, the key shows the relationship between arrow size and the average number of worms making the transition during a 3-hour time period.  Population states where adults die of starvation or old age. (A-C) The death transitions of the adult node, starve (wt(a>p)) and old age (wt(a>o)), are displayed as number of worms/3 hours. One representative  with a variable percentage of adult culling: average percent of adults that die of starvation, old age or culling. At each point on the horizontal axis, the values sum to 100%. We used the dauer & larval culling value that causes 50% of adults to die of old age with 0% adult culling: 77% for the 25-day maximum lifespan (C), 80% for the 40-day maximum lifespan (D), and 85% for the 60 day maximum lifespan (E).
(F) Bars depict the lowest percent of adult culling that causes 0% of adults to die of old age based on the data in panels C-E. (G) Summary of the relationship between maximum lifespan, food security (progeny survival), and extrinsic adult death (culling). Triangles indicate conditions in which more than 50% of