Diversity
The distance measure over organism source code, and the birth gates, clone-family cap and crisis pressure built on it.
Diversity pressure is the machinery that keeps the population from collapsing into one look. It rests on a single distance measure between two organisms, which every gate below reads: a child that lands too near what already exists is rejected at birth, and the spread of the whole pool is measured before each birth to decide whether wider pressure applies. All of it is per track, and none of it consults the rendered image.
Token distance
Token distance is computed over an organism’s source text. Each side is lowercased and reduced
to the set of tokens matching [a-z_][a-z0-9_]{2,}, that is, every run of three or more
identifier characters beginning with a letter or an underscore. The distance is one minus the
Jaccard index of the two sets: 1 - |A ∩ B| / |A ∪ B|. It falls between 0 and 1, and is 1 when
either set is empty.
What the metric does and does not see follows from that token rule:
- Numeric literals are not tokens. A jitter child, which changes only float literals, measures 0 from its parent by construction.
- Words inside comments are tokens like any other, so commentary counts toward similarity.
- Nothing about the rendered output enters the measure. Two organisms drawing a similar image from unrelated code are distant.
- Order and repetition are discarded. Two files holding the same identifiers in a different arrangement measure 0 apart.
The same function is applied to prompt gene text, where a new gene must clear a minimum distance from every living gene before it is admitted.
Pool health
The pool measured is the track’s living organisms that have rendered successfully, falling back to all living organisms when none has. Two numbers are taken from it before every birth.
| Measure | Definition |
|---|---|
| Mean pairwise distance | The mean token distance over every unordered pair in the pool. |
| Crowded fraction | The share of the pool whose nearest neighbour lies closer than the crowded threshold. |
Both exist because either one alone can be satisfied by an unhealthy pool: a handful of families, each a stack of near-identical variants, holds a high mean while most of its members are redundant.
A diversity crisis holds when the pool has at least six members and either the mean falls below the crisis mean or the crowded fraction rises above the crisis crowded fraction. The state is stored per track and survives a restart; a transition is written to the event log with the two numbers that caused it.
Setting in lab.config.json | Value |
|---|---|
crisisMean | 0.45 |
crowdedNN | 0.15 |
crisisCrowdedFraction | 0.5 |
minFreshDistance | 0.35 |
minChildDistance | 0.08 |
cloneNN | 0.05 |
maxCloneFamily | 3 |
noveltyParentChance | 0.3 |
crisisPhylumFidelity | 0.15 |
crisisFreshBoost | 0.35 |
These are the lab’s current configuration, not fixed constants of the system.
Birth distance gates
A candidate that passes the contract is then tested against the pool. The gate depends on which operator bred it.
| Gate | Applies to | Rejected when |
|---|---|---|
| Identity | Every operator with parents | The child’s code is byte-identical to a parent’s. |
| Fresh landing | fresh | Its distance to the nearest pool member is below minFreshDistance. |
| Parent distance | Model operators other than fresh, meaning mutate, crossover and a radical jump | Its distance to either parent is below minChildDistance. |
| Clone family | Every operator | The pool already holds maxCloneFamily members within cloneNN. |
The free structural operators (jitter, splice, graft) are exempt from the parent-distance
gate, because token distance ignores the numeric literals a jitter moves and a jitter child would
fail it every time. They are not exempt from the clone-family cap, which is what bounds them
instead. The parent-distance gate on the model operators catches the opposite failure: a model
asked to mutate a parent returning that parent reworded.
Every rejection is logged with its cause and its measured distance, and the birth is abandoned rather than retried.
Clone families
A clone family is a set of organisms within cloneNN of one another. The cap is
maxCloneFamily, and it is enforced at three separate points.
- At birth, a candidate counts how many living organisms sit within
cloneNNof it. At the cap, it is not stored. - During culling, the same families are recomputed over the living pool and members past the cap are marked for death under a clone cause, which is the one removal that ignores the usual requirement of judged games.
- On the public cross path, the same count is run against every living organism in the track, and a cross at the cap is refused with a message rather than stored.
A frozen organism is never purged as a clone, but it still counts toward its family’s total, so freezing a look does not entitle that look to further copies.
Crisis pressure
While a crisis holds, three behaviours in breeding change.
| Behaviour | Normal | Under crisis |
|---|---|---|
| Fresh births | Chosen by the operator weights alone. | Before the weights are rolled, fresh is forced with probability crisisFreshBoost. |
| Phylum fidelity | The second parent is drawn from the first parent’s own phylum with probability phylumFidelity. | That probability drops to crisisPhylumFidelity. |
| Radical mutation | A mutate birth becomes a radical jump with the configured chance. | That chance is doubled. |
A fresh birth is the only operation that adds a lineage instead of enlarging an existing one, which is why it is forced ahead of the weighted roll rather than left to it. Fidelity acts on the same problem from the other side: outside a crisis most two-parent births stay inside one phylum, and since a single-parent child inherits its parent’s phylum, the cross-phylum remainder is the only place lineages mix at all. A lower fidelity raises the share of births that mix them.
Novelty in parent selection
Distance decides two things about who breeds, both set out under breeding. The first parent comes
from a novelty tournament instead of the rating tournament
selection runs, on a noveltyParentChance roll, and the second parent
is drawn from the candidates furthest from the first rather than the highest rated.
Both rules give an outlier a route into reproduction that its rating would not give it. A rating tournament breeds from the champion, and an organism far from everything else in the pool is selected here on that distance alone, whatever its rating.
Bound to
The source this page's claims were read against, named by symbol and pinned by the digest of the file it lives in.
| Symbol | Digest |
|---|---|
| distance | 2135902ed4dc |
| diversityState | b72f4e12e72f |
| lab.config.json | a095dd3b3dab |
| publicCross | f14fffef049d |
What links here
- Breeding sends readers here
- Crossing sends readers here
- Death sends readers here
- Freezing and reseeding sends readers here
- Judging sends readers here
- Organisms sends readers here
- Prompt genes sends readers here
- Selection sends readers here
- The gallery sends readers here
Near this subject
These are the subjects this one is joined to in the field. Step out of this card and they are the wells around the one you are standing in.
- Crossing each sends you to the other
- Breeding each sends you to the other
- Judging that page sends you here
- Death each sends you to the other
- Organisms each sends you to the other
- Prompt genes each sends you to the other
- Freezing and reseeding each sends you to the other
- Selection each sends you to the other
- The gallery that page sends you here
- Taxonomy this page sends you there