How should a teacher learn to improve the structured questions that control an Atari player?
We have two goals: work toward mastering every single-agent Atari game exposed by the pinned Arcade Learning Environment with TypeSafe Jev, and discover effective teacher-driven optimizers for structured question policies. We publish the evidence behind each attempt: observations, model inputs and outputs, actions, rewards, videos, and every teacher-authored change to the question program.
The central research question is which ways of selecting experience, assigning credit, proposing edits, retaining candidates and using memory produce repeatable improvements under a measured budget. Finding those optimization patterns is the intended path to a paper. Initially both teacher and Jev weights stay fixed; the question program changes. An automated bounded teacher loop is implemented; its first study stopped in round two. No repeatable optimization benefit has been established.
Freeway ten-round study completed: no revision improved held-out return. Generic and selected Jev both scored 23/26 on final seeds; predictive local controls scored 29/29. Explicit lane lookup improved a reused training rule-execution probe from 23/40 to 37/40, but did not improve native return. All 42 complete recordings and ten rounds are preserved; reported cost US$0.979, zero isolated teacher calls. Results and lessons · Recordings.
Seaquest execution follow-up completed: five rounds separated literal strategy performance from Jev rule execution. The selected wording revision regressed on final movement macro agreement (68.75% to 60.94%) and game mean return (300 to 240). No revision was promoted. Literal controls scored 400 on the same starts; all ten new recordings were audited and preserved. Reported cost US$0.573, zero isolated teacher calls. Results and lessons · Recordings.
Seaquest ten-round study completed and stopped: the training-selected question passed both held-out gates: development mean 80 to 370, final mean 80 to 290, with no seed regression. All 24 episodes and recordings were audited, archived, restored and re-audited. Reported API cost US$2.24. Seven coordinator-authored proposals, zero isolated teacher calls; no mastery or causal feedback-benefit claim. Results · All videos · Evidence and documented HTTP 520 continuation.
Pong stage closed; Seaquest started: the OpenRouter study stopped on HTTP 502 in round two. One completed development round accepted B (+1.5 mean versus V2) and rejected A (-12.5); no final tests ran. All 12 trajectories, including the interrupted one, replayed and are preserved in a verified local archive. Closure report · Evidence · Seaquest first Jev pilot: two completed trajectories scored 80 each, but all 1,108 decisions fit DOWN when objects are active and NOOP otherwise. Observation v2 passed its bounded validation; all pilot/control trajectories and restored archives replayed. Cost US$0.119, zero teacher calls. That pilot did not establish strategy improvement or learning benefit.
Previous teacher study — incomplete: HTTP 402 stopped the criteria-edit study after 15,093 Jev attempts. Three rounds completed and all six evaluated proposals were rejected; two additional proposals lack complete development results. All 27 trajectories replayed, including the interrupted episode. No final tests ran. Report · Local evidence · Protocol. All project research lives in docs/, including the optimizer design, evaluation framework and research roadmap.
Latest Pong Jev probe: Compact wording of the same conservative rule regressed to 62/160 matches (38.75%), versus freshly evaluated expanded wording's 76/160 (47.50%). It failed its prospective screen. All 480 responses are retained in reviewed local evidence; no gameplay or final test was run. Read the report.
Previous Jev probe: On 80 stratified training states, a question with explicit motion-reliability conditions regressed versus its ambiguous parent: 1/16 versus 6/16 matches in the targeted conflict stratum, and 73/160 versus 99/160 overall. All 480 fresh responses are preserved; no gameplay improvement or promotion is claimed. Read the report.
Latest diagnostics: The failed interception question matched its active rule on only 90/598 original decisions. Separately, 16 Python control episodes found mixed strategy results; conservative lookahead had the best training mean but no completed wins. Read the zero-model-call diagnostic study.
Earlier teacher study: One completed A/B round rejected both proposed question changes. The experience-informed interception candidate lost 0:21 twice; the no-feedback lookahead candidate improved one seed and regressed on the other. Round two stopped on a failed teacher call; final evaluation was not run. The report and full replayable evidence preserve 12 episodes, 41,080 Jev attempts and every teacher operation.
Latest long trial: On a fresh development seed, the unchanged v2 Jev question reached the 20,000-frame cap at 7:18 (return -11), with the native match still unfinished. Random, tracking, and interception controls finished at 2:21, 5:21, and 3:21. See the full report and video. This is one development trajectory, not a solved-game or learning claim.
Earlier short-run evidence: On four development seeds with equal 2,000-frame horizons, the vertical-control Jev question achieved -3 net reward, versus -14 for the literal 4px Python rule and -52 for the original Jev question. Jev matched the written rule on only 66.85% of decisions. See the controlled comparison. This is a short-run result, not a solved-game or RL convergence claim. The subsequent no-FIRE wording experiment retains all six actions and reports the full follow-up, including a transport failure.
Watch the latest Pong episode · Experiment journal · Game coverage · Replay and audit guide
Pong research directory · Teacher log and question revisions · Pong evaluation profile
| Track | What Jev predicts | Action selection | Current scope |
|---|---|---|---|
| Direct policy | One Choice question over available actions | Highest action probability | Pong objects; held-out Seaquest object policy comparison; experimental raw RAM elsewhere |
| Value-based | Each action's first scoring outcome within 240 raw frames | P(gain) - P(loss), then argmax |
Pong with fixed heuristic continuation |
The videos use direct policy, not the 240-frame critic. The candidate question explicitly describes vertical tracking, but Jev does not follow that rule exactly. The videos do not show a strategy discovered from scratch. Action probabilities are not Q values.
The value-based research asks whether experience can improve the questions used to estimate consequences. A teacher proposes question changes; actual outcomes and a held-out development gate decide whether they are retained. Jev weights stay fixed. The direct-policy teacher loop has been implemented and attempted, with an incomplete first study. Successful multi-round learning and TD updates remain unestablished.
flowchart LR
E[ALE environment] --> O[Observation adapter]
O --> J[Jev + versioned questions]
J --> A[Validated action selection]
A --> E
E --> R[Recorded transitions and rewards]
R --> T[Teacher proposal]
T --> V[Development evaluation]
V --> J
git clone https://github.com/memorysaver/jev-atari-lab.git
cd jev-atari-lab
git lfs install --local
git lfs pull
uv sync --locked --devPython 3.12 is required. Dependencies are pinned in uv.lock. Videos and reviewed
experiment archives use Git LFS; ROMs and credentials are never committed.
# Discover installed games without making API calls.
uv run jev-atari games
# Boot and exercise every registered game; this is not a gameplay benchmark.
uv run jev-atari games --check --out artifacts/environment-check.json
# Any registered game, using a local random policy.
uv run jev-atari arcade-play --game Breakout --policy random \
--frames 2000 --video --out artifacts/breakout-randomThe pinned installation registers 104 discrete single-agent ALE/*-v5 games;
all passed a short local boot/action smoke test. "All Atari" means that versioned
scope, not every cartridge, mode, or multiplayer variant ever released.
The generic runner exposes 128 RAM bytes and recent history. Those bytes are not
decoded objects. It discovers legal joystick options from the environment and does
not assume RIGHT means physical rightward movement. Game-specific semantic
adapters, startup behavior, and useful policy questions still need validation.
OpenRouter is also supported for Pong action-policy playback through its Decisions
API. Use --backend openrouter with an explicit model ID and response-model pin;
see the migration and bounded pilot. Existing
direct-provider studies retain their original protocol and endpoint.
From the repository root, create a local .env from .env.example
(preserving an existing .env):
[ -e .env ] || cp .env.example .env
chmod 600 .envOpen .env in your editor and set TYPESAFE_API_KEY to your TypeSafe key.
OPENROUTER_API_KEY is optional: leave it empty unless you use the OpenRouter
teacher through --teacher-model. .env is ignored by Git; keep .env.example
as an empty template and never put real keys in tracked files or command arguments.
The application reads environment variables; it does not automatically load
.env. The commands below explicitly load it with uv run --env-file .env.
If you already export the variables in your shell, omit --env-file .env.
Shared credentials: you can instead reuse
~/.config/typesafe/credentials.env across applications on this computer. Keep
its directory/file permissions at 700/600 and replace --env-file .env in the
commands below with --env-file "$HOME/.config/typesafe/credentials.env".
There is no need to copy the key into the repository; each application must
explicitly load the shared file or receive the exported environment variables.
# Reproduce the Pong candidate with object observations.
uv run --env-file .env jev-atari play \
--policy jev-action --program examples/vertical-policy-program.json \
--model jev-1.13.0 --seed 27 --decisions 500 --max-api-calls 550 \
--video --out artifacts/pong-direct
# Experimental transport, not a validated Breakout strategy.
uv run --env-file .env jev-atari arcade-play \
--game Breakout --policy jev-action --model jev-1.13.0 \
--frames 400 --max-api-calls 110 --video --out artifacts/breakout-jevEvery live command needs an HTTP-attempt budget including retries. API waits pause the emulator. Videos use simulation time, not API wall time. Output directories cannot be overwritten. Failures stay incomplete; Jev never silently falls back to a heuristic.
Each decision records its observation, prediction, chosen action and resulting reward.
New CLI runs write model-exchanges.jsonl with request/response JSON bodies and
exchange IDs. Pong runs also write raw-frame RAM, RGB hashes and rewards.
One decision normally covers four raw frames; there are no invented model calls
for the other three frames.
# Restore the published archive, checking SHA-256 before extraction.
uv run python scripts/restore_experiments.py --out restored
# Re-execute recorded actions and verify observations/rewards; no API key needed.
uv run jev-atari replay \
--episode restored/artifacts/policy-online-v1/development-candidate-resumed/seed-27 \
--video --out artifacts/verified-seed-27Early experiments predate raw API exchange logging. Their original predictions, programs, trajectories and outcomes are preserved; missing provider bodies are marked unavailable. Replay can reconstruct intermediate frames but cannot recreate an original API response. See the audit guide.
uv run jev-atari collect --seeds 10 11 --split train --behavior heuristic \
--roots-per-seed 16 --warmup 120 --stride 150 --horizon 240 --out artifacts/train
uv run jev-atari collect --seeds 16 17 --split development --behavior heuristic \
--roots-per-seed 12 --warmup 120 --stride 150 --horizon 240 --out artifacts/development
uv run --env-file .env jev-atari learn \
--train artifacts/train/dataset.json --development artifacts/development/dataset.json \
--backend jev --model jev-1.13.0 --max-api-calls 90 \
--proposals examples/first-event-proposals.json --out artifacts/value-roundThat imported proposal is historical, not fresh learning from the new data. For a
new round, export a train-only teacher-packet, obtain a proposal, then evaluate it.
The optional --teacher-model adapter uses OpenRouter and a separate call budget.
The outcome labels are loss, no point, and gain. The 240 frames include the initial four-frame action; subsequent actions follow a fixed tracking heuristic. This is not a ball-position forecast for frame 240 and is not optimal Q*.
Seed suffixes 0-5 are training, 6-7 development, and 8-9 final test. Never generate teacher feedback from final-test data. Offline prediction improvement does not establish better online play. Keep rejected proposals and unsuccessful runs.
-
Native-match calibration: local baselines, complete games versus frame caps, and the next trial protocol.
-
How Pong is evaluated: full-match scores, short-run limits, and fair comparisons.
-
Fixed-frame Pong controls: same-rule Python/Jev comparison, frozen seeds and shared API budget.
-
Controlled comparison results: all 16 episodes, rule adherence, costs and replayable evidence.
-
Pong policy pilot: seeds, stopping rules, costs and limitations.
-
Value prediction pilot: better Brier score, rejected due to MAE regression.
-
Score versus Choice: offline question-form comparison.
-
Game coverage, research direction, and third-party attribution.
Copyright (c) 2026 Ming-Cheng Ho (memorysaver).
The project's original software, structured-question programs, and accompanying
documentation are licensed under the GNU General Public License version 2 only
(GPL-2.0-only). See LICENSE. Dependencies retain their own licenses;
the OCAtari attribution and main runtime dependency licenses are documented in
THIRD_PARTY_NOTICES.md.
This license does not grant rights to third-party Atari ROMs, game artwork or audio appearing in recordings, or the Jev service and model. Historical experiment archives remain unchanged so their published checksums and provenance stay valid.
If you use this project in research, please cite it using CITATION.cff or GitHub's Cite this repository button. Cite the exact commit or release used for your experiments. This is a citation request, not an additional license term. There is no associated paper or DOI yet; a future paper can be added as the preferred citation and have its own publication license.
uv run pytest
uv run ruff check .
uv run ruff format --check .Tests use local emulators and mocked HTTP, never live model calls. Working artifacts
stay in ignored artifacts/; reviewed releases live in experiments/. All tracked
documentation, prompts, comments and commit messages are in English.