Layer 1 core: Wright-Fisher knowledge-transmission model with E1-E2

Scaffold plus the Layer 1 analytical core and the first two experiments.

- knowledge/: truth, metrics, teachers (2.7.1 shared-switch construction),
  step, lineage, experiment, config, seeding (imported as `knowledge`).
- Validation spine green: neutral decay (Pred 1), fixation (Pred 2), exact
  mutation-drift equilibrium (Pred 3), union coverage (Pred 5). 68 tests pass.
- E1 reproduces tail-first collapse. E2 delivers the headline: a grounding
  phase boundary g* << 1, with stationary H tracking the exact H_eq closed
  form (g=0.005 -> 68% of truth diversity; g=0.05 -> 96%).
- Reproducibility: uv venv from a hash-pinned uv.lock is the source of truth;
  every run writes results.parquet + resolved_config.yaml + manifest.json
  (lib versions, git commit, sha256). Figures and manifests tracked; the
  large regenerable parquet is gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-07-04 18:10:18 +02:00
commit a6eb9b7512
33 changed files with 4356 additions and 0 deletions

BIN
results/E1/E1.pdf Normal file

Binary file not shown.

BIN
results/E1/E1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

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

@ -0,0 +1,14 @@
{
"experiment": "E1_reproduce_collapse",
"master_seed": 20260704,
"git_commit": null,
"python": "3.14.5",
"libraries": {
"numpy": "2.5.0",
"scipy": "1.18.0",
"pandas": "3.0.3",
"pyarrow": "24.0.0"
},
"rows": 60100,
"results_sha256": "e3d246b9d679e7f833dac05b1c3ef894a9e15a1e53218c20db53ec2a5b011bd7"
}

View file

@ -0,0 +1,68 @@
experiment: E1_reproduce_collapse
seed: 20260704
n_replicates: 100
grid:
- label: {}
lineage_cfg:
truth:
K: 500
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 100
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 0
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
generations: 600
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
source_config:
experiment: E1_reproduce_collapse
seed: 20260704
n_replicates: 100
generations: 600
truth:
K: 500
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 100
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 0
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
output:
dir: results/E1

BIN
results/E2/E2.pdf Normal file

Binary file not shown.

BIN
results/E2/E2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

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

@ -0,0 +1,14 @@
{
"experiment": "E2_grounding_phase_boundary",
"master_seed": 20260704,
"git_commit": null,
"python": "3.14.5",
"libraries": {
"numpy": "2.5.0",
"scipy": "1.18.0",
"pandas": "3.0.3",
"pyarrow": "24.0.0"
},
"rows": 400800,
"results_sha256": "863d9d0777db6916032ee34e8fe5651d24d86443dcd60de8d0da4220eb7625a3"
}

View file

@ -0,0 +1,305 @@
experiment: E2_grounding_phase_boundary
seed: 20260704
n_replicates: 100
grid:
- label:
g: 0.0
m: 0
lineage_cfg:
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 200
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 0
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
generations: 500
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
- label:
g: 0.005
m: 1
lineage_cfg:
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 200
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 1
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
generations: 500
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
- label:
g: 0.01
m: 2
lineage_cfg:
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 200
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 2
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
generations: 500
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
- label:
g: 0.02
m: 4
lineage_cfg:
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 200
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 4
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
generations: 500
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
- label:
g: 0.05
m: 11
lineage_cfg:
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 200
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 11
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
generations: 500
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
- label:
g: 0.1
m: 22
lineage_cfg:
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 200
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 22
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
generations: 500
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
- label:
g: 0.2
m: 50
lineage_cfg:
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 200
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 50
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
generations: 500
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
- label:
g: 0.4
m: 133
lineage_cfg:
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 200
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 133
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
generations: 500
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
source_config:
experiment: E2_grounding_phase_boundary
seed: 20260704
n_replicates: 100
generations: 500
truth:
K: 1000
R: 1
tail: zipf
zipf_s: 1.1
tail_frac: 0.5
tail_threshold: 0.001
init: truth
dynamics:
n: 200
teachers:
K_T: 1
rho: 0.0
q: 1.0
grounding:
m: 0
policy: proportional
selection:
mode: none
novelty_alpha: 0.0
remint:
enabled: false
period: null
H_gate: null
metrics:
kl_floor: 1.0e-09
support_eps: 1.0e-09
sweep:
- param: g
values:
- 0.0
- 0.005
- 0.01
- 0.02
- 0.05
- 0.1
- 0.2
- 0.4
output:
dir: results/E2