chemart / jain-krishna
View on GitHubJain-Krishna autocatalytic set model — 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 periodical…
How it works
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 the first small autocatalytic cycle appears and the population organises around it and grows fast. Later a new cycle can undercut the incumbent, causing a crash and a reorganisation of the core. Innovation, dominance and collapse from one rule.
- S
- m nodes of a directed graph; only the CATALYTIC action is represented, not the underlying reactions · explicit
- R
- c_ij = 1 means X_j catalyses the production of X_i: X_j -> X_j + X_i ; x_i' = sum_j c_ij x_j - x_i sum_kj c_kj x_j · arity 1
- A
- ode · normalisation sum_i x_i = 1
Parameters
| name | default | meaning |
|---|---|---|
| m int · structural |
100 | number of nodes (the state-space dimension stays constant) [2, 300] |
| p float · structural |
0.0025 | link probability, both initially and on rewiring; the phase parameter [0, 1] |
| graph_updates int · population |
0 | slow-timescale steps (least-fit node replaced) applied before the network is returned; 0 returns the initial random graph [0, 20000]; the book's run finds the first autocatalytic set at update 2854 (m = 100, p = 0.0025) |
| self_loops bool · structural |
false | allow c_ii = 1 (direct self-replicators); the model sets c_ii = 0 |
Jain-Krishna autocatalytic set model
One of the artificial chemistries of Banzhaf & Yamamoto, Artificial Chemistries (MIT Press, 2015), §15.2.2, 15.2.3; first proposed by Jain & Krishna, 1998-2002.
Its generator ships with the chemart library, so loading it runs no code from the hub and needs no trust_remote_code.
import chemart
net = chemart.generate_network("chemart/jain-krishna", seed=0) # same as "jain-krishna"
print(net.summary())
What to look for
- random phase -> growth phase (once the first small ACS appears) -> organising phase
- crashes and core shifts when a stronger ACS out-competes the incumbent
- attractor = eigenvector of the Perron-Frobenius eigenvalue lambda_1 of C
Implementation decisions
- The book's prose says c_ij is 'a catalytic function of species i on species j', but eq. 15.7 (x_i' = sum_j c_ij x_j ...) needs j to catalyse i. The equation is followed: c_ij = 1 becomes X_j -> X_j + X_i with rate 1, under constant-total dilution.
- The fast attractor is the Perron-Frobenius eigenvector of C, recorded as the initial state. When there is no autocatalytic set (eigenvalue 0), (C + I)^m is iterated instead, which concentrates on the ends of the longest chains. Ties for the least-populated node are broken at random.
- After a replacement the book perturbs the remaining concentrations. That has no effect when the next attractor is computed exactly, so it is not modelled. extras.analysis records the eigenvalue and the attractor's support.
- x0, the concentration given to a new node, only matters for numerical integration, so it is not a parameter.
Banzhaf & Yamamoto, Artificial Chemistries (2015), §15.2.2, 15.2.3
Preview at default parameters
100 species · 22 reactions · status complete · seed 1
X59 -> X59 + X5 [mass-action k=1.0] X30 -> X30 + X14 [mass-action k=1.0] X38 -> X38 + X14 [mass-action k=1.0] X31 -> X31 + X26 [mass-action k=1.0] X46 -> X46 + X33 [mass-action k=1.0] X2 -> X2 + X45 [mass-action k=1.0] X52 -> X52 + X45 [mass-action k=1.0] X52 -> X52 + X49 [mass-action k=1.0] X53 -> X53 + X52 [mass-action k=1.0] X33 -> X33 + X54 [mass-action k=1.0] X71 -> X71 + X55 [mass-action k=1.0] X79 -> X79 + X57 [mass-action k=1.0] X76 -> X76 + X61 [mass-action k=1.0] X65 -> X65 + X63 [mass-action k=1.0] X89 -> X89 + X74 [mass-action k=1.0] X16 -> X16 + X76 [mass-action k=1.0] X88 -> X88 + X81 [mass-action k=1.0] X82 -> X82 + X92 [mass-action k=1.0] X4 -> X4 + X93 [mass-action k=1.0] X22 -> X22 + X95 [mass-action k=1.0] X31 -> X31 + X96 [mass-action k=1.0] X91 -> X91 + X99 [mass-action k=1.0]
Generated by the uploader with chemart push; the hub never runs uploaded code.