# EXP-19: Teamwork credit on Cadence's key-door world, learned composition (M2-SYNERGY)

- Date: 2026-10-08 to 2026-10-09 (outputs timestamped Oct 8 23:59 to Oct 9 00:41) | Cadence version: 0.78.0 / `750c8ef` | Program iter: iter13
- Script: `exp/EXP-19_keydoor_teamwork.py` | Evidence: `exp/EXP-19-fedonly.out` (run 1), `exp/EXP-19.out` (run 2, N=100 clean), `exp/EXP-19-N300-s0.out`, `exp/EXP-19-N300-s4.out`, `exp/EXP-19-N300-s8.out` (run 3, 3 shards of 4 seeds)

## Summary
- Question: when two teachers each teach only half of a sequential skill (take the key; open the door holding it), does the student compose them, and does twin-ablation credit price the pair as synergistic while a fake key gets nothing?
- Setup: benchmarks/keydoor at the protocol-3 operating point, delay 2, `step` teaching. Teachers: A key (+1 for taking the key), B door (starts holding, +1 for opening), F fake key (+1 for the lamp), 0 null trips. Every coalition gets 2N trips, interleaved. Test = 30 greedy full-task trips with no learning. v(S) = score(S) - score(null-only twin). 12 seeds per run. Run 1: N=100, score = fed. Run 2: N=100, score = clean trip (fed with zero wrong presses). Run 3: N=300, clean.
- Prediction: no explicit prediction recorded before running (the RUN GATE did not exist yet; it was added 2026-10-09). The docstring states the design premise "Neither A nor B alone teaches the chain", but it was edited after run 1 (it mentions the "iter13 fix").
- Result: run 1 (fed): contaminated. The null twin passes on 4/12 seeds (1, 3, 5, 10) and the fake F alone scores 1.00 on 3 seeds (4, 5, 11). Run 2 (clean, N=100): v(A) +0.094 (SEM 0.125), v(B) -0.061 (0.088), v(AB) +0.439 (0.145), fakes -0.083, synergy +0.406 (SEM 0.209), about 2 sigma. Run 3 (clean, N=300), pooled over the 3 shards as in the log: v(A) -0.06, v(B) -0.08, v(AB) +0.58 (SEM .15), fake pair -0.08, synergy +0.72 (SEM .18, about 4 sigma), Shapley key +0.31 / door +0.28. AB is fully clean on 8/12 seeds (0, 2, 3, 4, 6, 7, 10, 11). Shard values: v(AB) +0.500 / +0.750 / +0.500; synergy +1.000 / +0.750 / +0.417.
- Verdict: SUPPORTIVE, logged as "M2-SYNERGY CROSSED for LEARNED sequential composition on real Cadence brains" (iter13). Not retracted. Run 1 is VOID (degenerate metric) and was replaced by the clean-trip score. XOR-style representational synergy is still open.

## Reflection
- What it means: a real Cadence brain composed two lessons that are each worth about 0 alone into a skill worth +0.58, a fake key earned nothing, and Shapley split the credit nearly evenly. This turned the attribution score into a score on lessons, and that opened the teaching-game thread (EXP-20b, EXP-21).
- Process: run 1's metric could be passed by a degenerate interact-everything policy (untouched founders and the fake passed). That cost a full run. It is now named in the RUN GATE METRIC line ("no EXP-19 fed-only repeat"). The script was edited in place between runs and the fed-only version was not kept as .bak. Run 2 at N=100 was under-powered and sloppy (about 2 sigma; the door teacher interfered with the key skill). The evidence is coarse: per-seed scores are almost all 0.00 or 1.00, so the effective sample is 12 binary outcomes. The 4 seeds where AB fails (1, 5, 8, 9) never learn the chain, so the result is partly a student-init effect. In shard s0, the negative v values for A, B, F and FB come entirely from seed 3's null twin passing (null 1.00). Run 3 has no combined output file: the pooled numbers in the log are means of the three shard summaries, and the pooled SEMs are printed in no .out (they can be recomputed from the per-seed lines; rechecked: v(AB) SEM 0.149, synergy SEM 0.178). The log says the fake passed 2 seeds in run 1; `EXP-19-fedonly.out` shows F alone at 1.00 on 3 seeds (4, 5, 11). The saved script was last modified at 00:17:57, after run 2 had started (it finished at 00:19:22 after 1210 s, so it began about 23:59) and just before the run-3 shards began (about 00:18), so the saved script is the run-3 version and the exact run-2 code was not kept either. One small world, one delay (2), 12 seeds.
- Lesson: before a long run, check that the score cannot be passed by a degenerate policy, and keep the old script version when the metric changes. The budget N has to be large enough for the composed skill to appear (100 was too small, 300 worked).
- Next: queued EXP-21 (the full lesson payoff table on real students) and EXP-20b (learning teacher brains playing that table). That started the heritable teaching game (iter14 onward).
