I would like to introduce Thomas S. Ray, an ecologist who created and developed the Tierra project, a computer simulation of artificial life.
Project Tierra is based on the idea of replication, which is the rule of thumb for being alive. These living beings code their protein sequences in binary, like a bacteria codes them using twenty different types of amino acids (you can think of it as a base-20 coding system). These beings fight for resources such as processing power and memory, just like the animals fighting for food and shelter. They are attacked by parasites, exposed to random mutations, leave offsprings, evolve, and die. At the end of the day, natural selection decides which beings will live on, i.e., keep their addresses in the memory, and which ones will die out, i.e., simply will be deleted.
In order to internalize how something works, you need to code it. Coding gives you the opportunity to understand how things will turn out in practise. But more importantly, if things doesn’t work out as expected, it helps you to see why. This is the main motivation for Ray and his research team : “We cannot fully define and understand what life is, but we won’t be able to understand it further if we don’t try to simulate it either.”
At this point, we have to mention the pioneer on this subject, Christopher Langton, who is an American computer scientist and one of the founders of the field of artificial life. he developed several key concepts and quantitative measures for cellular automata[1] (CA) and suggested that critical points separating order from disorder could play a very important role in shaping complex systems, particularly in biology [2]. He is also the founder of the problem Langton’s ant [3], which is an informative example to interpret the concept of CA and what Langton suggests. Imagine a plane divided into identical squares, which will be called cells, and each cell has finite number of states. States of these cells are updated according to a static rule. In the problem of Langton’s ant, each cell has two states : they can either be black or white. The ant starts from a random cell, looking at a random direction, and all cells are considered to be white at time zero. If the ant is at a white cell, it turns 90º right, flips the color of the cell, and moves forward to the next cell. If the ant is at a black cell, it turns 90º left, again flips the color of the cell, and moves forward to the next cell. These are the two and only rules for this CA. You can see the behaviour of this ant in the animation below. Even the ant seems to be governed by very simple set of rules, the outcomes of this behaviour is fascinating.
The ant converges to this repetitive highway independent of the initial cell and direction, which were chosen randomly. This emergent behaviour - which cannot be proven to converge to a highway eventually - is the best proof for Langton’s argument : critical points separating order from disorder could play a very important role in shaping complex systems.
For those who are interested in generating this image by themselves, I’ve attached the MATLAB code for a quick simulation of this CA at the end of this post.
You can also check the software Avida, a product of project Tierra, which serves like a petri dish that you can watch your binary bacteria grow, replicate, mutate, and evolve.
There are tons of things to read, discuss, and write about life, natural selection, and evolution. But even though we have a long way to go, trying to code life, I guess, is the perfect starting point.
% SIMULATION FOR LANGTON'S ANT % clear all;clc; S = 200; plane = ones(S); head = 1; % DIRECTION OF THE ANT % 1 = up % 2 = down % 3 = right % 4 = left mag = 200; %image magnification scale it = 0; %number of iterations ant = [randsample(30:50,1) randsample(50:70,1)]; %assign randomly initialPt = ant; while it<1e6 old_ant = ant; if plane(ant(1),ant(2))==1 % turn left if head==1 ant(2)=ant(2)-1; head =4; elseif head==2 ant(2)=ant(2)+1; head =3; elseif head==3 ant(1)=ant(1)-1; head =1; else ant(1)=ant(1)+1; head =2; end elseif plane(ant(1),ant(2))==0 %turn right if head==1 ant(2)=ant(2)+1; head =3; elseif head==2 ant(2)=ant(2)-1; head =4; elseif head==3 ant(1)=ant(1)+1; head =2; else ant(1)=ant(1)-1; head =1; end end plane(old_ant(1),old_ant(2)) = 1-plane(old_ant(1),old_ant(2)); it = it+1; if ant(2)>S || ant(2)==0 imshow(plane,'InitialMagnification',mag) break; elseif ant(1)>S || ant(1)==0 imshow(plane,'InitialMagnification',mag) break; end end hold on; plot(initialPt(1),initialPt(2),'r*') plot(old_ant(2),old_ant(1),'b*') legend('Initial Position','Final Position')