Make the world executable.
Program World Model is an open research program studying worlds written as code — where rules can be inspected, state persists out of view, and every action leaves a trace another system can test.
Core research pillars
Program World Model
Exploring executable world modeling across three workstreams — a comprehensive field survey (live), plus an evaluation benchmark and modeling method currently in progress.
A model becomes a world model
when its consequences can run again
Trigger actions against an explicit world state, compare rule interventions, or inspect how programmatic state separates dynamics from pixel rendering.
def step(state, action):
s = state.clone()
if action == "pickup(brass_key)":
s.has_key, s.key_on_floor = True, False
elif action == "activate(iron_door)":
# Gate rule: door only opens when key is held
if s.has_key:
s.door_open = not s.door_open
elif action == "toggle(redstone_lamp)":
s.lamp_on = not s.lamp_on
elif action == "camera.pan(away)":
s.camera_occluded = not s.camera_occluded
s.tick += 1
return s, render(s)
{
"tick": 0,
"has_key": false,
"door_open": false,
"lamp_on": false,
"camera": "room_view"
}
# Standard binding (Control Branch B)
on_event("pull_lever_north"):
set_state("oak_door", open=True)
set_state("trapdoor", open=False)
Observations → Explicit State & Rules
Parse visual observations and interaction history into structured entities, state variables, and executable rule hypotheses.
(o0:t, a0:t-1) → (st, W)
State + Action + Edit → Next State
Compute deterministic or hybrid consequences under priorities, scheduled events, revocations, and out-of-view persistence.
W.step(st, at, editt) → st+1
Authoritative State → Aligned Pixels
Render state transitions into visual frames without corrupting underlying state facts — scored by reading visible state back out.
render(st+1) → ôt+1 ↔ readout(ôt+1)
Find the authority
before naming the model
L0–L4 are not capability ranks or a chronological timeline — they locate who decides s_t+1. Our center of gravity sits at L2 (Code) and L3 (Hybrid).
Code World Model
Explicit world state + executable rules, procedures, and events.
✓ Interpretable, inspectable, persistent state, verifiable planning & counterfactuals.
✕ Inducing complex open-world dynamics purely from raw pixels remains challenging.
What does code
actually own in a world?
A rendered frame can look plausible while the next action starts from the wrong place. Drag the divider to compare pixel-only continuation with an executable program world.
chest.items = 3
obs = occluded · state intact
world.step() verified exact count
frame looks crisp (FVD low)
context leaves attention window
no program ever stored consequence
Built around three
operational invariants
Rules that run
World laws are written as executable code rather than hidden exclusively inside black-box weights — inspectable, editable, and unit-testable.
State that persists
Objects, inventories, and scheduled timers continue evolving coherently even when the camera looks away for dozens of steps.
Observations that align
Visual rendering is grounded in authoritative program state so what an agent sees matches the world it can act upon next.
Build worlds that can answer back.
Start with our 265-paper Survey & L0–L4 System Matrix, or follow the open-source bibliography on GitHub.
git clone https://github.com/FreedomIntelligence/Awesome-Code-World-Model.git