Chemart chemart
The chemistries of Banzhaf & Yamamoto's Artificial Chemistries, built into the chemart library.
Repos · 70
Run this one backwards from the others: instead of building a chemistry, it reads one out of a program. The registers of a virtual machine are the species, so an instruction like r3 <- r1 op r2 is read as the reaction r1 + r2 -> r3, and the instructions are drawn in random order…
The chemistry that gave the field its vocabulary. Molecules are lambda-expressions in normal form, and a collision applies one to the other: s1 + s2 -> s1 + s2 + normal_form(s1 applied to s2). Both reactants survive, so every molecule is simultaneously a function and a datum for…
Concentrations used as analog numbers. Pick reactions whose steady state satisfies the algebraic relation you want, then read the answer off the output species once it settles: X -> X + Y together with 2Y -> nothing balances at y = sqrt(k1 x / 2 k2), so a square root falls out o…
The simplest possible rewriting chemistry: a bag of symbols and a list of rules like 'aaa -> c' or 'a -> abba'. Everything interesting comes from how the rules are applied. Rules that enlarge a molecule are called heating and rules that shrink it cooling, and the order they are …
The cheapest constructive chemistry that still does something interesting. Molecules are 32-bit words, and a collision treats the first word as a finite automaton that consumes the second and emits a third: s1 + s2 -> s1 + s2 + A_s1(s2). Both reactants survive, so every string i…
The model that named computational autopoiesis. A lattice holds substrate, a catalyst and links. The catalyst turns two neighbouring substrates into a link; links bond to adjacent links into chains; and links spontaneously decay back to substrate. Nothing tells the system to bui…
What Kauffman's autocatalytic sets look like once you give them kinetics. Polymers split and join, and any polymer can catalyse a reaction, multiplying both directions of it. Run in a chemostat - food flows in, everything washes out - and mass concentrates onto a small mutually-…
A random reaction network built to be thermodynamically honest. Each abstract chemical gets a random free energy of formation; reactions are drawn as association, dissociation and transformation steps, and every backward rate is then computed from the forward one so detailed bal…
Reactivity that is not declared but *measured*. Each atom is a small one-dimensional cellular automaton, and its type is the Wolfram rule that runs it. To decide whether two atoms bond, you let their dynamics settle and read an emergent property - the mean polarity - then compar…
Membranes as the active element rather than the container. A system is a nest of membranes, and each membrane carries a program of actions: phagocytosis engulfs a neighbour, exocytosis expels contents and fuses, pinocytosis buds an empty vesicle inward, mating fuses two membrane…
The minimal oscillator, and the standard first test for anything that handles reaction networks. Two species are held constant as reservoirs, two are dynamic, and the autocatalytic step 2X + Y -> 3X provides the feedback. Push the parameter b past 1 + a^2 and the steady state lo…
A chemistry nobody wrote down - it is read out of a cellular automaton. Run a one-dimensional CA and its space-time pattern separates into regular domains; the moving boundaries between domains behave like localised, persistent objects. Treat those *particles* as the molecules a…
Emergent problem solving from purely local rules. The whole working memory is a single candidate solution - one atom per queen, or per graph vertex - and rules rewrite small groups of atoms, with the untouched atoms acting as catalysts. A rule fires only if it does not lower a *…
The machine behind the chemical metaphor in computing. Molecules are terms of a process algebra held in a solution, and rules come in three kinds: heating breaks a compound term into simpler ones, cooling reassembles them, and reaction rules fire irreversibly when two ions meet …
A puzzle in chemical clothing, and the smallest useful test case in the catalog. Three colours; when two chameleons of different colours meet, both take the third colour. The total count never changes, so the system just relaxes to equal thirds. Its real value is the conservatio…
The classic hand-designed minimal cell, and still the clearest statement of what a cell needs. Three subsystems are coupled stoichiometrically: a metabolic cycle that turns nutrient into building blocks, a template that replicates using one of those blocks, and a membrane that g…
AlChemy without variable binding. Molecules are combinator expressions over B, C, I, K, R, S, W; a collision applies one to the other and reduces to normal form, releasing whatever falls off along the way. Dropping lambda-calculus variables makes reduction much faster and easier…
Computation by molecular shape recognition. Ligands carry keys, an enzyme carries locks, and binding happens when shapes are complementary. Signal ions binding a modulator site switch the enzyme between conformations, each with different catalytic behaviour - so a single enzyme,…
A distributed algorithm that happens to be a chemistry. Each network node holds a species whose concentration is its workload, and each directed link carries a catalyst that converts a job at one end into a job at the other. Run it and the loads provably converge to the network-…
A finite automaton made of molecules, with no external control at all. The input is a DNA duplex whose sticky end encodes the current state and next symbol; eight small 'software' duplexes act as transition rules, and the restriction enzyme FokI cuts at a fixed distance from whe…
The experiment that started DNA computing. Each vertex of a graph gets a random 20-base code word and each edge an oligo spanning the two halves of the vertices it joins, so when everything is mixed the strands ligate into every path through the graph at once - massive paralleli…
An ecosystem whose bookkeeping goes all the way down to atoms. Square atoms drift on a grid and bond covalently; each bond type stores or releases a definite energy, and four catalysts make or break specific bonds - one chlorophyll-like catalyst fixes sunlight into an A-B 'sugar…
An immune system as a reaction network, and one of the few chemistries that fixes its own rate constants. Antibodies are bitstrings with two sites; when one antibody's paratope matches another's epitope, the recogniser is replicated and the recognised destroyed. The crucial move…
What happens when molecules are carried rather than stirred. An ordinary reaction network is placed in a two-dimensional domain and every molecule is advected along a vector field, reacting only with neighbours within a radius. Local reactions and transport then produce strongly…
Network protocols written as a chemistry. A fraglet is a string of symbols that is simultaneously a data packet and a fragment of program: its head symbol is an instruction, its tail is payload. Instructions transform a fraglet, split it, fork it, or match two fraglets together,…
The language that made multiset rewriting a programming paradigm. A program is a set of rules of the form 'pick n elements satisfying this condition and replace them with these', and the elements are just values in a bag. Computing the maximum of a multiset is one rule: take any…
Heredity without a sequence. An assembly of lipid types grows by absorbing lipids from outside, and lipids already inside catalyse the entry of particular types, so the assembly's *composition* biases which lipids it takes up next. Split it in two and each half tends to reconstr…
A chemistry whose rules are themselves molecules. The vessel holds two multisets, one of data and one of rules; each step draws a rule, counts its binding sites, draws that many data molecules, applies it, and returns everything - rule included - to the vessel. Because a rule is…
Cooperative binding, and the standard way a smooth input becomes a switch. n copies of a protein bind a gene together, so the fraction of bound genes follows P^n/(K^n + P^n) - a curve that sharpens into a step as n grows. It is an idealisation on purpose: n molecules never actua…
Von Neumann's separation of constructor and description, made into a chemistry. Two populations coexist: machines, which act, and tapes, which are read. A machine reading a tape produces a new machine and a new tape, so reproduction requires both. A machine whose description is …
The life cycle of an autocatalytic set, stripped to a graph. Nodes are species and a directed edge means one catalyses another's production; concentrations follow from the graph and the least-populated node is periodically replaced at random. Nothing happens for a while - then t…
How to describe a chemistry you could never enumerate. Agents are proteins with named sites; a site can hold an internal state and a bond to another site, and a rule rewrites a *partial* pattern - bind these two sites, phosphorylate this one - regardless of what else is attached…
The original argument that metabolism could precede genes. Polymers join and split, and any polymer may catalyse any such reaction with some probability. As polymers get longer the number of possible reactions grows faster than the number of molecules, so above a critical cataly…
Growth rather than chemistry. A word over an alphabet is rewritten by applying productions to *every* letter simultaneously - which is what distinguishes it from a grammar that rewrites one symbol at a time, and what makes it a model of cells dividing in parallel. Interpret the …
The first molecular machine chemistry, from before anyone simulated such things. Strings come in two forms: passive tapes of bits, and active machines - folded chains of instructions where the fold is what brings distant instructions together. A machine attaches to a tape, runs …
One string folds into an operator that acts on another. A binary string of length N is read as a sqrt(N) x sqrt(N) matrix, applied in chunks to a second string with a threshold, producing a third; both reactants survive, so every string is potentially an operator on every other.…
Polymers as tape-processing machines. Two strings react when a recognition site on each can locate the same pattern; the first then acts as a processor reading the second as a tape and writing new strings. Self-replicators exist - a string that copies itself via its complement -…
Every molecule can be the enzyme or the substrate. Strings over a small alphabet of data and control symbols act on each other by pattern matching: one string's units match a region of another and rewrite it, with both reactants surviving. Among all 4096 strings of length four e…
Proof that chemical kinetics does not need chemicals. Plastic triangles with magnets in two faces are shaken in a dish; they stick into dimers, trimers and larger assemblies, and the yields over time fit an ordinary mass-action reaction network. The instructive detail is where t…
A reaction network used as a brain. Sensors feed substances into the network, the network's own reactions process them, and a motor consumes the concentration of a designated actuator species - so the robot's behaviour *is* the network's dynamics. Hand-designed networks do light…
Rewriting where the neighbourhood relation is part of the data. A collection is not just a bag - it can be a sequence, a grid, a graph, or a group-based field - and a rule matches a *path of neighbouring* elements and substitutes for it. One formalism therefore covers sorting a …
The canonical enzyme mechanism, and a lesson about output formats. Written elementarily it is three mass-action reactions among four species: enzyme and substrate bind reversibly, then the complex releases product. Eliminate the complex and you get the familiar saturating rate l…
Optimisation as collision chemistry. Each molecule is a candidate tour carrying its own length as a leading value, and enzyme-like machines pick up a few tours, apply a hardwired operator - exchange two cities, move or invert a segment, recombine two tours - and release the best…
Composition without a fitness function. A molecule is a stack of lines of musical elements with a displacement, so notes, chords and harmonic functions can sit in registered columns. Recombination rules join fragments that fit stylistically - a melody grows only by steps to a ne…
A chemistry in which the graph is both the space and the molecules. Every node is a molecule - hydrophilic or hydrophobic - and every edge a weak bond standing in for water-mediated interaction. A step picks a node, an adjacent node and a node two steps away, and rewires one edg…
Real nuclear physics in the same record as the artificial chemistries, which makes it an unusually good validation target. Nuclides and elementary particles are the species, fusion and decay the reactions, and measured cross-section libraries exist to check against. The CNO cycl…
A biochemical flip-flop. Two enzyme cofactors interconvert, each conversion driven by one of two input-derived substrates, so whichever input dominates pushes the pair into the corresponding state and holds it there. The result is bistability with a sharp transition: the outputs…
Protocells from nothing but hydrophobicity. Five particle types sit on a lattice - an autocatalyst, membrane particles, food, waste and water - with an autocatalyst that reproduces and also makes membrane material, and decay that returns everything to waste and back to food. Mem…
The reduced model of the Belousov-Zhabotinsky reaction - a real chemical oscillator, not an invented one. Five reactions couple an autocatalytic species, an inhibitor and an oxidised metal ion, with two reactants buffered; the autocatalysis fires, exhausts itself, regenerates th…
Computing with nested membranes. Objects are symbols held in the regions of a membrane tree, and rules rewrite multisets of them while targeting the products - keep them here, send them out, or push them into an inner membrane - and may dissolve the membrane they fired in. Every…
The example that shows why a chemistry cannot always be a finite matrix. Molecules are integers; when a smaller number divides a larger one, the larger is replaced by the quotient while the divisor survives as a catalyst. Nothing ever consumes a prime, so primes accumulate as th…
A theorem prover as a chemistry. Molecules are logical clauses, and a collision is one resolution step: if a literal in one clause and a negated literal in the other unify, the resolvent is produced. Because resolution is sound every product is a logical consequence of its paren…
A test rather than a chemistry: given a catalytic reaction system and a food set, is there a self-sustaining subset? A set is reflexively autocatalytic if every reaction in it has a catalyst the set itself can make, and food-generated if every reactant can be built from the food…
The null model the more elaborate chemistries all instantiate. Species have no internal structure at all; instead, for every pair, a randomly drawn coefficient says how strongly that pair catalyses the production of a third. With a dilution flux, the system settles onto a stable…
Kauffman's random Boolean networks, read as chemistry two different ways. In the first, each node's on and off states are species and a truth-table row becomes a reaction in which the inputs catalyse a switch of the output; attractors of the network are then interpreted as cell …
Machines that compose with machines, including themselves. A molecule is a finite state machine drawn as a graph with a current state; a reaction feeds one machine's output into the other and keeps the reachable graph of paired states as the product. Composition multiplies state…
A synthetic oscillator that was actually built in bacteria. Three genes are arranged in a cycle so each represses the next, with repression modelled as cooperative binding and both mRNA and protein decaying. With enough cooperativity the loop cannot settle - the repression trave…
The most physically real chemistry in the catalog. Molecules are RNA sequences, and each one is folded by actual free-energy minimisation into a secondary structure; the structure's largest loop is then read as the reaction that molecule catalyses. So genotype determines phenoty…
Strings rewriting strings, inside cells that divide. A molecule is a string over a small alphabet in which some characters are operators and some data; a collision has one string rewrite the other and cut it at marked points, with the operator surviving unchanged - so every reac…
Chemistry that moves itself. An oil droplet carries a precursor that hydrolyses at the oil-water interface into surfactant and protons. The local pH drop changes the interfacial tension unevenly around the droplet, and that gradient drives a Marangoni flow which pushes the dropl…
A metabolism made of strings. Metabolites are strings over a small alphabet, joined and cut, or recombined by swapping tails between two of them - and every reaction has its own enzyme, so an organism's genome is simply the set of enzymes it owns. Letter counts are conserved by …
The chemical abstract machine applied to a factory floor. Molecules are robots, grippers, feeders and human operators, each advertising a multiset of skills, plus the manufacturing order. Reaction rules let a resource that offers a needed skill join a growing coalition, provided…
A spatial chemistry where template replication really does emerge. Atoms carry a fixed type and a mutable state, drift on a grid, and local rules make or break bonds while changing states; a bonded group moves as one molecule. Eight rules are enough for an arbitrary sequence fla…
Self-replication in a cellular automaton, and the clearest case of 'what is a molecule' being the observer's choice. At the micro level a cell state is a molecule and a transition is a reaction; at the macro level a *loop* - an emergent closed pattern that copies itself - is the…
Rule-based chemistry that refuses to forget geometry. Molecules are spheres carrying binding sites at fixed positions, diffusing in three dimensions, and rules are written over patterns as in any rule-based language - but a bimolecular rule fires only when the two sites are actu…
An automata chemistry built to be run for a long time. Strings over a small alphabet bind by complementary template matching, and the bound pair then executes: one acts as enzyme, copying, cleaving or modifying the other, before dissociating. A seed replicase copies itself, and …
Chemistry with the electrons drawn in. A molecule is a graph of atoms that also tracks lone pairs and unpaired electrons explicitly, and a reaction is an *isomerisation of a whole ensemble*: both sides carry exactly the same atoms and electrons, and only the bonds are rearranged…
A notation designed to make molecular biology expressible. A molecule is a stack of lines of elements, each line displaced horizontally relative to the first - so a double strand, a sticky end, or a polymerase sitting on a template are all just registered rows. Recombination rul…
The chemistry that feels most like chemistry. Molecules are structural formulas - labelled graphs of atoms and bonds - and reactions are graph rewriting rules that must conserve atoms and bond order. What makes it distinctive is that energies are not supplied: the VSEPR rules tu…
Strands that code the enzymes which act on strands. A strand over A, C, G, T is read two letters at a time into a sequence of operations - cut, copy, move, insert - and the resulting enzyme's shape determines which base it binds to, so the strand determines what happens to stran…