← Latent physics world modelsDocumentation indexGlossaryCode

v3 — 00: Design. The occlusion band: object permanence

Why v3 exists, what changes in the world, where the information has to go, and the experiments that decide whether the model has it.


1. What v1 and v2 could not ask

In v1 the model had to infer something a frame does not show (velocity) from consecutive frames. In v2 it had to read a dynamical property (speed) off an appearance cue (colour). In both, the ball was always visible: at every step the current frame pinned down where it was. The hidden state h only ever had to carry derived quantities.

v3 removes the ball from view. For a stretch of every vertical traverse the frame contains no information about the ball’s position whatsoever. If the world model is to predict where the ball re-emerges, or the agent is to be under it when it does, position itself must be carried in memory, updated by the model’s own dynamics while nothing is observed. That is object permanence — the thing infants acquire around eight months — and it is the first test in this project of whether h is a state estimator rather than a velocity buffer.

2. The change to the world

One addition, rendered on top of everything after the ball is drawn, with the physics untouched:

field value meaning
occluder on draw an opaque horizontal band across the full width
occluder_y (0.28, 0.58) the band’s bottom and top edge in world coordinates
occluder_color a mid grey-blue, distinct from ball, paddle and background static scenery the VAE must learn once

Why those numbers. The ball’s diameter is 0.16, so a band 0.30 tall hides it completely for (0.30 − 0.16) / |v_y| frames — about 9 frames at a typical vertical speed, with roughly 20 frames of partial occlusion around them. The band’s bottom edge at 0.28 means a descending ball reappears only about 10 frames before it reaches the paddle; the paddle needs ~30 frames to cross the box. So a controller that waits to see the ball cannot catch it from far away: it has to commit while the ball is hidden, on the strength of the model’s memory. That is what makes occlusion matter for the agent and not just for the dynamics model.

Everything else is v1: constant speed, one ball colour, the v1 paddle. Mass from colour is left off so the occlusion question is not compounded (the two switches are independent and can be combined later).

The state vector gains a diagnostic column, ball_visible — the fraction of the ball’s area not covered by the band — and the event mask gains a flag for “fully hidden this frame”. Both are for grading only; the model never sees them.

3. Where the information has to go, stage by stage

V (the frame code)

When the ball is fully hidden the frame is pixel-identical for every ball position behind the band. So V cannot encode position on hidden frames, by construction, and a probe of z for ball position conditioned on visibility must show: high R² when visible, near zero when hidden, and something in between when partially covered. That is the correct answer, not a failure — and it is the clean statement of why M has to do more than in v1 and v2.

Two things V does have to get right: render the band as static scenery without spending latent capacity on it, and reconstruct a partially occluded ball correctly (the visible sliver, in the right place).

M (the dynamics)

h must carry the ball’s position through the gap. Experiments:

C (the controller)

The band sits so that a descending ball is invisible during most of the window in which the paddle must move. Tests:

4. What would count as success

claim evidence
V behaves correctly position R² from z ≈ 0.99 visible, ≈ 0 hidden; partial occlusion reconstructed
M has object permanence position R² from h on fully hidden frames > 0.9; exit-time error < 2 frames; exit-x error well below the no-memory baseline; hidden wall bounces predicted above chance
M simulates, not extrapolates wall bounces behind the band handled; memory horizon > the band’s natural occlusion length
C uses the memory flat interceptions per visit across “had to start moving while hidden”; paddle moves toward the landing point during occlusion; z-only controller collapses

Failure modes to watch: M learns “ball vanishes, ball appears” as two events with a learned typical delay but no positional carry-over (exit x uncorrelated with entry trajectory); the VAE encodes the band edges as ball position on partial frames; the dream forgets the ball entirely and re-emerges it at a prior location; and the v2 lesson — velocity drifting during the hidden stretch under sampling.

5. What carries over

Everything: the collector and probe suite (state names from meta), the MDN-RNN and its trainer, eval_rnn, eval_conservation, the dream environment, CMA-ES training with per-controller (V, M) pairing, the by-condition evaluator, and the live viewer (--v3 to be wired). v3 is new questions on the same infrastructure.

Next: 01 — the v3 environment, data and VAE.