Φ

FULL DOSSIER · 01 / 05

The Oracle

Forecaster / Rollout Planner

Lives one move in the future so the body does not have to.

4D · live
runtime log01 / 05

$snapshot console — state saved

What it does in the loop

01

snapshot console — state saved

forking the whole world

02

expand 24 candidate macros · 1 ply

dreaming every next move

03

score rollout · +distance / −death

watching how each future ends

04

core._restore() — rewind to now

un-remembering the futures

05

commit best macro · 845 : 1 imagined

whispering the winning move to the hands

The mechanism

How it works

A forward-model planner over a deterministic emulator. At every decision point it calls core._backup() to snapshot the full console state, then expands 24 candidate macros — jump4 through jump32 (hold length equals height), run6/12/18/24_jump, brake_leap, back_leap, long_back_leap, run, walk, hop_walk, halt, halt_long, edge_wait, duck, plus rand{n}_{i} random frame-programs minted live when stuck. Each macro is a fixed-length input program, not a single button press.

Each candidate is scored on forward progress minus a death penalty. After all 24 are evaluated, the emulator is restored to the snapshot and the single best macro is committed to the real run. Search depth is a flat greedy 1 — one macro ahead, no lookahead tree, no learned value function, no per-game heuristic. This is the entire algorithm.

Pooled across both published NES runs (SMB 1-1 and Lost Levels marathon), the Oracle burned 5,497,609 simulated frames to make 6,729 real decisions — about 845 imagined frames per real one. The emulator handles backup+restore at roughly 67,832 operations per second, so the bottleneck is the simulation itself at ~739 frames per second, not the snapshotting.

Constants

The real numbers

Search depth
1 (greedy)
Branching factor
24 macros / ply
Imagined : played ratio
845 : 1
Total sim frames (NES)
5,497,609
Total real decisions (NES)
6,729
Backup+restore throughput
~67,832 ops/s
Frame advance throughput
~739 fps
Value function
none
Per-game code
none
Training data
none

WHERE THE ORACLE FAILS

Depth 1 is greedy. It sees one move ahead and commits. A trap that takes two moves to spring — a platform you must wait on, a pipe you must duck into, a gap that requires a running start from further back — is invisible. The Oracle walks into it at full speed, every time, because every single-move evaluation says "forward is better."

Its budget is enormous and most of it is thrown away. 845 imagined frames per real one means 844 of them were wrong. The information in those failed rollouts is discarded completely — nothing is learned, nothing is cached, nothing transfers to the next decision.

It needs a world it can snapshot. Where it cannot save and restore — where the environment is non-deterministic, or where the state is too large to copy — the Oracle is blind. No rewind, no search, no advantage over random.

SMB 1-3 was never solved. Best x-position 627, 3,788 rewinds wedged at x=312. The level requires waiting for a scheduled moving platform, and a greedy depth-1 search will never choose to stand still when it could move forward. Both Lost Levels marathons eventually wedge for the same reason.

Walker2d is a published loss: −24.96 vs random +0.35. MountainCar is a published tie: −200 vs −200. Both are on the Brain page, unedited.