The Big Picture

Many effective and innovative survival mechanisms used by natural organisms rely on the capacity for phenotypic plasticity; that is, the ability of a genotype to alter how it is expressed based on the current environmental conditions. For programmers, implementing a 'phenotypically plastic' program is as simple as using conditional logic to ensure that the program behaves appropriately given certain conditions. It is less obvious how biological evolution develops phenotypic plasticity.

The Question

What is the step-by-step process by which phenotypic plasticity evolves? Are there recurring themes as evolution moves from non-plastic to more plastic strategies?

The Approach

If we want to observe the evolution of phenotypic plasticity step-by-step (mutation-by-mutation), we need a study system that we can extract high-resolution, historical genotype/phenotype data; this is something that would normally be quite difficult to do using biological systems. But, it turns out that computational evolution gives a great tool to ask questions about evolutionary processes, allowing us to record and analyze every mutation that occurs in a population of 'digital' organisms.

Study System

Here, we used the Avida Digital Evolution Platform to evolve phenotypically plastic digital organisms. Digital organisms in Avida are self-replicating computer programs whose genomes consist of instructions from a Turing-complete instruction set. Digital organisms in Avida compete for resources in a grid (a toroidal one in this case) by performing computational tasks. See below for a diagram of an organism in Avida.



We evolved digital organisms in several environments under conditions known to lead to the evolution of phenotypic plasticity: (1) populations are exposed to temporally or spatially varying environments, (2) different environments favor different phenotypes, (3) no single phenotype exhibits high fitness across all environments, and (4) environments are differentiable by reliable signals. We also show a control environment where we keep the environment constant, expecting no plasticity to evolve.

More specifically, we evolved organisms in several temporally changing environment ( shown by the environment indicator bar on the 'y-axis'). In all environments, organisms were rewarded for performing the logical operations NAND and NOT. However, in all environments except the control, things were not so simple. In each of the experimental environments, sometimes NAND would be punished while NOT was rewarded and sometimes NOT would be punished while NAND was rewarded. This created selection pressure for organisms to since which environment they were in and to express the appropriate operation while surpressing the 'poison' operation. Check out the environment indicator bar in the visualization to see how the environments changed through the experiment. Below is a diagram of how environments changed.


The environments we tested included (explore data for each environment using environment selector on visualization dashboard):

  • Baseline Environment
  • High Mutation Rate Environment: relative to Baseline environment, this environment has an high mutation rate.
  • Low Mutation Rate Environment: relative to the Baseline environment, this environment has a low mutation rate.
  • Rapidly Changing Environment: relative to the Baseline environment, this environment changes rapidly (twice as fast as the baseline environment).
  • Slowly Changing Environment: relative to the Baseline environment, this environment changes slowly (the Baseline environment changes twice as fast as this environment).
  • Control Environment: this environment does not change.

Each environment type has different effects on the evolution of plasticity. In some cases, the visualization shows an alternative, bet-hedging strategy evolve to deal with the changing environment. In environments where plasticity does evolve, we see that unconditional traits tend to evolve first; next, imprecise forms of phenotypic plasticity often appear before optimal forms finally evolve.

Okay, but what is this visualization?

To explore how phenotypic plasticity evolved in our experiments, we take a look at the final population of a given replicate, or run of evolution, and pick out the dominant organism. We then trace that organism's ancestral lineage all the way back to the original organism we used to seed the replicate.

Once we have a lineage, we can compute the phenotype of each ancestor along the lineage. Basically, we ask the question: what tasks do you do in each environment? There are 16 possible phenotypes across the two environments, see the legend for an enumeration of these phenotypes. Once we phenotype each ancestor, we can assign it a color-code, which lets us visualize lineages as sequences of phenotypes (the phenotypes of ancestors in the lineage).

Lineages of evolved genotypes are visualized as vertical bars where time (in updates) proceeds from top to bottom beginning with lineage's original ancestor genotype.

Phenotypic State Indication

Any given genotype on the lineage must express one of the sixteen possible phenotypes enumerated to in the legend. At each point in time, the color of the visualized lineage corresponds to the color representing the phenotype expressed by the lineage at that point in time. Hover your mouse over a phenotypic state in the visualization to see detail.

Environment Indication

The actual environmental conditions experienced by the evolving populations at each point in time are indicated by the color of the vertical axis. Hover your mouse over the environment axis to view details about the environment.


  • ENV-NAND - the NAND computational task is rewarded and the NOT task is punished
  • ENV-NOT - the NOT computational task is rewarded and the NAND task is punished
  • CONTROL-ENV - both the NAND and the NOT computational tasks are rewarded


The source code for this visualization can be found:

Talk to me!

Is this visualization neat? Do you want to use something like it for data you might have? Or, have I explained something poorly, and there's something you don't understand?

Contact me!

Feel free to shoot me an email or get into contact with me about it! I'd love get some feedback: Contact Me Page

Enumeration of all possible phenotypic states. Each row represents a distinct phenotype. A green 'X' indicates that the associated task is performed in the specified environment, while a red '--' indicates that the task is not performed. For each environment, the column of the rewarded task is highlighted in green, and the column of the punished task is highlighted in red. A green 'X' in a green column or a red '--' in a red column is optimal. Each phenotype has a color code, which is used the visualization below. Note that the first four rows are non-plastic phenotypes, rows 5-8 exhibit partially beneficial plasticity, and row 9 is optimally beneficial. Rows 10-11 are mostly neutral, while rows 12-16 are detrimental forms of plasticity.


Plastic Only Non-plastic Only All