Skip to content

Commit cb8e1c7

Browse files
tacioclaude
andcommitted
B-POC-3: world model + learning progress through the unchanged ES core
Vision B rung 3. TransitionDomain makes transitions plain ExamplePairs, so the generic fitness/fit_operator/ESWorkspace fit the world model with zero new learning machinery. WorldModelMemory = per-cell softmax-SELECTOR over {9 patch cells, brush, empty} (a tanh value head learns gates but cannot emit graded colour copies: departures 113/113, arrivals 0/115 - the Rung CF expressivity lesson at 400-param scale); 0.625 held-out changed-cell accuracy where identity scores 0. LP = ES fitness slope: LP(novel gravity) = 22x max(LP(mastered), LP(contradiction-scrambled)) while the scrambled region keeps 8.7x the mastered raw error (noisy-TV immunity, gated). LP- guided collection beats uniform 0.362 vs 0.153 at equal 600-transition budget over {2 gravity contexts + TV static}; the allocator that works is the windowed changed-cell SCORE slope - MSE-slope LP chased the noise's mean, clone-probe LP measured memorizability (both documented in-code). Honest residuals in JOURNAL: paint events unlearned; paint-biased data made it worse; fits are schedule-sensitive. Test is suite-tier full (~4 min), bit-deterministic. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 6b0ef3e commit cb8e1c7

6 files changed

Lines changed: 1085 additions & 5 deletions

File tree

docs/ARCHITECTURE.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,12 @@ the ES meta-learns only the small slow vector.
234234
sigmoid-threshold read, whole 2-level rule inferred in-context), `GridCountMapSelfModMemory`
235235
(arbitrary count→colour maps: meta-learned scoring salience + soft count-bin value table).
236236

237-
## Vision B sandbox — `src/sandbox.mojo`, `src/novelty_es.mojo`, `src/map_elites.mojo`, `src/empowerment.mojo`
237+
## Vision B sandbox — `src/sandbox.mojo`, `src/novelty_es.mojo`, `src/map_elites.mojo`, `src/empowerment.mojo`, `src/world_model.mojo`
238238

239239
The B-POC-1 pair (open-ended rung 1): a reward-free world + the NS-ES intrinsic-fitness driver;
240240
plus the B-POC-2 repertoire (rung 2): the persistent elite-per-cell skill library; plus the
241-
B-POC-2.5 second intrinsic signal (exact empowerment).
241+
B-POC-2.5 second intrinsic signal (exact empowerment); plus the B-POC-3 world model + learning
242+
progress (rung 3).
242243

243244
- `sandbox.mojo` — a deterministic 16×16 gridworld with **no reward channel**: an avatar with 6
244245
actions (move×4 / paint / cycle-brush) under ONE parameterizable dynamics rule (gravity;
@@ -276,6 +277,18 @@ B-POC-2.5 second intrinsic signal (exact empowerment).
276277
the candidate rollout's final state via `sandbox_rollout_state`, which also hands back final
277278
avatar r/c/brush); it counts its enumeration ticks for the uncharged-cost caveat (budgets stay
278279
denominated in rollouts).
280+
- `world_model.mojo` — the **world model + learning progress** (B-POC-3). `SandboxState` /
281+
`TransitionDomain`: a transition is an `ExamplePair[SandboxState]`, so the UNCHANGED generic ES
282+
core fits the model — no new learning machinery. `WorldModelMemory` is a per-cell local
283+
predictor with a learned **softmax-selector head** over value sources {9 patch cells, brush,
284+
empty} (dynamics are selections; a tanh value head provably cannot emit graded colour copies —
285+
see the module comments for the measured head comparison and the seed-saddle fix).
286+
`lp_probe` = instantaneous LP as the ES fitness slope (clone, fixed constant-α/σ stage,
287+
delta). `train_uniform` / `train_lp_guided` = the equal-budget collection arms over regions =
288+
dynamics contexts (gravity directions + a TV-static region); the guided allocator uses the
289+
windowed **changed-cell score slope** on held-out per-region validation batches (MSE-slope and
290+
clone-probe LP both fail as allocators — documented in-code), with per-round training on a
291+
bounded subsample of the cumulative pool.
279292

280293
## Drivers — `src/main.mojo`, `src/arc_solve.mojo`
281294

@@ -371,7 +384,11 @@ fast/full tiers).
371384
tick; fully deterministic under `seed(0)`); `test_empowerment` (**B-POC-2.5**: exact-empowerment
372385
sanity — corner < open field, within n·log₂6 — and an empowerment-only emitter builds ≥2× the
373386
equal-budget random-policy repertoire, 100 % replay; the empowerment-vs-novelty head-to-head is
374-
printed ungated; fully deterministic under `seed(0)`).
387+
printed ungated; fully deterministic under `seed(0)`); `test_world_model` (**B-POC-3**,
388+
suite-tier full ~4 min: the world model reaches ≥0.4 held-out changed-cell accuracy where
389+
identity scores 0; LP separates novel ≥10× from mastered AND contradiction-scrambled while the
390+
scrambled region keeps ≥1.5× the mastered raw error; LP-guided collection beats uniform by
391+
≥0.08 held-out changed-cell at equal transition budget; fully deterministic under `seed(0)`).
375392

376393
Phase-A expressible subset = {identity, flip_h, flip_v, transpose, recolor}; `shift` deferred (the
377394
affine zero-fills, synth `_shift` wraps).

docs/JOURNAL.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,3 +2294,58 @@ Signal sanity is gated directly with no search: corner empowerment (7.62 bits) <
22942294
(8.27) < n·log₂6 (10.34). Wall-clock note: n = 4 enumeration is 0.7 ms/eval and the whole
22952295
three-arm test runs in ~6 s — exhaustive exact empowerment is entirely affordable at this world
22962296
size, vindicating the "small symbolic world on commodity hardware" bet (value #5).
2297+
2298+
**2026-07-10 20:16 — B-POC-3: a world model + learning progress, and three wrong LP allocators (`src/world_model.mojo`, `test_world_model`).**
2299+
Vision B rung 3, the densest calibration story so far. The seam worked exactly as designed: a
2300+
transition is an `ExamplePair[SandboxState]` of a new `TransitionDomain`, so the UNCHANGED generic
2301+
ES core (`fitness`/`fit_operator`/`ESWorkspace`) fits the world model with zero new learning
2302+
machinery — the strongest reuse proof yet for the Domain/Memory abstraction.
2303+
2304+
**The architecture had to be found by measurement.** Three heads, each diagnosed by a per-event
2305+
breakdown (departure / arrival / paint) of held-out changed-cell accuracy:
2306+
- Squash head (MLPMemory-style): plateaus at 0.46 changed — and identically from a zero seed or a
2307+
colour-LUT basis seed, so colour separation was NOT the wall.
2308+
- Residual head (out = centre + bounded delta): identity exact at zero weights; learns DEPARTURES
2309+
perfectly (113/113 — a saturating gate) but arrivals 0/115: a tanh value head cannot emit an
2310+
exact graded COPY of a neighbour's colour. This is the Rung CF expressivity lesson reproduced in
2311+
a 400-parameter miniature.
2312+
- **Selector head (landed): softmax over value sources** {9 patch cells, brush, empty} — the
2313+
dynamics are selections ("take the colour from above"), and selection is ES-learnable where
2314+
graded synthesis is not: 0.625 held-out changed-cell (identity = 0, chance ≈ 0.1), overall 0.991.
2315+
Two landscape traps en route: the all-zero seed is a TOTAL saddle for a two-layer selector (hid
2316+
= 0 kills W2's first-order signal AND W1 routes through W2 = 0 — the ES measurably never moved;
2317+
fixed by a deterministic pseudo-random W1/b1 seed), and WM_HID = 16 froze outright where 12
2318+
climbs (bigger ≠ better for ES landscapes). Honest residual: the PAINT event (rare agent-writes,
2319+
~17 instances/batch) is never learned; paint-biased collection made everything WORSE (busier
2320+
grids harden the gravity patches faster than they soften paint) — booked as a limitation, the
2321+
fix is curriculum not data flooding. Also booked: the fit is schedule-sensitive (a narrow
2322+
0.1-anneal never learns events; wide 0.3 → fine staging is load-bearing), and avatar-position
2323+
INDICATOR features (at-cell / directly-above) were needed — exact-position conditions cannot be
2324+
carved from graded offset ramps.
2325+
2326+
**Gate 2 (LP separation) needed two redesigns to be honest.** A cyclic-shift target scramble turned
2327+
out LEARNABLE (a shift-by-one target is the state two gravity ticks ahead — the model made real
2328+
progress on it). The landed construction is symmetric and airtight: mastered = a copy of the batch
2329+
the model was just trained on; unlearnable = another copy of the SAME batch made CONTRADICTORY
2330+
(distant pairs share an identical input with two different targets — no function fits both, at any
2331+
model state, immune to memorization). Measured: LP(novel gravity) = 22× the max of the other two,
2332+
unlearnable raw error 8.7× mastered with LP ≈ 0 — the noisy-TV immunity, gated at 10×/1.5×.
2333+
2334+
**Gate 3 (LP-guided > uniform) burned through two allocators before the honest one:**
2335+
1. Clone-probe LP (fit a clone on a 16-transition probe batch) measures batch MEMORIZABILITY —
2336+
rel-LP ≈ 1.0 forever on any real region.
2337+
2. MSE-slope LP on validation batches chased the NOISE: the TV-static region's error floor (~−18)
2338+
is 100× the real regions', so learning the noise's mean is a huge one-off absolute delta — the
2339+
allocator handed every round to static (and, absurdly, still "won" once — a pass for the wrong
2340+
mechanism is a fail).
2341+
3. **Windowed CHANGED-CELL SCORE slope (landed):** the discrete exact-match currency is scale-free
2342+
and mean-learning never moves it — static reads ≈ 0 from round one (one rounding blip in round
2343+
2, self-extinguished by round 3: 0.101 → 0.007 → 0.002, visible in the test's printed trace).
2344+
Result: **LP-guided 0.362 vs uniform 0.153 (2.4×)** at an equal 600-transition budget, gate
2345+
locked at +0.08 (measured delta 0.209). Also load-bearing: per-round training samples a bounded
2346+
slice of the CUMULATIVE pool (per-round-only pools gave catastrophic churn — the last round's
2347+
focus overwrote everything).
2348+
2349+
Test is `# suite-tier: full` (4m04s, bit-deterministic across a double-run). The rung's one-line
2350+
moral for RESEARCH-NOTES: *LP is the right signal, but only in the right currency — the ES fitness
2351+
slope diagnoses learnability; allocation must use the uncheatable discrete score's slope.*

docs/RESEARCH-NOTES.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,30 @@ concentration advantage in THIS world — revisit when B-POC-5 mutates the rules
235235
genuinely constraining states. Cost honesty: the budget stayed rollout-denominated by design
236236
choice; the enumeration spent ~24× the charged ticks (printed in-test as the uncharged caveat).
237237

238+
**Addendum (2026-07-10, B-POC-3 build).** Rung 3 landed (`src/world_model.mojo`): the world model
239+
is fit through the UNCHANGED generic ES core (transitions = `ExamplePair`s of a `TransitionDomain`
240+
— §4's "grid world model needs no VAE" confirmed in practice), and "our ES fitness trajectory is a
241+
free LP meter" survived contact with three amendments:
242+
1. **LP is currency-sensitive.** The fitness (MSE) slope correctly *diagnoses* learnability
243+
(novel = 22× mastered/unlearnable — gated), but as an *allocator* it chases the noisy TV: error
244+
scales differ 100× across regions and learning the noise's MEAN is a huge one-off MSE delta.
245+
Clone-probe LP fails differently (measures batch memorizability). The allocator that works is
246+
the windowed **discrete-score slope** (held-out changed-cell accuracy per region) — scale-free,
247+
and mean-learning never moves it. LP-guided beat uniform 0.362 vs 0.153 at equal budget.
248+
2. **The deterministic noisy TV must be constructed carefully**: target-shuffling is LEARNABLE
249+
(shift-by-one = two gravity ticks ahead); the airtight device is CONTRADICTION (duplicate
250+
inputs, different targets — unfittable by any function, immune to memorization) for the static
251+
diagnostic, and pseudo-random targets (TV static) for the collection loop.
252+
3. **The dynamics are selections, not values**: a tanh value head learns saturating gates
253+
(departures 113/113) but cannot emit a graded copy of a neighbour's colour (arrivals 0/115);
254+
the landed head is a learned softmax SELECTOR over {patch cells, brush, empty} — the AttnGather
255+
/ Rung CF content-fetch expressivity lesson reproduced at 400-parameter scale, and a hint that
256+
selection should be the default read primitive across the engine.
257+
"Return-then-explore over the archive" was realized as regions = DYNAMICS CONTEXTS (the gravity
258+
directions — the UED surface); spatial return-then-explore over stored elites folds into
259+
B-POC-4/5. Honest residual: rare agent-write events (paint) stay unlearned; paint-heavy data made
260+
things worse — the fix is curriculum, which is what B-POC-5's UED is for.
261+
238262
---
239263

240264
## 2026-07-08 — Content-addressed construction (the deep-floor negative)

docs/ROADMAP.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ learns both *what* to think and, eventually, *how* to learn.
4949
the M8 operator ceiling 5/1000). See "Next — the path to full ARC-AGI 2" below for the
5050
measurable rungs. Still hands the engine *goals* (a task's demonstration pairs are
5151
compressed supervision) even though it never hands it a DSL.
52-
- **Vision B — open-ended mastery (active — B-POC-1, B-POC-2 & B-POC-2.5 done 2026-07-10).** Inspired by
52+
- **Vision B — open-ended mastery (active — B-POC-1 through B-POC-3 done 2026-07-10).** Inspired by
5353
Random Network Distillation, open-endedness, and unsupervised RL: an agent that masters its
5454
environment with **zero hand-coded goals** — intrinsic motivation (self-generated novelty) replaces
5555
the demonstration pairs entirely. This is a stricter reading of the mission than Vision A (it drops
@@ -86,7 +86,22 @@ learns both *what* to think and, eventually, *how* to learn.
8686
flattens the optionality landscape (mean elite empowerment ≈ equal across all arms, ~7.9 bits),
8787
so empowerment buys no concentration advantage here. Caveat: enumeration spends ~24× the charged
8888
rollout ticks (printed, uncharged by the locked design choice).
89-
Next rung: B-POC-3 (world model + learning progress).
89+
**B-POC-3 landed 2026-07-10** (`src/world_model.mojo`, `test_world_model`, suite-tier full ~4 min):
90+
the first **world model** — transitions are just `ExamplePair`s of a new `TransitionDomain`, so
91+
the *unchanged* generic ES core fits a per-cell selector-head predictor (softmax over
92+
{9 patch cells, brush, empty}: gravity = "take the colour from above", learned, never written
93+
down) to **0.63 held-out changed-cell accuracy** (identity predictor = 0 there). **Learning
94+
progress** = the ES fitness slope: LP(novel gravity) = 22× max(LP(mastered), LP(contradiction-
95+
scrambled)) while the scrambled region keeps 8.7× the mastered raw error — the noisy-TV immunity,
96+
gated. And **LP-guided collection beats uniform 0.362 vs 0.153** (2.4×) at an equal 600-transition
97+
budget over {2 gravity contexts + TV static}: the allocator that works is the *windowed
98+
changed-cell SCORE slope* on held-out validation batches — MSE-slope LP measurably chased the
99+
noise (learning the noise's mean is a huge one-off MSE gain), clone-probe LP measured batch
100+
memorizability; the discrete score is immune to both. Honest residuals booked in JOURNAL: the
101+
paint event (rare agent-writes) stays unlearned at this data scale, and the value-vs-selector
102+
head comparison (a tanh value head learns gates but cannot emit graded colour copies) is the
103+
Rung-CF expressivity lesson reproduced in miniature.
104+
Next rung: B-POC-4 (the convergence test — repertoire → held-out few-shot transfer).
90105
- **Convergence hypothesis.** The two visions are expected to meet: primitives discovered by
91106
open-ended exploration (Vision B) become the reusable vocabulary that few-shot composition
92107
(Vision A) draws on to solve a task fast from a handful of examples — unsupervised "pretraining"

0 commit comments

Comments
 (0)