# Task 8 report — claim A1 **Status: complete. The result is a null, with a mechanism.** Deliverable: `experiments/results/a1.md` (the full tables and the audit trail). Code: `experiments/a1.py`, `experiments/tests/test_a1.py`, and two optional keyword arguments added to `frozen._train`. `results/*.json` is gitignored; the four run files are `a1_sweep.json`, `a1_controls.json`, `a1_shuffle_k4.json`, `a1_shuffle_k16.json` and reproduce from the commands recorded at the top of `a1.md`. ## The two-part answer **Does affect move the gate? Yes, decisively.** `κ=1` moves mean `g` from 0.501 to 0.465 and triples its sd (0.025 → 0.068), which is the part that matters: the gate acquires input dependence it did not have. Saturation starts between `κ=2` and `κ=4` (12.4% of entity-steps below `g<0.1` at `κ=4`, 26.4% at `κ=16`; never above 0.9 at any `κ`, which it cannot be, since `a ≥ 0`). The post-switch versus far-from-switch contrast — the claim's actual content, not the mean — is −0.078 at `κ=4` on **16/16 seeds**, against +0.0000 on 4/16 at `κ=0`. Lag by lag the gate is an exact mirror of the arousal transient. The mechanistically important number: the *learned* part of the pre-activation, `W_g[h‖M] + b_g` measured with the forcing left out, sits at **0.000 ± 0.002 at every `κ`** — the same value `frozen.md` §3 measured at `κ=0`. Gradient neither compensates for the forcing nor participates in it. `−κa` is not modulating a learned gating policy; it is supplying the whole of one that gradient descent never built. A1's premise holds exactly as the brief framed it. **Does moving it help? No, and at short lag it hurts.** `steady` is flat across a 16-fold range of `κ`: 2.399e-05 at `κ=0` to 2.428e-05 at `κ=16`, a 1.2% spread against an across-seed sd 40 times larger. Paired per seed, `grp_k0` beats `grp_k` on 6–9 seeds of 16 at every `κ`, median ratio 1.00 — a coin flip with no trend. The one sign-definite, `κ`-monotone effect in the file is a **degradation**. At matched lag 2 after a switch, `grp_k0 / grp_k` runs 0.96 → 0.89 as `κ` goes 1 → 16, on 14–16 seeds out of 16. Smaller at lags 5 and 10, absent at lag 0 (arousal has not risen yet), gone by lag 19. ## The shuffled control, stated explicitly Three controls at `κ=4` and `κ=16`, 16 seeds each, replacing only the arousal the **gate** sees while the CPPN keeps the organism's own live affect: `shuffled` (permuted within each half, so the marginal is matched exactly in the measured window rather than in expectation), `shifted` (circularly rolled, which also preserves arousal's autocorrelation and breaks only its alignment with the switches), and `const` (the run's mean, i.e. `−κa` as a pure bias shift). The control is well-formed: at `κ=4`, `shuffled` matches `real`'s gate distribution to three decimals — mean 0.400 vs 0.400, sd 0.165 vs 0.164, `frac g<0.1` 0.124 vs 0.124 — while its post-vs-far contrast collapses from −0.078 to −0.001. **On `steady`, real affect is indistinguishable from shuffled affect: 5/16 seeds at both `κ`, mean ratio 0.98–0.99.** There is no effect for the control to rule in or out. **On `recovery[2]`, real affect is worse than shuffled on 15/16 seeds** — 6% at `κ=4`, 8% at `κ=16` — while `shifted` sits at parity (0.99 on 5–7/16). So the lag-2 degradation is genuinely about surprise *timing*, not a generic bias shift: it is the one thing correlating `−κa` with the switches does that a distribution-matched control does not, and what it does is make the error worse. (`const` reproduces about half of it at `κ=16` and none at `κ=4`, which is the bias-shift channel appearing only once the constant is large enough to shut the gate outright: `const` at `κ=16` is `g = 0.103 ± 0.010`, a different dead gate rather than an open one.) ## Why the null, and what it costs the paper `frozen.md` §1b established that the post-switch error excess belongs to the world's configuration transient — a stateless frozen model reproduces its shape at every lag — so no gating policy can shorten it. Memory's only contribution in this domain is temporal smoothing. A gate that opens on surprise spends exactly that smoothing at the moment it is worth most, which is the lag-2 harm. The mechanism works; the domain gives it nothing to do and a little to lose. This is the same conclusion `headroom.md` §6(c) and `frozen.md` §4 reached from the other two directions. A1 as written does not hold on this domain, and it should be reported as a measured null about *this* domain and *this* budget. ## Three things worth carrying forward - **The forcing lever is real and now instrumented.** Any replacement domain can be checked for A1 with the same measurement, and `pre ≈ 0` gives the null a mechanism rather than an absence — which is a stronger statement than "no effect measured". - **Arousal lags the event by ~12 steps.** It is *lower* at the switch step (0.061) than far from one (0.106), because `Affect.update` compares the loss to a slow baseline; it peaks at lag 12 of a 20-step window. The gate therefore opens after the error has already risen. In a domain where timing matters, that lag is a design parameter (`rho_a`, `rho_slow`), not a constant, and it has never been tuned. - **`recovery[2]` is where affect shows up at all.** Whatever replaces this domain should be checked at short lag before its steady-state error is quoted; `steady` saw nothing that `recovery[2]` saw clearly on 15/16 seeds. ## Incidental corrections to earlier files At 16 seeds in the trained phase, `frozen.md` §5's decomposition reads capacity (`rp_only / grp_k0_nostate`) **3.04x mean, 2.71x median, 16/16 seeds** and state (`grp_k0_nostate / grp_k0`) **1.19x mean, 1.11x median, 11/16 seeds**. `frozen.md` reported 3.06x on 8/8 and 1.25x on 4/8 at eight seeds. The capacity row is unchanged; the state row is firmer than it looked at eight seeds and is still modest — five seeds go the other way and the median is 1.11x. It does not change `frozen.md`'s verdict and it does not rescue a memory claim, but the "4/8" figure should be replaced by "11/16" wherever it is quoted. ## Method notes, for review - **The gate is reconstructed, and the reconstruction is verified, not assumed.** `Organism.forward` returns only `out(M)`, so `a1.GateTrace` rebuilds `h` from the public `org.rp` and asserts `org.grp(h, M_prev, a)` equals the `M` the organism actually returned — every step of every gated run, 2.18M assertions across 272 runs, none fired. `test_gate_reconstruction_is_the_organisms_own_gate` perturbs the reconstructed `h` by 1e-6 and requires the assert to fire, so the guard can fail. - **`_train` was extended, not copied.** Two optional keyword arguments (`gate_arousal`, `on_step`), both defaulting to off; with both off the loop body is the call sequence it always was, and `test_train_copy_is_identical_to_regime_run` still asserts it reproduces `regime.run`'s metrics exactly. `test_on_step_does_not_perturb_the_run` pins that the instrumentation is read-only. - **The replay path is checked rather than trusted.** Replaying the arousal sequence the gate itself saw must reproduce the unhooked run bit for bit; this is asserted in a unit test, again by the driver on all 16 seeds at run time, and the `real` arm was separately verified identical to the sweep's `grp_k4` / `grp_k16` rows on `steady` and on all 20 recovery lags. Note the off-by-one this catches: `_train` records `arousals[t]` *after* the affect update, so it is one step later than what the gate consumed — replaying `arousals` rather than the gate-seen sequence would have silently produced a lag-1 control. - **The gate contrast and the error contrast are measured on the same steps.** `far` is `regime._metrics`'s own `steady_idx`; `post` is the union of the 20 steps each switch opens, i.e. exactly what `recovery[0..19]` averages. Asserted in `test_index_sets_match_the_metrics_the_error_is_measured_on`. - **16 seeds, not 8.** The brief's floor was 8; runs are cheap and the paired comparison is the whole result, so the budget went to seeds. - **What was not changed:** `../ailed` is untouched, and no default in `particles.py` or `regime.py` moved. Every measurement is at the parameters Task 6 was reviewed under. ## What Part C could not do The `real` arm's arousal is closed-loop (it responds to that run's own errors) while the control arms replay a fixed sequence recorded from a different trajectory, so the arms diverge from step 0. This is inherent to the design — a causally-coupled signal cannot also be time-shuffled — and it is the intended contrast rather than a confound, since closed-loop coupling *is* surprise timing. It does mean the controls cannot separate "correlated with this run's surprises" from "correlated with a run's surprises"; nothing in the result turns on that distinction, because the headline comparison on `steady` is a null in every arm.