This entire notebook is licensed under a Creative Commons Attribution 3.0 Unported License.
In this 2003 paper, Richard Lenski et al. explored one of the most pressing questions in evolutionary theory: How do complex traits evolve?
Charles Darwin’s theory of evolution, including its intertwined hypotheses of descent with modification and adaptation by natural selection, is widely regarded as one of the greatest scientific achievements of all time. From the outset, Darwin realized that “organs of extreme perfection and complication”, such as the eye, posed a difficulty for his theory. Such features are much too complex to appear de novo, and he reasoned that they must evolve by incremental transitions through many intermediate states, sometimes undergoing changes in function. There now exists substantial evidence concerning the evolution of complex features that supports Darwin’s general model. Nonetheless, it is difficult to provide a complete account of the origin of any complex feature owing to the extinction of intermediate forms, imperfection of the fossil record, and incomplete knowledge of the genetic and developmental mechanisms that produce such features.
The paper is free to download here: http://myxo.css.msu.edu/papers/nature2003/Nature03_Complex.pdf
Digital evolution is a powerful tool for studying populations as they evolve. In this study, Lenski et al. used the digital evolution platform Avida to study the evolution of a specific complex feature in the populations.
In this section, we're going to familiarize ourselves with Avida and retrace the steps of Lenski et al. in the complex features experiment.
Before you can build Avida, you need to install CMake on the EC2 node:
wget http://www.cmake.org/files/v2.8/cmake-2.8.12.tar.gz
tar zxvf cmake-2.8.12.tar.gz
cd cmake-2.8.12/
./bootstrap
make
make install
cd ~/
Download the latest zipped source code, unzip the file, and navigate into the base Avida directory on the command line.
wget http://downloads.sourceforge.net/project/avida/avida-stable/2.12.4/avida-2.12.4-src.zip
unzip avida-2.12.4-src.zip
cd avida-2.12.4-src/
To build Avida, just use the build Avida command:
./build_avida
It may take up to a few minutes to fully build Avida. The build program will keep you updated while it builds.
Once everything is built, navigate into the ~/avida-2.12.4-src/cbuild/work
directory. This directory contains several important Avida components, explained below.
For the most part, we will only be working with the avida-viewer
executable and the environment.cfg
configuration file.
The first step in an Avida experiment is setting up the avida.cfg
file. To replicate the complex features experiments, we need to change a few of the default settings. Find and change the following settings:
COPY_MUT_PROB
and change it to 0.0025
See the configuration file documentation for more information about the Avida configuration file.
These experiments also require us to edit the environment.cfg
file. Open this file and you should see the following:
REACTION NOT not process:value=1.0:type=pow requisite:max_count=1
REACTION NAND nand process:value=1.0:type=pow requisite:max_count=1
REACTION AND and process:value=2.0:type=pow requisite:max_count=1
REACTION ORN orn process:value=2.0:type=pow requisite:max_count=1
REACTION OR or process:value=3.0:type=pow requisite:max_count=1
REACTION ANDN andn process:value=3.0:type=pow requisite:max_count=1
REACTION NOR nor process:value=4.0:type=pow requisite:max_count=1
REACTION XOR xor process:value=4.0:type=pow requisite:max_count=1
REACTION EQU equ process:value=5.0:type=pow requisite:max_count=1
Each REACTION
line specifies a logic task, such as NOT
, that a digital organism can perform to receive merit. This process is akin to an organism metabolizing a resource and thus receiving energy from it. The more merit a digital organism receives, the more energy it has to perform other tasks during its lifetime, such as replicating itself.
process:value=2.0:type=pow
specifies how much merit the digital organism receives for performing that task. In this case, the digital organism receives $2^2$ merit for performing the task. See the Avida environment documentation for more settings: http://devolab.cse.msu.edu/software/avida/doc/environment.html
Finally, requisite:max_count=1
specifies the maximum number of times a digital organism can perform the task in its lifetime.
In this homework, we will repeat the experiments that Lenski et al. performed to study the evolutionary origin of complex traits. Here, the complex trait is the EQU
task, which is the most difficult task that digital organisms can perform in Avida. Conveniently, EQU
can be performed by combining a sequence of simpler logic tasks. Thus, EQU
is akin to a complex trait that is composed of simpler, seemingly unrelated traits.
EQU
task. Modify environment.cfg
to reflect this setting by removing all of the REACTION
lines except the EQU
reaction. The file should look like this:REACTION NOT not process:value=0.0:type=add requisite:max_count=1
REACTION NAND nand process:value=0.0:type=add requisite:max_count=1
REACTION AND and process:value=0.0:type=add requisite:max_count=1
REACTION ORN orn process:value=0.0:type=add requisite:max_count=1
REACTION OR or process:value=0.0:type=add requisite:max_count=1
REACTION ANDN andn process:value=0.0:type=add requisite:max_count=1
REACTION NOR nor process:value=0.0:type=add requisite:max_count=1
REACTION XOR xor process:value=0.0:type=add requisite:max_count=1
REACTION EQU equ process:value=5.0:type=pow requisite:max_count=1
Now, run Avida in visualization mode by entering ./avida-viewer
in the command line. Watch the population evolve for 100,000 updates. If you press S
, you can see what tasks the digital organisms are currently performing. Press M
to return to the map view.
Do any of the digital organisms evolve to perform the EQU
task? Why or why not? What happens when you repeat the experiment a few more times?
environment.cfg
to reflect this setting by adding back all of the REACTION
lines. The file should look like this:REACTION NOT not process:value=1.0:type=pow requisite:max_count=1
REACTION NAND nand process:value=1.0:type=pow requisite:max_count=1
REACTION AND and process:value=2.0:type=pow requisite:max_count=1
REACTION ORN orn process:value=2.0:type=pow requisite:max_count=1
REACTION OR or process:value=3.0:type=pow requisite:max_count=1
REACTION ANDN andn process:value=3.0:type=pow requisite:max_count=1
REACTION NOR nor process:value=4.0:type=pow requisite:max_count=1
REACTION XOR xor process:value=4.0:type=pow requisite:max_count=1
REACTION EQU equ process:value=5.0:type=pow requisite:max_count=1
Again run Avida in visualization mode by entering ./avida-viewer
in the command line. Do any of the digital organisms evolve to perform the EQU
task after 100,000 updates? What happens when you repeat the experiment a few more times?
What do the results from #1 and #2 imply for the evolution of complex features?
For one of the runs that had a digital organism evolve to perform the EQU
task, plot the task performance of the population over time. The tasks performance is stored in data/tasks.dat
. Did certain tasks evolve before other tasks? If you repeat this several times, does it seem like certain tasks must evolve before the EQU
task?
For one of the runs that had a digital organism evolve to perform the EQU
task, plot the average fitness of the population over time. The average fitness is stored in data/average.dat
. Can you tell when certain tasks evolved by looking at the average fitness plot?