Metabolism M2.7: one species, many minds — strains (song-compiled LittleVMs), bodies with fixed allegiance, living wells, food-limited economy

This commit is contained in:
Dejvino
2026-10-28 11:08:39 +01:00
parent f939351689
commit 8abefb16b7
19 changed files with 2199 additions and 909 deletions
+42 -51
View File
@@ -129,62 +129,53 @@ within-seed ≈ 0.02–0.04, ~4–7×) even though the films look different. Bro
the instruction grammar (more branch shapes, richer memory, more action
archetypes) is the natural next step for this layer.
### M2.7 — one species, many minds: strains & allegiances (design agreed; not yet built)
### M2.7 — one species, many minds: strains & allegiances ✔
A further correction, agreed before building anything on M2.6: **drop tribes
entirely.** Not three castes, not k tribes of fixed membership. The picture is
*one population of specialised microorganisms building a bigger organism* —
and then several such macro-organisms sharing a map, sometimes fighting,
sometimes cooperating. Membership is a property of each organism, and it can
change over time.
Built — with one correction agreed mid-build, after watching the first films:
**Wells keep the correction from the previous draft** — small, weak, many
(8–16), born where a pitch class enters and holds, drifting with its harmony,
dying when it leaves, all on a precompiled deterministic timeline — because
wells are where bodies collide: everyone needs them, so a well is the natural
front, its birth a land-rush, its death a retreat.
> **Allegiance does not change sides.** The original draft had fronts
> converting, collapsed bodies leaking their members, splinters seceding and
> friendly bodies merging. On screen that read as one thing: every colour
> blurring into every other within a minute — ugly, and it erased the very
> polities the mechanic was meant to create. So the fluid politics were
> removed: bodies are founded once and persist; war kills, it does not
> convert; there is no defection and no merger. What keeps the cast plural is
> **colonisation** — a blessed settlement on virgin ground, far from every
> body core, plants a new flag. And the renderer now paints each cell in its
> DOMINANT body's colour, so territories read as territories.
**The population is one density field with two live properties:**
What was built:
- **strain mix (personality).** The song decides how many minds it needs —
*m* strains from the number of independent voices the mix resolves into,
bounded by arrangement depth, jittered by the seed — and compiles a
**LittleVM program per strain** from the grammar: senses (food, density,
trail, law, hunger, rim, well proximity and liveliness, body presence),
registers as memory, real branching, actions (move, graze, excrete, hit,
spawn, follow, patrol). Density is partitioned by strain; each strain
advects by its own program. And the mix **evolves by local selection**:
strains that eat and grow where they stand propagate, proportions shift
district by district — specialisation is visible and develops over the film.
- **allegiance (the body).** A composition field over bodies (the song opens
2–4; a cap of ~8 keeps colour legible), advected frozen-in with the
population flux. Same body = **cooperation**: shared trails, reinforcement,
complementary strains building one structure. Different bodies = **contest**
where presences overlap: hit-actions spend density to push the other body's
ground and convert it, scaled by the song's harmony — consonant, locked
voices breed truce and symbiosis; dissonant, decorrelated voices breed
skirmish and siege. Allegiance changes by rule, never by fiat:
- **conversion** — a won front converts the locals it overruns;
- **defection** — a body whose presence collapses (starved, outflanked)
releases its members to the neighbouring body;
- **fission** — a coherent splinter cut off from its body, hit by a strong
onset, founds a new body with a new colour;
- **merger** — two bodies whose members fully intermix under a cooperative
regime become one.
- **strains** (`src/song/strains.js`) — the song decides how many minds it
needs (2–5, from onset density, an independent spectral voice, texture
noisiness, seed jitter) and compiles a LittleVM program per strain from
motif roles: builder, grazer, scout, sentinel, breeder. Senses include the
body's presence (KIN/FOE), the living wells, and the section's PEACE — a
program can branch on war or truce. The world runs local selection:
strains that thrive where they stand propagate.
- **living wells** (`src/sim/wells.js`) — a precompiled deterministic
timeline of small, weak, numerous wells (4+ at open, ≤12 alive): born where
a pitch class enters and holds, drifting along its harmony's compass,
starving when it leaves. A birth is a land-rush; a death a retreat.
- **bodies & diplomacy** — allegiance is a concentration field advected
frozen-in with the population flux (Σ bodies = density exactly, a test).
Diplomacy = the track's consonance bent by the section's peace operator;
hostile fronts bleed the loser (casualties, never conversion). Colonisation
plants new bodies on blessed virgin ground.
- **a food-limited economy** — the old world was accidentally
cap-limited: the gate floor let life grow on bare ground, so the dish
filled to a uniform saturated carpet and stopped moving. Now the gate is
nearly shut without food and starvation dissolves colonies off bare
ground: the population tracks its wells, blooms on them, and must keep
moving to keep eating.
**The song sets the diplomacy.** Consonance and the section regimes map to
war and peace: drops are expansion wars, breakdowns are truces and mutual
building, an outro is a settling of borders. The body-to-body relations come
from the music, not a constant.
*Exit: two songs with the same pulse but different arrangement depth compile
different strain counts and different diplomacies; at least one allegiance
change (conversion, defection, fission or merger) is legible on screen per
film; strain proportions measurably drift across the film (local selection
actually runs); a well's birth, drift and death are each legible; the world's
typed-array layers, trail tints and palette generalise from 3 fixed castes to
the strain/body fields; the prepared-artifact path still rebuilds
bit-identical timelines, programs and opening state.*
*Outcome:* 39 tests green, including the allegiance invariant (no negatives,
composition = population), war-kills-not-converts (a war world ends poorer
than its truce twin, with each body's mass still in its own heartland),
colonisation, strain-mix drift, well determinism/drift/land-rush. Realtime
holds at 640×360 (~12 ms/frame sim+render). Songs still diverge ≫ seeds on
the fingerprint (classMix now sorted — the seed permutes the casting, the
song decides its shape).
### M3 — the lens: travel, don't cut
Replace the cut-to-a-point grammar with a **move grammar**: *track* (follow a