From my workbench Game learning

Teaching an AI to play Pluto’s Corner

I wanted to see whether eight extra gameplay demonstrations helped a small AI finish the first kitchen level in Pluto’s Corner, a Game Boy platformer, without losing health or a life.

Lil’ Matchy stands beside an oven and kitchen platforms in Pluto’s Corner.
Actual game capture / author supplied

The kitchen setting in Pluto’s Corner. This frame comes from the game author’s gameplay animation; it illustrates the game, not one of my benchmark trials.

Pluto’s Corner by bbbbbr · CC BY-NC-SA 4.0. Frame extracted without changing the gameplay pixels.

I taught a small AI to play Pluto’s Corner, a homebrew Game Boy platformer by bbbbbr. It had to finish the first kitchen level without losing health or a life. Then I gave it eight extra examples of how to get past trouble spots and tested whether those examples helped.

Goal

The game follows Lil’ Matchy through rooms full of platforms and obstacles. My test covered Kitchen Counter 1: guide the character through the complete first kitchen level, stay alive and reach a state where the next stage can begin.

I wanted to know whether better teaching examples could improve the player. Both models could already copy every labelled action in their training and model-selection data. That sounds lovely until you remember that copying examples and actually finishing a level are different jobs. The game gave me a concrete way to check the second one.

Process

The player was a small visual model. It received two recent game images and a history of button presses, then chose controller actions. During the scored attempts it had no hidden game-memory input, language-model helper or search routine choosing moves for it.

I trained two versions on the same Ubuntu CPU host. The control used 13 groups of successful demonstrations. The other version used those same groups plus eight verified correction sequences: 780 extra labelled frames showing how to get past difficult sections. Each sequence paired game images with button presses and had to replay correctly before becoming training data. The model design, training settings and maximum budgets stayed the same.

Before training either version, I froze ten test situations with small changes in starting position and timing. Each attempt covered the full kitchen route. Passing meant finishing without health or life loss, reproducing the recorded actions exactly, and passing a separate check that the next stage was ready. So 10/10 means ten successful attempts at this one level, not ten different levels or games.

The machines behind this test

What I ran it on.

Recorded Ubuntu CPU host

CPU-only training, emulator evaluation and exact replay checks. The run used four Torch CPU threads with CUDA disabled; the original records do not establish the CPU model, RAM or a match to a currently named lab machine.

These results were produced on Ubuntu CPU, not on the Mac or a GPU. The Mac was checked read-only before becoming unreachable; no new Mac deployment or Mac-visible gameplay run is claimed. Current machine inventory is not substituted for unrecorded historical components.

Lil’ Matchy stands on a chair beside a couch in another room of Pluto’s Corner.
Actual game capture / author supplied

Another room in Pluto’s Corner shows the same side-view platforming. My benchmark covered the first kitchen level only; this author-supplied frame is not a scored trial.

Pluto’s Corner by bbbbbr · CC BY-NC-SA 4.0. Frame extracted without changing the gameplay pixels.

Outcome

In the first comparison, the version with correction examples finished 10/10 attempts. The control finished 7/10.

I then repeated the complete collection, training and testing workflow. The corrected model reproduced the same saved weights and again finished 10/10. The newly retrained control had different weights and finished 5/10, despite the same nominal training seed. I have not isolated the numerical cause of that difference.

All 40 control and candidate traces across the two completed comparisons replayed exactly, including their final emulator states. The two graphs below keep the original and repeated comparisons separate.

The numbers behind the story

Here’s what I measured.

Recorded result
Bar comparisonUnit: successful trials / 10Gate: 10

Corrective data vs a same-host retraining control

Conditions: Ubuntu CPU · initial paired full-kitchen evaluation

Corrective data vs a same-host retraining controlRetraining control: 7 successful trials / 10; Candidate: 10 successful trials / 10. One level and nearby starts, not broad game competence. All recorded traces replayed exactly; the incumbent was not replaced.Retraining control7Retraining control: 7 successful trials / 10★ Candidate10Candidate: 10 successful trials / 10Gate: 100successful trials / 10
  1. Retraining control7 successful trials / 10
  2. ★ KeyCandidate10 successful trials / 10

Unit: successful trials / 10 · Gate threshold: 10 successful trials / 10

Limit: One level and nearby starts, not broad game competence. All recorded traces replayed exactly; the incumbent was not replaced.

View data table & source provenance
Corrective data vs a same-host retraining control · successful trials / 10
ConfigurationValue (successful trials / 10)
Retraining control7
★ Candidate10

Origin: structured measurements. Revision 6550ead3945b.

Download measurement metadata (JSON)
Recorded result
Bar comparisonUnit: successful trials / 10Gate: 10

The repeat preserved the candidate result

Conditions: Ubuntu CPU · repeated set · newly retrained control

The repeat preserved the candidate resultRetraining control: 5 successful trials / 10; Candidate: 10 successful trials / 10. One level and nearby starts, not broad game competence. The control had different weights and reached 5/10. Repeating a set adds no new holdout trials.Retraining control5Retraining control: 5 successful trials / 10★ Candidate10Candidate: 10 successful trials / 10Gate: 100successful trials / 10
  1. Retraining control5 successful trials / 10
  2. ★ KeyCandidate10 successful trials / 10

Unit: successful trials / 10 · Gate threshold: 10 successful trials / 10

Limit: One level and nearby starts, not broad game competence. The control had different weights and reached 5/10. Repeating a set adds no new holdout trials.

View data table & source provenance
The repeat preserved the candidate result · successful trials / 10
ConfigurationValue (successful trials / 10)
Retraining control5
★ Candidate10

Origin: structured measurements. Revision 6550ead3945b.

Download measurement metadata (JSON)

Findings

The corrected version cleared this small test set in both runs. That is useful evidence for these correction examples and this task. It is not a general claim that an AI has learned to play arbitrary games.

The repeat used the same evaluation situations, so it did not create a fresh set of unseen tests. Everything covered one level and one model-training seed. The control’s change from 7/10 to 5/10 also means I cannot claim deterministic retraining or a stable population win rate.

The correction demonstrations needed a separate search process to find safe routes. Those demonstrations were teaching material; they were not independent successes by the trained player. Keeping that distinction is rather important when the whole question is whether the player can act on its own.

Conclusion

For this first kitchen level, adding eight checked gameplay demonstrations gave me a candidate that passed the strict local test. I would try more training seeds, new starting conditions and other levels before calling it broadly reliable. A clean training score still needs to earn its keep in the game.

This was CPU-only work on Ubuntu. The earlier Mac models stayed in place, and this experiment did not install or validate a new player on the Mac.

Pluto’s Corner and the credited gameplay captures are by bbbbbr, under CC BY-NC-SA 4.0. The screenshots show the actual game from the author’s published animation. They are not frames from my benchmark; the recorded results are supported by the original run records and graphs.

A separate visual metaphor

A lime bridge repairs a copper track through a checkpoint beside a fictional CPU test platform, with a disconnected graphics card on a rear shelf.
Concept / measurement boundaryAI-generated editorial illustration. A repaired route through a fictional test chamber represents learning from verified corrections. It is not a game screenshot, a photograph of tested hardware or evidence of measured performance.
My original experiment notebook and source records

The question

Corrective trajectories were added to a fresh same-host training comparison on Ubuntu CPU. The initial and repeated results stay separate, including the control’s changed weights, so the result is not presented as a direct improvement over the earlier Mac experiment.

From the original notebook

Measured 30 September 2026. This experiment ran on the user’s Ubuntu 12700 host, CPU only, after the Mac became unreachable through both Desktop Commander and SSH. It is NOT a new M5 measurement or a deployment to the Mac.

Result and comparison boundary

The corrected student passed 10/10 full Kitchen Counter 1 trials, versus 7/10 for a matched same-host retraining control. All ten candidate trajectories preserved health 3 and lives 3, replayed exactly (including terminal snapshots), and passed the separate neutral next-stage readiness check. The strict gate passed. No existing checkpoint was overwritten or automatically replaced.

The control was freshly trained on Linux from 13 successful source-start groups. It is NOT the original Mac V3 checkpoint. Consequently, this result must not be presented as a direct improvement from the Mac’s historical 8/10 to 10/10. Both new models use identical code, architecture, seed, optimizer, action catalogue, model-selection starts, and maximum training/evaluation budgets. The controlled difference is eight additional verified correction trajectories.

Property Control Corrected candidate
Training start groups 13 21
Training labelled frames 1,277 2,057
Selection groups / frames 2 / 199 2 / 199
Full-stage successes 7/10 10/10
Independent model-weight seed repetitions 1 1

These are nearby position/timing variations of ONE level, not independent games. They do not establish a population win rate, robustness to arbitrary disturbances, or a full-game victory. A single training seed is not an across-seed estimate.

What changed

pluto_correction.py adds a bounded, ROM-hash-bound source teacher. The old teacher had no search around the third-dish crossing and could lose a life before it could supply a correction. The new teacher searches both that crossing and the last gap using a fixed catalogue, a 20-second wall budget and 320-branch cap. Every proposed route is bounded to 180 actions and rejects health or life loss. The initial emulator snapshot is restored even after a failed branch, timeout, or emulator exception. Independent recording and exact replay must then pass before any proposed demonstration becomes training data.

The new teacher solved the two previously failing V3 starting states at x=8 and x=52 (four-frame setup wait), in 98 and 96 actions respectively. Those are source-assisted demonstrations, NOT independent student successes.

Eight correction demonstrations add 780 labelled frames. Their setup pairs (shift, wait) are (-12,4), (10,4), (-11,7), (-1,7), (1,7), (-12,2), (10,2), (-1,2). These were chosen from prior failure/development contexts and are training data.

The learner itself remains the existing CLM projection-head architecture: two 64x58 RGB-composited frames plus eight executed controls. Seed 177, AdamW learning rate 0.001, and an 800-epoch upper limit are unchanged. No Qwen model, VLM server, RAM input, planner, or teacher is invoked by the scored student. The survival contract and 10/10 gate were not relaxed.

pluto_experiment.py provides a complete collection, training and paired-test entrypoint. demo --source-search exposes the teacher explicitly; play does not accept that flag. The old default source teacher and saved models remain.

Frozen evaluation

The scenario choices were written before either new model was trained. Model and report hashes were then frozen before running the paired benchmark. Evaluation uses shifts [-14,-12,-10,-6,-2,0,2,4,10,14] with an eleven-frame setup wait, 180-action and 120-second budgets. Raw emulator-start hashes are checked against both models’ training/selection sources and the committed historical development/V3/V4 ledgers, independently of goal labels. Baseline and candidate must share the exact starting state. Both full routes, including dishes 1/2, are scored; only menus and initial-position/timing preparation are unscored.

The control failed at x=8,28,36; the candidate completed all ten scenarios. Three favorable paired differences in one small local test do not constitute strong statistical evidence across games or training seeds. No claim of statistical significance is made. The old Mac checkpoints remain the incumbents.

Both models achieved 100% action accuracy on their training/selection data. Only the separate emulator test establishes their different gameplay outcomes. The candidate checkpoint SHA-256 is: f52b89d2e992b75cc3a3b73e328f738228f2f5832a0b203581eb318cbe6e4d37. The new control SHA-256 is: d0701ab44ab240d816cfe756fe9ca1bc5ae667e6d366138d3f517299101a1820.

Reproduce on a prepared host

From rgba-game-learning, with a compatible CLM/PyTorch and pixel/PyBoy runtime:

export CLM_PYTHON=/path/to/clm-env/bin/python
export PIXEL_PYTHON=/path/to/pixel-env/bin/python
export CUDA_VISIBLE_DEVICES=''
bash pixel/pluto_head.sh corrections \
  --rom /path/to/PLUTOS_CORNER.gb \
  --out /path/to/new-correction-experiment \
  --epochs 800

The command refuses existing output paths. Failed source attempts are retained and excluded, not silently treated as wins. At least eight control-start groups, two selection groups and two correction groups must succeed to train. The actual measured run accepted all 23 planned demonstrations. A failed gate returns exit code 3; it does not overwrite an incumbent or change the pass threshold.

The measured runtime used Python 3.12, PyTorch 2.8.0+cpu and PyBoy 2.7.0. CPU training uses four Torch threads; CUDA was disabled and no other jobs were stopped. Dependency locks and upstream source commits are saved with the evidence. Different runtimes may produce different weight hashes. Running these same scenario choices again is a reproduction, not a fresh held-out evaluation.

The frozen candidate and raw evidence remain on Ubuntu under: $WORKSTATION/experiments/pluto-runtime-20260930/controlled-v1/. The repository contains code and reports, not cartridge images, model weights, raw screenshots, or emulator snapshots. Re-running training regenerates those artifacts; merely cloning the repository does not install a trained checkpoint.

Mac status

The Mac was available for the initial read-only status/hash check, then became unreachable before the experiment could start. New model training and evaluation were therefore performed on Ubuntu. No new checkpoint was installed on the Mac, and no new Mac-visible run is claimed. Mac loading and GUI validation remain pending reconnection. MOSS and the original Mac policy checkpoints were not edited.

End-to-end launcher validation and limitations

112 pixel/learning tests passed with zero skips on Ubuntu. The ten added tests cover search restoration on failure/timeouts, branch limits, invalid budgets, wrong ROMs, unsafe starts, and experiment orchestration. Python-error lint, formatting and shell syntax checks passed. The older Mac Mario-specific suites were not rerun while that machine was offline.

The first new launcher attempt stopped after collecting demonstrations because its local demo-argument variable shadowed the experiment’s options. This was fixed and regression-tested; the failed attempt is preserved, not counted as a completed training/evaluation run. The corrected single-command launcher then completed collection, both trainings, and the full paired benchmark.

That complete repetition reproduced the candidate checkpoint byte-for-byte and again achieved 10/10. Its newly retrained control achieved 5/10 rather than 7/10. All teacher action/image triples and evaluation raw-start fingerprints matched between completed runs, but the control’s weights were not byte-identical despite the same nominal seed. The numerical cause has not been isolated; deterministic retraining is NOT claimed. Both control results are preserved. The repetition is not additional independent holdout evidence or a new architecture comparison.

All 40 baseline/candidate traces across the two completed matrices had exact replay and terminal-state certificates. Candidate success cases also passed the neutral next-stage readiness check. See docs/evidence/corrective-learning/ for frozen plans, model reports, per-run certificates, dependency locks, source hashes, the failed launcher attempt, and validation metadata.

Keep exploring

Original experiment record. Workstation paths have been generalized. Detailed measurements below retain their original workload and validation boundaries.

Supporting notebooks 1
Vlad Jagodnik

Thanks for reading my notes. There’s always another question.

A little more about me

The next question, in your inbox

Free Lab Notes

Get my next experiment in your inbox

Follow what I’m working on, the useful details, and the things I’d try differently next time.

Your address stays private. Privacy · Unsubscribe anytime