Recent studies have reported that population dynamics and evolutionary dynamics, occurring at different time scales, can be affected by each other. Our purpose is to explore the interaction between population and evolutionary dynamics using an artificial life approach based on a 3D physically simulated environment in the context of predator–prey and morphology–behavior coevolution. The morphologies and behaviors of virtual prey creatures are evolved using a genetic algorithm based on the predation interactions between predators and prey. Both population sizes are also changed, depending on the fitness. We observe two types of cyclic behaviors, corresponding to short-term and long-term dynamics. The former can be interpreted as a simple population dynamics of Lotka–Volterra type. It is shown that the latter cycle is based on the interaction between the changes in the prey strategy against predators and the long-term change in both population sizes, resulting partly from a tradeoff between their defensive success and the cost of defense.
Evolutionary and ecological dynamics have usually been thought to influence each other asymmetrically. Evolutionary changes are usually a consequence of the environment, but they occur over time scales that are too long to affect the dynamics of population size in the short term . Therefore, most ecological models ignore evolutionary changes in the conspecific or other species, assuming a separation of time scales between population dynamics and evolutionary dynamics .
However, this assumption has been challenged by recent studies on rapid evolution in nature, occurring on time scales comparable to those typical of population dynamics. It should be noted here that it is not sufficient that an evolved trait influence ecological processes for its evolution to be considered rapid. Rather, evolution is rapid in this ecological context only if the heritable phenotypic change occurs sufficiently quickly to alter the trajectory of an ecological process while it is still in progress . As an example of rapid evolution, Yoshida et al. reported that prey evolution in response to oscillating predator density affects the period of oscillations and the phase relations between predator and prey (rotifer–alga) cycles in laboratory microcosms . In view of such studies, the concept of evolutionary time defined by researchers  is changing rapidly . Among them, Hairston et al. go the furthest in defining rapid evolution as a genetic change rapid enough to have a measurable impact on simultaneous ecological change . On the basis of their definition, for Darwin's finches evolving in response to fluctuating rainfall , they estimated that evolutionary change has been more rapid than ecological change by a factor of 2.2. With progress of related studies, many researchers have come to conclude that when rapid evolution occurs during the course of an ecological process, it can significantly change ecological predictions .
Accepting not only that ecology affects evolution but also that evolution affects ecology leads to our recognition of the existence of eco-evolutionary feedbacks (loops) [17, 25] or ecogenetic feedback [33, 16]. Using chemostats with a continuous influx of their resource (bacteria), Bull et al. showed that selection switches between rapidly reproducing viruses and less rapidly reproducing viruses having greater competitive ability, which in turn affects the density of the resource (the selective environment) . Kerr et al. used a metapopulation of bacteriophages with limited migration between subpopulation sites, and showed that less rapacious phage were selected for, as selfish phage caused their subpopulations to become extinct . Recently, using a predator–prey (rotifer–alga) experimental system and a mathematical model, Kasada et al. showed that different forms of algae's fitness tradeoff between defense against rotifer predation and reproductive ability produce remarkably divergent eco-evolutionary dynamics . However, this type of feedback is not entirely straightforward, and there are several challenging questions. Among them, the most fundamental one is about the importance of the feedback. It is claimed that only an extensive research effort involving multiple experimental approaches with long-term field experiments over a variety of ecological communities will provide the answer, and the investigations to reveal the role of such feedback are just beginning .
We believe that the artificial life approach based on 3D physically simulated environments will provide valuable insights into the relationship and the interaction between population and evolutionary dynamics. Following the pioneering study , virtual creature models allow us to analyze morphology–behavior coevolution in 3D environments [32, 21, 4, 23, 2].
Population dynamics can be straightforwardly introduced into these types of models. Population dynamics depends on the fitness of individuals if the fitness is represented by the offspring number, although almost all previous models of virtual creatures have a fixed number of individuals. Given enough computational power, we can observe and analyze the interaction between population dynamics and evolutionary dynamics in 3D virtual creature environments. What we want to emphasize here is that virtually embodied creatures can evolve unexpected traits of morphology and behavior as a result of the interactions with conspecifics or other species in a physically simulated world. Since the genes and parameters do not have explicit predefined functions, as they do in previous studies based on mathematical models , functional traits emerge naturally. This makes for more natural evolution and allows us to discuss their emergence in the context of eco-evolutionary dynamics (Figure 1).
Evolutionary processes can affect ecological dynamics at intra- and interspecies levels. This study focuses on the predator–prey interactions as the key element of ecological systems . Predation pressures in food chains shape diversity and functions of organisms . Predators employ various strategies in capturing their prey, and at the same time, prey employ various protective mechanisms against their predators in nature , which can be regarded as the results of the coevolution between predators and prey. Some previous studies using the artificial life approach explored competitive coevolution [28, 20]. Our previous model focused on the morphology–behavior coevolution in environments with a predator and a prey [11, 12]. We extend it to explore the interaction between population and evolutionary dynamics in the context of predator–prey and morphology–behavior coevolution.
In this article, we evolve virtual creatures for predators and prey with change in their population sizes in a 3D physically simulated environment. We analyze the relationship between population size and trait evolution and show their two different behaviors depending on the time scale. We then discuss and estimate this interaction and relationship in terms of the population and evolutionary dynamics.
We use Morphid Academy, which is an open-source simulation system , to evolve virtual creatures in a 3D physically simulated environment. This virtual creature model is a simplification of Sims' Blockies model  and is fully described in . The simplification in body and neural structure reduces the evolutionary search space and has been demonstrated to perform well for various evolutionary tasks. Morphid Academy has been previously used to successfully evolve virtual creatures for locomotion , light-following , and sustained resource foraging . In addition, it has been used to evolve the various successful strategies in one-to-one interaction between a predator and a prey [11, 12]. In a previous study, we performed double coevolution of morphology–behavior and predator–prey couplings, presented the emergence of various morphological and behavioral strategies of prey against predation by predators, and analyzed the dynamics of this coevolution caused by the two levels of asymmetries .
In this article, to represent the interaction between the group of predators and prey, we simulate and evaluate every predator and prey individual of both population pools in a shared environment (Figure 2). Each species evolves its traits and changes its population size depending on its fitness.
The agents are virtual creatures composed of several 3D rectangular solid body parts connected with simple hinge joints. Their physical phenotype is developed from a directed graph (Figure 3). The nodes represent body parts, and the links represent joints. The genotype graph undergoes evolution through a genetic algorithm. We termed the root body part the torso, and all the other parts limbs. The controller of a virtual creature is a recurrent neural network embedded in body parts. There are three types of neurons: input, calculation, and output. The input neurons represent sensory information from the environment, the computational neurons process the input, and the results are fed into other computational or output neurons; the output neurons as joint effectors power the joints, making the creature move.
The sensor of a creature detects the nearest living creature belonging to the other species within a sensing range s (as described in detail in  and ). Two measures are calculated by the sensor: the angle to the sensed creature with respect to the main orientation axis of the creature, and the distance to the sensed creature. These are combined into one value incorporating the sign of the angle and the value of the distance. The result is fed into the sensory neurons in the network. It is important for this experiment to use a small sensing range s. If the creatures can detect others at distant locations (large s), there is little effect of the density of prey on the predators, because the predators are always able to find any prey in the environment. This decreases the effect of population dynamics on the evolution of traits.
The predators and the prey are randomly positioned within a radius C from the origin of the simulation space in each generation. Every agent is positioned above the simulation plane and allowed to free-fall due to gravity during a stabilization phase. Once the agents become stable, resting on the ground surface, the encounter phase for the evaluation begins and lasts for S simulation time steps.
Capturing is defined as the predator touching the torso of the prey with any of the predator's body parts. This definition is modeled on the assumption that animals have a weak point in their body and can evolve their morphology and behavior to protect this vulnerability. The captured creature is disabled and cannot be sensed until the end of the simulation.
2.3 Evolution and Population Dynamics
Two populations, representing the predators and the prey, are concurrently evolved for g generations using a genetic algorithm. Both population sizes P1 and P2 are changed simultaneously with the reproduction of the next generation. We used the following process for the genetic algorithm.
The parents produce n children through either of the two genetic operators: crossover (with probability Rc), or grafting (with Rg). The children are produced just by copying of a parent if neither of the genetic operators occurs. A single point crossover exchanges parts of the genotype tree at the node level. The grafting operator grafts a randomly chosen subgraph from one parent onto another. A mutation is applied to the resulting child individual with probability Rm, which applies small changes to the whole genome (with probability 0.05 per gene). These changes include changes in the morphological node or link parameters, addition of morphological nodes, and the addition or removal of morphological links. The resulting creature is processed to remove unreachable nodes. The children of all individuals replace the population. As a result, the population size is changed according to the fitness of creatures.
3.1 Experimental Setting
In the experiments, as a first step, we assumed that the prey population evolved as described above while the predator population did not evolve, in order to understand the basic dynamics caused by evolution of one species. For this purpose, we pre-evolved the predators in preliminary experiments with random prey, and some successfully evolved predators were used to seed the initial population of predators. On the other hand, random prey were used to seed the initial population. We also set the evolutionary parameters as follows: Rc = 0.0, Rg = 0.0, and Rm = 0.0 for the predator population without evolution; and Rc = 0.1, Rg = 0.1, and Rm = 0.1 for the prey population with evolution. We further used the following settings of parameters: g = 1000, S = 100000, s = 300, C = 1500, P1max = 50, P2max = 50, P1min = 5, P2min = 5, P10 = 25, P20 = 25, α1 = 10000, α2 = 10000, β = 50, D = 6000 for predator, D = 6000 for prey, and M = 3.
3.2 Basic Behavior
We performed 10 trials of evolutionary experiments using those settings. We observed a similar tendency of the population dynamics in all the trials. Figure 4 and Figure 5 show the typical population dynamics and the change in the average fitness of predators and prey, respectively. The red graph and the blue graph represent the population size (fitness) of the predators and prey, respectively, in these figures.
In early generations, both populations were very low. At some point near the 250th generation, both populations increased suddenly and then started to fluctuate significantly. The change in the prey population was larger than that in the predator population in this period. After that, around the 600th generation, both populations became very low, similar to those in the early generations. Finally, around the 750th generation, both populations increased again. As this shows, two different patterns of population dynamics occurred alternately. In addition, we see that the fitness of both populations also changed in synchrony with their population size.
3.3 Population and Evolutionary Dynamics
We analyzed the relationship between the population and evolutionary dynamics of both populations. As the quantitative index of the evolutionary dynamics, we used the average volume of the body and tracked its evolution.
3.3.1 Short-Term Dynamics
First, we focused on the period from the 300th to the 400th generation, which showed the typical population change in short-term dynamics. Figure 6 shows the populations of the predators (red graph) and prey (blue graph), and the average volume of the prey (blue dotted graph). We observed a periodic increase and decrease of both populations and also observed that the change in the prey population preceded the change in the predator population. We estimated, by the time delay estimation (TDE) method , that the change in the prey population was followed with a time lag of about 2 generations by the change in the predator population.
3.3.2 Long-Term Dynamics
Second, we focused on the relationship in long-term dynamics, using a 30-period simple moving average of the indices in order to reduce the short-term fluctuations. Unlike those in a short-term period, the populations of the predators and prey changed simultaneously, as shown in Figure 7. Both species had small populations at the 0th to 200th and the 600th to 750th generations and had large populations at the 200th to 600th and the 750th to 1000th generations. On the other hand, when the population of the prey gradually increased (decreased), the volume of the prey slightly decreased (increased) simultaneously.
3.3.3 Spectrum Analysis
We show that the whole ecological and evolutionary processes can be typically separated into the short- and long-term dynamics described above by using a spectral analysis of the average volume and the population size of the prey. Figure 8 shows the frequency spectra of the prey volume (green) and the prey population (red). We see that these frequency spectra are composed of two parts: the low frequency range from 1 to 25 generation−1, and the high frequency range from 25 to 1000. In the low frequency range, the amplitudes of both the population size and the average volume were large and had similar forms. These reflect the mutual interactions between them in the long-term dynamics. In contrast, in the high frequency range, the amplitude of the population size was large while the average volume was small. These results suggest that there was little interaction between them in the short-term dynamics. Thus, in our model, there are mutual interactions between the ecological and evolutionary processes only in the long-term dynamics, while there are none in the short-term dynamics in general.
3.3.4 Trajectory Analysis
We can see the difference between these separated dynamics more clearly by focusing on the typical trajectories of population and evolutionary changes in short-term dynamics (a) and (b) and long-term dynamics (c) and (d), shown in Figure 9. The trajectories of the predator and prey populations show a typical cyclic behavior in the short-term dynamics (a), which is often observed in Lotka–Volterra systems [34, 19]. In this case, the trajectory of the volume and the population of the prey showed no clear tendency (b), and the correlation coefficient was −0.30. This means that there were no interactions between the population and evolutionary changes of the prey.
On the other hand, graph (c) shows that there is a positive correlation between the predator and prey populations in the long-term dynamics. This is different from the one in (a), although we can still see small cycles in the trajectory. It also should be noted that, in graph (d), there is a strong negative correlation between the population and volume of the prey, and the correlation coefficient was −0.75. This means that there existed clear interactions between the population and evolutionary changes in this long-term dynamics. We also see that the oscillations of these indices occurred repeatedly, keeping the correlation negative.
Thus, we can say that mutual interactions between the population and evolutionary changes were observed only in the long-term dynamics. This result suggests that population and evolution dynamics had a different relationship between the short term and the long term. In particular, it is expected that the evolutionary dynamics affected the population dynamics strongly in the long term, but only weakly in the short term.
3.4 Influence of Population Dynamics on Evolutionary Dynamics
Figure 10 shows the predator population (red) and the relative variance of the cost (black). The relative variance of the cost increased while the size of the predator population decreased, and the relative variance of the cost decreased while the size of the predator population increased. Therefore, the pressure of the predation tends to dominate in a large predator population, and the pressure of the cost tends to dominate in a small predator population. It is adaptive for the prey to reduce the cost in an environment in which the predator population is small. The prey without defensive strategies with the lower cost can obtain high fitness, because the probability of predation is low. In contrast, it is adaptive for the prey to increase the cost and have defensive strategies in an environment in which the predator population is large. If the prey escape from the predation by paying the high cost, it is expected that they will obtain higher fitness than that in the case of paying a low cost, because of the high risk of predation.
We discuss the two different types of interactions between the population and evolutionary dynamics with different time scales observed in the presented experiments, illustrated in Figures 11 and 12. In each figure, the outer and inner circular arrows represent the dynamics in the population level (i.e., change in the size of both populations) and the individual level (i.e., the evolution of the volume of the prey), respectively. The middle circular arrows represent the change in the target of selection.
4.1 Short-Term Dynamics
Figure 11 shows the interactions in short-term dynamics, which can be summarized as follows:
When the predator population is small, the prey population is increased by the low probability of predation.
The increase in the density of the prey population causes an increase in the probability of successful predation and an increase in the predator population.
The prey population is decreased by the large predator population, due to successful predation of the prey by the predators.
Finally, the decreased predator population led to low density of the prey population. Both populations returned to step 1.
These cyclic dynamics correspond to the ones observed in Lotka–Volterra systems, caused by the change in the population density only. In the short-term dynamics, there seems to be no clear selection pressure for the trait of the prey. This is assumed to be due to the fact that the population dynamics of both species were too fast for the prey population to adapt to, although it is too simplistic to conclude that evolutionary dynamics do not affect short-term population dynamics in this model.
4.2 Long-Term Dynamics
Figure 12 shows the interactions in long-term dynamics, which can be summarized as follows:
When the predator and prey populations are small, the probability of predation is low. Therefore, the reduction in the cost of defense becomes the target of selection.
The volume of the prey decreases.
Because the prey that have low-cost bodies obtain high fitness and produce many offspring, the population of the prey increases. At the same time, the increase in the density of the prey population causes an increase in the predator population.
When the predator and prey populations are large, the probability of predation is high. Therefore, defense against predation becomes the target of selection.
Effective defensive strategies relying on large body volumes invade the population of the prey.
Because of the high cost for their large volume as well as the high predation pressure, the prey have lower fitness. Thus, the population of the prey decreases, which further decreases the population of predators. Both predator and prey populations return to step 1.
Recently, there have been various reports on the interactions between population and evolutionary dynamics. As for the interactions in the predator–prey relationship, Yoshida et al. showed that there is a tradeoff between competitive ability and defense against predation of the prey in rotifer–alga and phage-bacterium chemostats. The most competitive non-predator-resistant bacteria dominated initially, but as rotifer densities increased, the more predator-resistant bacteria dominated . They also showed that the predator or pathogen can exhibit large-amplitude cycles while the abundance of the prey or host remains essentially constant . They found that, in such a situation, there exist cryptic cycles of interactions between these species through the rapid evolution of the frequencies of defended and undefended prey. Sanchez and Gore also demonstrated the presence of a strong feedback loop between population dynamics and the evolutionary dynamics of a social microbial gene, SUC2, in laboratory yeast populations whose cooperative growth is mediated by the SUC2 gene . They showed that the eco-evolutionary trajectories of the population density and the gene frequency spiral in the density–frequency phase space. The long-term dynamics observed in our experiments is probably the first demonstration of such eco-evolutionary feedbacks in a 3D artificial creature model. We believe that our approach allows us to analyze the emergent process of various morphological and behavioral strategies in this context.
We have presented the results of evolutionary experiments investigating the interaction between the population dynamics and the trait evolution of a predator–prey scenario in a 3D physically simulated environment. The morphologies and behaviors of virtual prey creatures are evolved using a genetic algorithm based on the predation interactions between predators and prey. We also changed the population sizes of both species depending on the fitness of individuals.
We found different interactions between population and evolutionary dynamics on short and long time scales. When we focused on the short-term dynamics, we observed simple cyclical dynamics of the population of predators and prey, which correspond to Lotka–Volterra population dynamics. This is because the population dynamics were too fast for the evolutionary dynamics to adapt to. In contrast, when we focused on the long-term dynamics, we observed complex interactions between the population dynamics of both species and the evolutionary dynamics of the traits of the prey. Specifically, we found inverse correlation between the population sizes and the average volume of the prey, and their continual fluctuations, leading to the emergence of defensive and non-defensive morphological strategies of prey. This is due to the fact that the target of selection for the prey switched between defense against predation and reduction in the cost of defense, depending on the population size of predators.
That is, the change in the population size caused the change in the selection pressure and the change in the trait caused the population change. We believe that such dynamics can be observed in predator–prey scenarios both in artificial frameworks and in nature.
Our model could be extended in various directions. One obvious direction would be to evolve the predators simultaneously. Such extended evolutionary experiments may show the population and evolutionary dynamics in the predator–prey relationship more clearly. Furthermore, we believe that the dynamical selection pressure exerted by an evolving predator would likely be a major factor in shaping the population and evolutionary dynamics, leading to more complex dynamics than the monotonous repetition of similar evolution of the volume observed in this article. Another direction would be to add intraspecies interaction to support group hunting and prey herding behaviors and shed light on their effect on the population dynamics.
This work was supported by JSPS KAKENHI grant number 26·10516.