esolang

Stringmol

An artificial chemistry where molecules are programs. Two strings bind if they roughly match, and then one runs as a microprogram over both.

Simon Hickinbotham, Susan Stepney and colleagues, 2009 · Turing complete: unknown · ●●● hard

The idea

Stringmol comes from Susan Stepney's group at the University of York. It was first presented as "Molecular microprograms" at ECAL 2009 and specified as "stringmol" in 2010 technical reports.

Read the story

Its complaint about Tierra, Avida and Nanopond is that the organism is one program on a fixed little CPU, and the CPU never evolves. Stringmol's answer is to make the machinery molecular. A cell is a bag of string molecules. Molecules bump into each other at random. When two bind, they form a reaction, and one string executes as a program that can read, write and cut both strings.

There is no split between genotype and phenotype, or between program and data: a molecule's sequence decides both who it binds to and what it does when it does.

The machine

Strings use 33 symbols: the 26 letters A to Z, which do nothing when executed and serve as templates, and seven function codes:

CodeNameDoes (roughly)
$searchMove a pointer to the best match for the template that follows
>moveMove a pointer to where the flow pointer is
^toggleSwitch a pointer over to the partner molecule
?ifSkip one or two symbols, depending on a test
=copyInsert at the write pointer a copy of the symbol at the read pointer
%cleaveCut a string, releasing a new molecule
}endStop, and break the bond

A reaction has four pointers: instruction, flow, read and write. Each can sit on either of the two bound molecules. Letters right after a function code modify which pointer it uses.

Binding is soft. Every symbol has a complement. Two molecules bind with a probability that comes from a Smith-Waterman alignment, the algorithm biologists use to compare gene sequences, between one string and the complement of the other. A perfect match binds for sure; a poor one, rarely. Each step and each binding attempt costs energy, and molecules decay.

Example

There is no small example; the binding rules and scoring tables are too big.

There is no small example; the binding rules and scoring tables are too big. The hand-designed replicase from the 2010 specification has eight working regions plus a stretch of junk, and none of them is marked off; they are just runs of symbols:

RegionsRole
1 and 2Binding sites, complementary to each other, so two replicases can bind
3, 4 and 8Set up the read, write and flow pointers (read on the partner, write at the end)
5The copy loop: = copies one symbol of the partner, then test and loop
6 and 8Move the flow pointer to the end of the executing molecule
7% cleaves off the new molecule, } ends the reaction
junkDoes nothing, but its length sets how fast the molecule decays

In "invasion when rare" runs, the authors added a single mutant whose binding sites matched perfectly. In 88 of 100 runs it replaced the original replicase completely.

In 2017, Clark, Hickinbotham and Stepney evolved a universal constructor architecture in a Stringmol chemistry: a genome, a copier and a constructor, all made of molecules and all evolving at once, with the meaning of the genome itself drifting.

Patterns it teaches

Try this

  1. Why do the template letters do nothing when executed? What would go wrong for evolution if every symbol were an instruction with side effects?
  2. Write a scoring rule for "soft" binding between two short strings by hand: one point per matching complement, minus one per mismatch. Which single mutation hurts binding most?

Further

  • Hickinbotham et al., "Molecular microprograms", ECAL 2009, LNCS 5777.
  • Hickinbotham et al., "Specification of the stringmol chemical programming language version 0.1", York technical report YCS-2010-457.
  • Clark, Hickinbotham and Stepney, "Semantic closure demonstrated by the evolution of a universal constructor architecture in an artificial chemistry", J. R. Soc. Interface (2017).

Also in Artificial life