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.
Tim Hutton
21st August 2001
move on to variant 1 >>
Some molecules have bonds between them that limit their movement.
Here are the first two reactions, together they are sufficient to duplicate a string of genetic information such as e1-a1-b1-f1 as we will see afterwards. Any string composed of a sequence of a's, b's, c's and d's with an 'e' at one end and an 'f' at the other will replicate itself.
e1 e0 e2 - e3 | => | x1 x1 | A molecule of type 'e' is in state 1 (hence e1) and has a bond with a molecule of type 'x' (any type) also in state 1 (x1). Next to e1 is an unconnected molecule e0 (type 'e' in state 0). When this situation occurs, the reaction shown happens. The molecule e1 changes to state 2 (becoming e2), while the e0 molecule changes to state 3. A bond is created between the two 'e' molecules. R1 is responsible for starting the chain of duplication. |
y2 - z3 y2 - z3 | => | | x1 x0 x2 - x3 | The letters x,y,z are variables standing for any of the valid types. For R2 to occur, a molecule in state 1 (x1) must be next to a molecule of the same type in state 0 (x0). Also, x1 must be connected to (have a bond with) a y2, which in turn must be bonded to a z3, which must be next to the x0. R2 ensures that the genetic information is duplicated, since the free molecule x0 must be of the matching type for this reaction to occur. |
This is how the replication sequence might proceed:
e1 e0 e2 - e3 e2 - e3 e2 - e3 e2 - e3 | | | | | | | | a1 R1 a1 R2 a2 - a3 R2 a2 - a3 R2 a2 - a3 | => | a0 => | => | | => | | b1 b1 b1 b0 b2 - b3 b2 - b3 | | | | | | f1 f1 f1 f1 f0 f2 - f3Note that the process relies on free molecules (e0, a0, b0, f0) being in the right place and thus is typically quite slow.
For replication to repeat, the two strings need to split. Reactions R3 and R4 permit this.
x2 - y3 x1 y1 | | => | | f2 - f3 f1 f1 | R3 lets the bottom of the string-pair split. Note that this can only happen when the whole string has been duplicated, ending with the final 'f' molecule. |
x2 - z3 x1 z1 | | => | | y1 w1 y1 w1 | The split continues up the string-pair, returning the two halves to state 1. |
Here is an example of the splitting in action:
e2 - e3 e2 - e3 e2 - e3 e1 e1 | | | | | | | | a2 - a3 R3 a2 - a3 R4 a1 a1 R4 a1 a1 | | => | | => | | => | | b2 - b3 b1 b1 b1 b1 b1 b1 | | | | | | | | f2 - f3 f1 f1 f1 f1 f1 f1These reactions can happen immediately after each other, the strings very quickly unzip themselves.
The other mechanism for evolution to occur is variability, the next three rules allow for this.
x2 - w3 x2 - w3 | => \ y1 - z1 y0 z1 | This reaction occurs only with low probability, P(R5). If R5 occurs, the gene y1 is lost from the replicating sequence. Typically this will give a string that replicates at a quicker rate but it may remove essential functionality. |
x2 - w3 x2 - w3 | => \ y1 z0 y1 - z1 | Reaction R6 also happens with low probability, P(R6). If R6 happens, the free molecule z0 is incorporated into the gene string, lengthening it. This will typically slow down the replication rate of this string but may add unexpected functionality. |
x2 - w3 x2 - w3 | => | | y1 z0 y2 - z3 | Again, R7 only happens with low probability, P(R7). If R7 happens, the free molecule z0 is copied into the gene string even though it may not match its pair, y1. |
We have demonstrated several things, the strings are:
What we would like to demonstrate:
Did I say get in touch already? Get in touch!
Tim.