society: make the sexual-transmission model rigorous (E9 epistasis, E10 directed sex)

Deepen the sexual-reproduction frame before entering the full society, on
the two facets GG chose: landscape robustness and directed recombination.
Adds a Kauffman NK landscape (genotype.nk_fitness, tunable ruggedness),
finite n-parent crossover (genotype.crossover, per-gap recombination rate),
and hill-climb (parents = local optima = trained models).

E9 (recomb_landscape) -- the "why sex?" test: E8's dramatic super-parent
result used an ADDITIVE landscape. On rugged/epistatic landscapes, blindly
recombining local optima causes OUTBREEDING DEPRESSION -- offspring fall
below the parents, worse with both ruggedness and recombination rate (K=8,
free recomb: ~ -0.23), and the optimal recombination rate shrinks as
ruggedness grows. Design rule: merge freely when skills are complementary/
additive; sparingly (and with selection) when entangled.

E10 (directed_sex) -- directed sex beats biological sex: biology is stuck
with 2 random-mating parents and no offspring preview; an AI can choose
complementary mates, evaluate many recombinant offspring, keep the fittest,
and use unbounded parents (iterated recombine-then-select). Random
("biological") sex craters with ruggedness (0.66->0.51); directed sex
tracks/exceeds the best parent at every ruggedness -- converting the
outbreeding-depression catastrophe into a win. No biological analog.

Complete sexual-transmission picture: dramatic super-parent offspring when
skills are complementary (E8); outbreeding-depression risk when entangled
(E9); directed sex resolves the risk (E10). configs/layer1/{E9,E10}.yaml,
figures/plot_{E9,E10}.py, READMEs, +5 tests (117 green).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-07-05 11:13:37 +01:00
parent 62c68d6c8c
commit 48181a1c84
21 changed files with 614 additions and 5 deletions

BIN
results/E10/E10.pdf Normal file

Binary file not shown.

BIN
results/E10/E10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

34
results/E10/README.md Normal file
View file

@ -0,0 +1,34 @@
# E10 — directed sex beats biological sex (the distinctly-AI superpower)
**Claim tested.** E9 showed that on rugged (epistatic) landscapes, blind recombination causes
outbreeding depression — offspring worse than parents. Biology is largely stuck with this: two
random-mating parents, no way to preview offspring. But an **AI is not** — it can choose mates,
evaluate many recombinant offspring, and keep only the fittest, over rounds, with no two-parent
limit. Does this **directed sex** rescue recombination where blind sex fails?
**Setup.** Parents are local optima of a Kauffman NK landscape (`L=12`), swept over ruggedness `K`.
Three strategies compared, all as deployed capability (fitness ∈ [0,1]): **best single parent**;
**random sex** (blind mating, free recombination, no offspring selection — biology's default);
**directed sex** (iterated recombine-then-select-offspring, `rate=0.2`, 5 rounds — the AI move).
24 replicate landscapes.
### Symbols
- **random sex** — blind: random parents, free recombination, take the offspring as they come.
- **directed sex** — choose complementary mates + generate many offspring + keep the fittest + repeat; unbounded parents.
- **global optimum** — the landscape's best genotype (the ceiling).
### The two panels
1. **Capability vs ruggedness.** As `K` grows, **random sex (blue) craters** (0.66 → 0.51 — deep
outbreeding depression), while **directed sex (red) tracks the best parent and the global optimum**,
staying near the ceiling at every ruggedness.
2. **Edge over the best parent.** Directed sex stays **≥ 0** (at or above the parents) across all `K`;
random sex falls to **0.2** (far below). Directed sex converts a catastrophe into a win.
### Takeaway
The move biology cannot make — **choose your mates, evaluate your offspring before you commit, and
recombine as many parents as you like** — is exactly what makes AI sexual reproduction robust. Blind
merging of entangled models is dangerous; *directed* merging (generate many candidate merges, keep
the best) is safe and can exceed every parent. This is the practical payoff of the sexual-transmission
model and the distinctly-AI superpower with no biological analog. **Falsifier (not triggered):** if
directed sex did no better than random sex, or never recovered the best-parent level on rugged
landscapes, the "AI beats biology" claim would fail.

14
results/E10/manifest.json Normal file
View file

@ -0,0 +1,14 @@
{
"experiment": "E10",
"master_seed": 20260705,
"git_commit": "62c68d6c8c4090e62cf9ee17ac7b7d1eff7a6955",
"python": "3.14.5",
"libraries": {
"numpy": "2.5.0",
"scipy": "1.18.0",
"pandas": "3.0.3",
"pyarrow": "24.0.0"
},
"rows": 120,
"results_sha256": "b2d53d0a3949be0b67e3b8dffec56121d54e20c593e6302717a73a8a132f17cb"
}

View file

@ -0,0 +1,25 @@
experiment: E10
seed: 20260705
n_replicates: 24
source_config:
experiment: E10
kind: directed_sex
seed: 20260705
n_replicates: 24
society:
L: 12
n_parents: 6
pop: 200
keep: 8
rounds: 5
rate: 0.2
sweep:
- param: K
values:
- 2
- 4
- 6
- 8
- 10
output:
dir: results/E10

BIN
results/E9/E9.pdf Normal file

Binary file not shown.

BIN
results/E9/E9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

34
results/E9/README.md Normal file
View file

@ -0,0 +1,34 @@
# E9 — landscape robustness: when recombination helps, and the outbreeding-depression risk
**Claim tested.** E8 showed sexual recombination assembling super-parent offspring — but on an
*additive* landscape, where recombination trivially helps. The honest, credibility-critical question
(the classic "why sex?" problem): does the benefit survive **epistasis**, or does merging entangled
models break them?
**Setup.** Parents are **local optima** ("trained models") of a **Kauffman NK landscape** (`L=12`),
whose ruggedness `K` (epistatic interactions per locus) is swept together with the **recombination
rate**. `K=0` is additive/smooth; larger `K` is rugged (co-adapted allele blocks, many local optima).
Fitness ∈ [0,1]. 24 replicate landscapes; 200 offspring per point.
### Symbols
- **NK landscape** — tunable-ruggedness fitness landscape; `K` = epistasis (0 = additive, high = rugged).
- **recombination rate** — per-gap crossover probability (0 = clonal / copy a parent; 0.5 = free recombination, loci independent).
- **outbreeding depression** — offspring *less* fit than parents because recombination broke co-adapted allele blocks.
### The two panels
1. **The risk.** Mean offspring fitness *minus* best parent, vs recombination rate, one curve per
ruggedness `K`. On the additive landscape (`K=0`) it's flat at 0; as `K` grows the curves plunge
**negative**, and deeper the higher the recombination rate — **outbreeding depression, worse the
more entangled the skills and the more you mix** (`K=8`, free recombination: ≈ 0.23).
2. **With selection, an optimal rate re-emerges.** Best-of-brood fitness (offspring selection) vs
rate per `K`, with parents dotted. On rugged landscapes a **nonzero intermediate recombination
rate** is best — enough mixing to find new combinations, not so much that it shatters good blocks.
### Takeaway
Recombination is not a free lunch. **Merge freely when skills are complementary/additive; merge
sparingly — and always *select* offspring — when they are entangled.** This is the celebrated
population-genetics result (recombination load / outbreeding depression) reproduced for AI model
merging, and it turns the sexual metaphor from a lucky demo into a law with a design rule. The rescue
— directed sex with offspring selection — is E10. **Falsifier (not triggered):** if recombination
rate had no effect, or free recombination never underperformed the parents on rugged landscapes, the
epistasis caveat would be moot.

14
results/E9/manifest.json Normal file
View file

@ -0,0 +1,14 @@
{
"experiment": "E9",
"master_seed": 20260705,
"git_commit": "62c68d6c8c4090e62cf9ee17ac7b7d1eff7a6955",
"python": "3.14.5",
"libraries": {
"numpy": "2.5.0",
"scipy": "1.18.0",
"pandas": "3.0.3",
"pyarrow": "24.0.0"
},
"rows": 720,
"results_sha256": "73a737b333ee972ff1f878e18bf91b0aac58cb595c00c7b7fec3c18865971c4f"
}

View file

@ -0,0 +1,30 @@
experiment: E9
seed: 20260705
n_replicates: 24
source_config:
experiment: E9
kind: recomb_landscape
seed: 20260705
n_replicates: 24
society:
L: 12
n_parents: 6
pop: 200
sweep:
- param: K
values:
- 0
- 2
- 4
- 6
- 8
- param: rate
values:
- 0.0
- 0.05
- 0.1
- 0.2
- 0.35
- 0.5
output:
dir: results/E9