WARNING! This page is out-of-date. Go here for the latest versions.
The applet runs slowly when your mouse pointer is within the area, quickly when it is outside. This is so you can slow things down if you want to.
This applet is an approximate simulation of DNA replication. Each coloured square is a molecule, the black lines represent a chemical bond between two molecules. Each molecule moves around at random, with the restriction that bonds cannot extend more than a certain distance. Simple chemical rules determine when bonds are formed and when they are broken (reactions). The effect of these reactions is to cause the string of coloured squares to replicate itself repeatedly, as long as there are sufficient free molecules available.
This code grew out of earlier work on mobile cellular automata and through discussion with Daniel LaLiberte and others on the Primordial Life discussion group.
The aim is to create a chemistry that permits robust, adaptable self-replicators. If it can be shown that self-replicators with varying fitness can exist, then in the presence of mutations and under the pressures of natural selection, evolutionary processes should be observed.
Get involved! You can have the source code for this if you want. Some details about how Squirm3 works are below.
21st August 2001
This is Variant5
<< back to variant 4 --- on to variant 6 >>
Variant 5 is a new chemistry. The original chemistry required a 2x2 neighbourhood to operate in - the molecules within that area and their bonds formed the preconditions for the reactions, which could change the states or bonds within the same area. This is perhaps not ideal, the question was raised whether it was possible to create a chemistry based on reactions involving only pairs of molecules that would still support self-replication.
It turns out that the answer is yes. More states are needed and sometimes reactions occur that interrupt replication but it works. Here is the first reaction:
R1: e1 e0 => e4-e10ie. a molecule of type 'e' in state 1 that finds itself next to a molecule of type 'e' in state 0 forms a bond with it and changes to state 4, plus the other molecule changes to state 10.
Here are the others:
R2: x4-y1 => x2-y5 R3: x5 x0 => x7-x6 R4: x10 y6 => x3-y10 R5: x7-y10 => x4-y10 R6: f4-f10 => f8 f8 R7: x2-y8 => x9-y1 R8: x3-y8 => x9-y1 R9: x9-y9 => x8 y8 R10: e8-x1 => e1-x1
The replication sequence for a string such as e1-a1-b1-f1 proceeds as follows:
e1 e0 e4 - e10 e2 - e10 e2 - e10 e2 - e3 e2 - e3 | | | | | | | | a1 R1 a1 R2 a5 a0 R3 a7 - a6 R4 a7 - a10 R5 a4 - a10 | => | => | => | => | => | b1 b1 b1 b1 b1 b1 | | | | | | f1 f1 f1 f1 f1 f1
e2 - e3 e2 - e3 e2 - e3 e2 - e3 e3 - e3 | | | | | | | | | | R2 a2 - a10 R3 a2 - a10 R4 a2 - a3 R5 a2 - a3 R2 a2 - a3 => | => | => | | => | | => | | b5 a0 b7 - b6 b7 - b10 b4 - b10 b2 - b10 | | | | | f1 f1 f1 f1 f5 f0
e2 - e3 e2 - e3 e2 - e3 e2 - e3 e2 - e3 | | | | | | | | | | R3 a2 - a3 R4 a2 - a3 R5 a2 - a3 R6 a2 - a3 R7 a2 - a3 => | | => | | => | | => | | => | | b2 - b10 b2 - b3 b2 - b3 b2 - b3 b9 - b3 | | | | | | | | | f7 - f6 f7 - f10 f4 - f10 f8 f8 f1 f8
e2 - e3 e2 - e3 e2 - e3 e2 - e3 e2 - e3 | | | | | | | | | | R8 a2 - a3 R9 a2 - a3 R7 a9 - a3 R8 a9 - a9 R9 a8 a8 => | | => | | => | | => | | => | | b9 - b9 b8 b8 b1 b8 b1 b1 b1 b1 | | | | | | | | | | f1 f1 f1 f1 f1 f1 f1 f1 f1 f1
e9 - e3 e9 - e9 e8 e8 e1 e8 e1 e1 | | | | | | | | | | R7 a1 a8 R8 a1 a1 R9 a1 a1 R10 a1 a1 R10 a1 a1 => | | => | | => | | => | | => | | b1 b1 b1 b1 b1 b1 b1 b1 b1 b1 | | | | | | | | | | f1 f1 f1 f1 f1 f1 f1 f1 f1 f1
This is rather long and complex, taking a total of 25 reactions. However, since each reaction involves only a pair of molecules rather than a whole set being in the right place at the right time, the whole sequence is much quicker, the self-replicators spread themselves faster. (Note that this is not an evolutionary advance in the biological sense, we have changed the fundamental chemistry.)
As with the previous chemistry, this self-replication sequence can occur to any string of a1's, b1's, c1's and d1's that is capped by an e1 and an f1.
Interestingly, if you let the simulation run with these ten reactions, soon different forms become visible. The chemistry as set out above allows not only for self-reproduction but also mutation. Since the reactions depend only on two molecules being of the right type and state and being next to each other, a wide range of circumstances other than the neat self-replication as laid out above are possible.
One obvious occurance is when R4 (which bonds x10's and y6's) takes place where the molecules involved are not part of the same creature. This will join the two creatures together and interrupt their replication cycles but it may also create previously unseen pairs such as an x9-x10 bond that when part of a certain sequence might trigger off an unexpected result. This kind of process reflects the real world, where chemical reactions happen if the local situation is right, irrespective of the wider context.
However, only certain mutations can occur with this method of implicit copying error. Further mutation mechanisms (cosmic rays?) would have to be introduced to get evolution progressing any further.
29th August 2001