Whether, when, how, and why increased complexity evolves in biological populations is a longstanding open question. In this work we combine a recently developed method for evolving virtual organisms with an information-theoretic metric of morphological complexity in order to investigate how the complexity of morphologies, which are evolved for locomotion, varies across different environments. We first demonstrate that selection for locomotion results in the evolution of organisms with morphologies that increase in complexity over evolutionary time beyond what would be expected due to random chance. This provides evidence that the increase in complexity observed is a result of a driven rather than a passive trend. In subsequent experiments we demonstrate that morphologies having greater complexity evolve in complex environments, when compared to a simple environment when a cost of complexity is imposed. This suggests that in some niches, evolution may act to complexify the body plans of organisms while in other niches selection favors simpler body plans.

The evolution of complexity, a central issue of evolutionary theory since Darwin's time, remains a controversial topic. One particular question of interest is how the complexity of an organism's body plan (morphology) is influenced by the complexity of the environment in which it evolved. Ideally, it would be desirable to perform investigations on living organisms in which environmental complexity is under experimental control, but our ability to do so in a limited timespan and in a controlled manner is severely constrained. In lieu of such studies, here we employ computer simulations capable of evolving the body plans of virtual organisms to investigate this question in silico. By evolving virtual organisms for locomotion in a variety of environments, we are able to demonstrate that selecting for locomotion causes more complex morphologies to evolve than would be expected solely due to random chance. Moreover, if increased complexity incurs a cost (as it is thought to do in biology), then more complex environments tend to lead to the evolution of more complex body plans than those that evolve in a simpler environment. This result supports the idea that the morphological complexity of organisms is influenced by the complexity of the environments in which they evolve.

Funding: This work was supported by National Science Foundation ( http://www.nsf.gov/ ) Grant PECASE-0953837 and DARPA ( http://www.darpa.mil/ ) M3 grant W911NF-1-11-0076. The authors also acknowledge the Vermont Advanced Computing Core which is supported by NASA ( http://www.nasa.gov/ ) (NNX 06AC88G) at the University of Vermont for providing High Performance Computing resources that have contributed to the research results reported within this paper. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

The behavior of each virtual organism is simulated in a three-dimensional, physically-realistic virtual environment in order to assess its fitness. Because of the organisms' triangular mesh body plans and the complex environments in which they are evolved, evaluating the fitness of each organism requires considerable time. Moreover, many evolutionary trials were conducted in each of several environments to allow for meaningful statistical analysis. For these reasons all of the experiments were carried out on a 7.1 teraflop supercomputing cluster and required a total of over 100 CPU-years of distributed compute time.

The five morphologies with smallest (top, values from left to right: 0.66, 0.76, 0.82, 0.88, 0.88) and largest (bottom, values from left to right: 3.74, 3.77, 3.80, 3.84, 3.84) values of (see Methods for details) across all best of trial individuals from all environments (icy and control). The morphologies with high values are visually more complex than those with small values.

The control environment (top left) and three icy environments are shown with organisms that evolved to successfully move in each. The control environment only contains a high friction ground surface, while the icy environments feature low friction “blocks of ice” (blue) on top of the ground. Videos of these organisms are included in the Supplementary Material ( Videos S1 , S2 , S3 , S4 , S5 , S6 , S7 , S8 , S9 , S10 , S11 , S12 , S13 , S14 , S15 ).

Another advantage of the current system is the way in which the genetic material that the evolutionary model acts on is encoded. As has been demonstrated in the past [25] , [26] , genetic encodings that simulate development to some extent offer demonstrable benefits over those that do not. This is because such encodings tend to produce regularities and symmetries in the phenotype; such patterns in nature are the inevitable result of biological development, which biases the kinds of phenotypes that biological evolution may act on [38] . For this reason, here we employ a particular form of genetic encoding that produces three-dimensional shapes with regular patterns (see Methods for more details) [39] . Each genome generated from this encoding generates a triangular mesh (trimesh) that forms the body plan of the virtual organism. Trimeshes allow evolution to craft morphologies with greater geometric detail compared to other systems in which evolution composes a small number of simple three-dimensional shapes together [19] , [21] – [32] (see Figs. 1 and 2 for examples of morphologies evolved with the current system). Finally, populations of these genetic encodings are evolved with a commonly-used evolutionary model which has been demonstrated to be more evolvable than other evolutionary models [40] .

The first advantage relates to the task environments within which organisms evolve. The majority of the studies mentioned above were restricted to evolving for locomotion over flat terrain. While investigating this task has yielded interesting results, it suffers from its simplicity: simple morphologies composed of just a few cuboids or spheres are all that are needed to be successful. Even when more challenging task environments have been explored (e.g. those investigated in [37] ), they employed morphologies composed of a small collection of cuboids and therefore the maximum complexity of their evolved morphologies was severely limited. In the current work, a variety of task environments with interesting properties are investigated, and morphologies with greater geometric detail are used, so it is possible to study the evolution of morphological complexity.

In this work organisms are evolved in a variety of simulated environments in order to better understand the role of the environment in shaping morphological complexity. While inspired by the above mentioned studies in which the morphologies and controllers of virtual organisms were also evolved [19] , [21] – [32] , the system presented here has several advantages which make it better suited for studying the evolution of morphological complexity.

Recently, we introduced a new method for evolving virtual organisms that is capable of producing a greater diversity of morphologies than previous systems [33] . By using it to evolve organisms with restricted nervous systems in a variety of environments it was possible to demonstrate how such a system could be used for investigating the relationship between environmental and morphological complexity. Here, the results of [33] are refined and extended to demonstrate that selection for locomotion tends to induce selection pressures favoring more complex morphologies than would be expected solely due to random chance, and is therefore a driven rather than passive trend [3] , [6] , [34] . In subsequent experiments we employ a multi-objective selection mechanism to select for simplicity in addition to behavioral competency. This selection mechanism filters out morphological complexity that arises due to biases in the underlying evolutionary model or because of genetic drift, and only allows for complexity that confers a selective advantage on the simulated organism. Moreover, this selection mechanism acts to impose a cost on complexity as is thought to occur in biological organisms [35] , [36] . Under this regime complex environments tend to induce selection for greater morphological complexity when compared to a simpler environment. This result supports the hypothesis that the environment plays an active role in determining morphological complexity.

Using in silico evolution to act on both the morphologies and nervous systems of simulated organisms or robots was first demonstrated by Sims [19] , and has since been followed by a number of other studies (e.g. [21] – [32] ). These studies employed a variety of experimental techniques, including different genetic encodings, morphological systems (such as branching structures or cellular aggregations), and evolutionary models. However, by constructing morphologies out of a relatively small number of geometric primitives, all of these studies were severely limited in the complexity of the morphologies which they could evolve, and therefore do not offer good test beds for investigating morphological complexity.

Previously, the evolution of complexity has been investigated in silico using an alternative computational model [20] . In that work, populations of computer programs competed among themselves for the energy required to execute their instructions and gained energy by executing specific logic functions. With their system, Lenski et al. were able to demonstrate how complex functional features may evolve and how these features depend on the programs' environment. However, in that system the programs did not have bodies with which to physically interact with their environment. On the contrary, the evolutionary model employed here evolves embodied virtual organisms with evolutionarily determined body plans in physically realistic simulation environments. This provides a testbed for investigating how environment may influence the complexity of evolving physical morphologies.

Another corollary of embodied cognition is that different environments will impose different selection pressures on the nervous systems and/or morphologies of organisms evolving in them. This can be studied by observing how organisms evolve in different environments. For instance, Passy [18] demonstrated that the morphological complexity of benthic colonial diatoms (measured as their fractal dimension) is significantly correlated with the variability of the environmental niches in which they are found. However, the biological evidence for a correlation between environmental and morphological complexity is sparse. This is in part because it is difficult to isolate systems where this may be studied effectively and to develop metrics that quantify morphological and environmental complexity. Ideally, it would be desirable to perform controlled investigations in which environmental complexity is under experimental control. Given enough time and resources it may be possible to carry out these investigations directly on living organisms. However, by performing experiments in silico, it is possible to do so with much greater speed and more precise control over experimental conditions. Specifically, by evolving virtual organisms [19] in physically realistic simulations, it is possible to faithfully model the relevant interactions between organisms and their environments.

As argued by proponents of embodied cognition, intelligent behavior emerges from the interplay between an organism's nervous system, morphology, and environment [10] – [14] . Therefore, if the ecological niche of a species remains constant and its body plan is evolutionarily constrained, then the neural system must adapt in order to succeed under this particular set of circumstances. This may be investigated experimentally through the use of evolving robots [15] , [16] which stand in for biological organisms. For instance, it has been demonstrated [11] , [17] that the complexity of an evolved neural system depends on the particular morphology it is controlling: in a given task environment certain morphologies can readily succeed with simple neural systems, while other morphologies require the discovery of more complex neural systems, or may prevent success altogether.

The “arrow of complexity” hypothesis [1] posits that the most complex products of open-ended evolutionary systems tend to increase in complexity over evolutionary time. Whether such a tendency exists is a long standing open question [2] – [6] . While it seems evident that more complex organisms exist today than at the advent of life, simple (single-celled) organisms continue to persist in large numbers, so it is clear that evolution does not guarantee complexity must increase. Moreover, loss of complexity has been observed in many species [7] – [9] . This begs the question: under what circumstances will complexity increase or decrease over evolutionary time? It is likely that particular environmental conditions are more likely to select for increased complexity than others, especially if this complexity comes at a cost.

Results/Discussion

In order to study the relationship between the morphological complexity of the virtual organisms and the task environments within which they evolve, evolutionary trials are conducted in each of 50 different environments. The first environment in which organisms are evolved is composed only of a uniform, flat, high friction ground surface (refer to Fig. 1a). The organisms evolved in this simple environment are considered control cases to compare against organisms evolved in other environments. Subsequent environments are more complex: they all consist of an infinite series of low friction rectangular solids over which an organism must locomote (see below for a characterization of this complexity). These “ice blocks” are constructed such that it is impossible for an organism to gain purchase by moving over their upper surfaces, but must instead reach into the gaps between the blocks to propel themselves forward in some fashion. This requires the evolution of morphologies with appropriate physical forms. Fig. 1 shows a sampling of these environments and virtual organisms that evolved within them.

The icy environments vary according to two parameters: the height of the blocks and the spacing between them. Each of these parameters varies from 0.025 meters to 1.6 meters exponentially for a total of different environments. These two parameters and the their exponential scaling are employed in order to produce a variety of qualitatively different environments that roughly approximate natural surfaces, but yet are also amenable to analysis and efficient simulation. There are certainly many ways in which the environments could be created to more closely approximate natural terrain, and there are many other factors which could influence the complexity of an environment, however the parameterization employed here provides a set of environments within which it is largely possible to evolve organisms capable of successful locomotion with the bare minimum of neural complexity. This allows for isolating the influence of environment on morphological complexity, which is the property of interest in this study (see Conclusions for further discussion).

For each icy environment, 100 evolutionary trials are conducted in that environment and a corresponding 100 evolutionary trials are conducted in the control environment (for a total of evolutionary trials; see Methods for details). Fig. 3 reports the mean distance that the best individuals from each trial traveled (computed across the 100 independent trials) in each icy environment. This figure demonstrates that there is a clear relationship between the environmental parameters and the difficulty of the task. Specifically, moving to the lower right in Fig. 3, where both the spacing and the height of blocks are large, the task becomes increasingly difficult: the organisms all become trapped in the gaps between blocks. Keeping the spacing constant and decreasing the block height (moving left in Fig. 3) gradually eases the task: the organisms are able to navigate over these smaller blocks and displace themselves at least several body lengths. Once the height has been reduced to 0.025 meters the blocks are so short that the environment becomes very similar to flat ground, and in fact distances achieved by organisms in the lower left environments are not significantly different from those of the control environment.

PPT PowerPoint slide

PowerPoint slide PNG larger image

larger image TIFF original image Download: Figure 3. Mean distance achieved in each environment. This plot shows the mean distance achieved by the final generation champion taken across the 100 independent trials of CPPN-NEAT in each of the 49 icy environments. For comparison, the mean distance achieved across all 4900 independent trials in the control environment is 7.32 meters. https://doi.org/10.1371/journal.pcbi.1003399.g003

As the spacing between the blocks is reduced (moving upward in Fig. 3) the organisms are no longer able to behave as they would on flat ground, but instead must find ways to move along the tops of the blocks while finding a means of gaining purchase by reaching into the gaps. The height of the blocks loses importance in this part of the parameter space but still has an effect (though opposite to when the spacing is large). Here the general pattern is for taller blocks to make the task easier, because taller blocks provide more voluminous gaps which more easily support a variety of ways to gain purchase. Finally in the top row of Fig. 3, when the spacing is smallest, block height ceases to have much of an impact because however narrow an organism's appendages are they can only reach a short distance into the gaps.

For a better understanding of how the evolved organisms behave in each of these environments it is helpful to observe their behavior. For this purpose, sample videos of evolved organisms are available in the Supplementary Material (Videos S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11, S12, S13, S14, S15).

Quantifying Complexity It is clear that different environments in this parameterization present the evolutionary system with varying degrees of difficulty, but the question now becomes: how does environment influence the evolution of morphological complexity? There are many approaches to quantify the complexity of an evolved morphology. Commonly, the variability of part types such as the number of cell types [41] has been used to measure the morphological complexity of biological organisms. But, the parts under consideration may vary in scale from organelles [42] to limbs [43], and it is unclear what should be considered a part in the current work. More geometric measures describing how space-filling a morphology is could also be employed (see Text S1 and Figure S2). Alternatively, a morphology's surface area to volume ratio could be measured, or its concavity could be computed (e.g. by taking the ratio of a morphology's volume to that of its convex hull). However each of these measures may be deceived by relatively simple body shapes, such as those that are very flat or contain large, simple concavities (e.g. a ‘C’ shape). Instead, it is useful to think about the complexity of a body plan in information theoretic terms. One commonly used measure of complexity is Shannon's Entropy [44], which measures the uncertainty of a random variable. Recent work [45], [46] has demonstrated how Shannon Entropy can be applied to measure the complexity of a 3D object by considering the curvature of the object as a random variable. This means that in order to have higher complexity it is necessary to have more angles (regions of non-zero curvature) that can not simply be a repeating pattern, exactly what humans would think of as more complex shapes. And in fact, quantifying the complexity of 3D objects in this way has been shown to strongly correlate with human observers' notions of complexity [46]. In this work, the complexity of an organism's morphology is computed as the quantity which is the morphology's entropy of curvature or, in terminology which may be more familiar to biologists, it is the Shannon diversity [47] of the curvature on the organism's exterior (see Methods for details). Does capture the complexity of evolved morphologies? To answer this question, is calculated for all 9800 best-of-trial virtual organisms from all environments (icy and control). Out of those 9800, the five morphologies with the smallest value and the five morphologies with the largest value are selected. Images of these morphologies are shown in Fig. 2. Looking at these two sets of morphologies, those with high values appear more complex than those with low values. In light of this observation and the previous work in this area it is concluded that successfully captures morphological complexity. Similarly, the concept of entropy may also be applied to characterizing the complexity of an environment. In the current formulation, environments are differentiated by variability in surface friction and terrain elevation. In the flat ground environment both the height of the terrain and the surface friction are uniform throughout, thus conveying zero entropy. On the other hand, in all of the icy environments there is variability in both of these properties. The surface friction is low on the ice blocks, but high on the ground between them. Likewise, the terrain is one height on the blocks and another in the intervening space. Therefore each of the icy environments has non-zero entropies of friction and elevation and so is considered to be more complex than flat ground. However, since each icy environment consists of a uniform series of ice blocks, the relative complexity between these environments is not considered.

Changes in Complexity over Evolutionary Time Armed with these measures, it is now possible to characterize how different environments influence the morphological complexity of evolving organisms. In order to understand the evolutionary pressures which lead to virtual organisms that are more or less morphologically complex, it is interesting to consider how morphological complexity varies over evolutionary time in different environments, and how these changes correspond to variations in fitness. Towards that goal, Fig. 4 depicts the mean morphological complexity and mean displacement of the current best individual over evolutionary time for each of several icy environments along with a corresponding set of control trials. Here it can be seen that morphological complexity tends to increase over time along with fitness. This means that in these environments selection for locomotion corresponds to an increase in complexity. PPT PowerPoint slide

PowerPoint slide PNG larger image

larger image TIFF original image Download: Figure 4. Sample complexities and fitnesses over evolutionary time. This plot depicts morphological complexity ( ) and fitness (displacement) over evolutionary time for three sample icy environments (left: spacing 0.025, height 0.05, middle: spacing 0.025, height 0.8, right: spacing 0.2, height 0.8) along with their corresponding set of trials from the control environment. For the icy environments morphological complexity is plotted in blue and displacement is plotted in red. For the corresponding trials in the control environment morphological complexity is plotted in black and displacement is plotted in green. Solid lines denote means (taken across all best-of-generation individuals from all trials in the set) and dotted lines denote one unit of standard error. https://doi.org/10.1371/journal.pcbi.1003399.g004 However, it is unclear whether this increase of complexity is the result of a passive or a driven trend [3], [6], [34]. Passive trends may result from envelope expansion without any directional bias. For example, if there is a minimum level of complexity necessary for success, but no upper bound, then both the mean and the maximum complexity of the population will increase over time simply due to random variation (what Stephen Jay Gould famously referred to as a “drunkard's walk” [9]). On the other hand, driven trends exhibit a consistent, directional bias. This corresponds to active selection for greater complexity. In this case not only will there be an increase in mean and maximum complexity, but the minimum level of complexity will increase over evolutionary time as well.

Neutral Shadow Model When looking only at how morphological complexity varies over evolutionary time it is unclear what change in complexity is due to selection pressure from the environment and what change is due to biases towards increasing complexity within the evolutionary model itself and/or the general tendency of evolutionary systems to produce increasing complexity in the absence of selection [48]. In order to separate the influence of these factors it is useful to compare the evolving populations to a neutral shadow model [49], [50]. For a generational evolutionary model, such as that employed here, a neutral shadow of a given experiment is equivalent to re-running the evolutionary model with the same parameters but with random selection. Fig. 5 shows how the morphological complexity of organisms evolved in flat ground (black), as well as all icy environments (blue), changes over evolutionary time compared to those evolved in 100 independent trials using random selection (purple) in which the only preference is for genomes that produce valid morphologies (so that there exists a morphology for which complexity can be calculated; see Methods). It is known that the evolutionary system employed here [40] has an inherent bias to increase genotypic complexity over evolutionary time. The increasing purple curve in Fig. 5 indicates that there exists a bias to produce more complex morphologies over time as well. In fact, random selection alone produces morphologies that are more complex than those selected in any of the environments investigated. However, this comparison is not entirely fair. At any given generation, individuals in the random selection experiments will be the end product of many more reproduction (mutation and crossover) events than the corresponding individuals evolved for displacement, because under random selection it is unlikely that any individual will persist in the population for very long. Therefore, individuals in the random selection experiments will have had many more opportunities to increase the complexity of their genomes and hence the complexity of their morphologies. PPT PowerPoint slide

PowerPoint slide PNG larger image

larger image TIFF original image Download: Figure 5. Complexity over evolutionary time versus neutral shadows. This plot compares morphological complexity ( ) over evolutionary time for all single-objective experiments in the control environment (black) and all icy environments (blue) along with several neutral shadow models. Solid lines denote means (taken across all best-of-generation individuals from all trials in that environment) and dotted lines denote one unit of standard error. The purple line depicts the naïve shadow model: completely random selection except for a preference for valid morphologies. The remaining lines depict the alternate shadow models with reproduction depths matched to the two real evolutionary experiments (see Text S1 for details). Yellow = shadow model a matched to the control environment, green = shadow model a matched to an icy environment, red = shadow model b matched to the control environment, and gray = shadow model b matched to an icy environment. https://doi.org/10.1371/journal.pcbi.1003399.g005 In order to correct for this discrepancy in the number of reproduction events, alternative shadow models are employed. Specifically, neutral shadow models of both the flat ground experiments and a representative icy environment (spacing 0.025, height 0.8) are created, which control for the number of reproduction events leading to the individuals in the current population. In each of the 100 independent trials evolving for locomotion in both of these environments, a record of every reproduction event is kept, and alternative shadow models are created for each trial such that they maintain the same rate of reproduction. These shadow models are detailed in Text S1. All model alternatives have similar complexity curves (see yellow, green, red and gray lines in Fig. 5) indicating that this shadow formulation is robust to whichever alternative is employed. Qualitatively they both show a much slower increase in morphological complexity (especially early on in evolution) compared to the experiments selecting for displacement, and so contrary to the naïve shadow model, both flat ground and icy environments select for increased morphological complexity beyond what would be expected in a neutral model. This implies that greater morphological complexity is being actively selected for in these environments: there is a driven trend towards increased morphological complexity.