Latent Physics Lab

A JEPA learns to predict a ball's next position from a latent representation of a frame - never from pixels. It trains in your browser.

Sims & toysAiMl
Latent Physics Lab screenshot
World models

Latent Physics Lab

A JEPA-style model learns to predict a ball's next position from a learned representation of a frame — never from the pixels themselves. Everything below trains in this tab, in plain JavaScript.

The world

Orange = ground truth. Hollow = the model's prediction, one step ahead, from latents only. The error readout is the whole point — watch it fall as training runs.

JEPA training
Latent loss—
1-step position error (px)—
8-step drift (px)—
Trained0 steps
Loss curve
How this works

1 · Encode

A small convolutional encoder maps a frame to a latent vector. Two nearby frames produce nearby latents — that smoothness is the whole inductive bias.

2 · Predict in latent space

A predictor maps (context latent, action) toward the target latent. The loss is squared error between representations. No pixel loss is ever computed.

3 · Roll out

Feeding the prediction back in as the next context gives a multi-step forecast. That is the property pixels-reconstructing models do not have.

Back to games

More games