# CAIN-2027 Evolution 104: hidden-precondition discovery, measured — a negative result the gate caught

Preregistered before the sealed runs. Gate counts: {'PASS': 3, 'PARTIAL': 1, 'FAIL': 4}. Not AGI or VAGI. No external reviewer.

## Why this target
E102's sealed failures were mostly key-and-door worlds where the organism already knew the mechanics but ran out of steps before discovering that a wall opens only after visiting a hidden key. The development runs (16 grid tasks, 12 service-lock incidents) suggested a generic fix: after m blocked moves while following an optimistic plan, explore systematically, and return to planning when a believed wall proves passable (key-and-door 9 to 14 of 16).

## Result
| test | status | evidence |
|---|---|---|
| Failure analysis (E102 sealed failures) | **PASS** | 35 of 48 failures were key-and-door worlds, 47 of 48 with the mechanics already identified: the bottleneck is hidden-precondition discovery |
| Learning from experience (bandit over the trigger) | **PARTIAL** | UCB1 over 160 training episodes chose m = 5 (pulls {'None': 23, '2': 35, '3': 29, '5': 39, '8': 34}); the unpaired training estimate favoured it |
| Strict acceptance (validation + confirmation) | **PASS** | the gate REJECTED the learned skill: validation 84 vs 84 of 100 solved (McNemar p = 1); mean steps 25.84 vs 25.17; confirmation 86 vs 87 of 100 solved (McNemar p = 1); mean steps 24.34 vs 23.66. The gate worked: it stopped a skill that does not help |
| H1 sealed grid (300) | **FAIL** | 256 vs 257 of 300 solved (McNemar p = 1); mean steps 24.133 vs 23.37 |
| H1b key-and-door (60) | **FAIL** | 35 vs 35 of 60 solved (McNemar p = 1); mean steps 50.483 vs 47.1 |
| H1c no loss on other families (240) | **PASS** | 221 vs 222 of 240 solved (McNemar p = 1); mean steps 17.546 vs 17.438 |
| H2 cross-domain precondition (service lock, 100) | **FAIL** | 18 vs 18 of 100 solved (McNemar p = 1); mean steps 56.17 vs 55.87 |
| Plain service, no loss (100) | **FAIL** | 54 vs 65 of 100 solved (McNemar p = 0.019); mean steps 42.86 vs 40.06; a significant LOSS: the switch would have harmed this domain |

## Reading
- **The idea does not hold up.** The development gain came from 16 tasks and did not replicate on 60 sealed key-and-door worlds (35 vs 35), on the sealed grid set (256 vs 257) or on the service-lock domain (18 vs 18), and it significantly hurt plain service incidents (54 vs 65).
- **The bandit was fooled; the paired gate was not.** The bandit compared arms on different tasks, so an arm that drew easier tasks looked better. The preregistered paired validation and confirmation sets showed no effect and rejected the skill before the sealed test. This is the E103 lesson put to work: an acceptance gate that requires paired significance and a confirmation set.
- **The real bottleneck remains open:** finding the hidden key within the step budget. E105 should model where preconditions are likely to be (an exploration prior learned across episodes) rather than when to switch strategies.

Verify: `python3 -I verify_e104_offline.py .` recomputes every comparison from `rows.json` (stdlib only).

Team: Vincent Noriega (founder), Lena Noriega, Monica Diaz.
