Most microcontroller game projects run a game engine. tinyworldformer doesn't. Sebastian-Ion Nae's open-source project puts two small neural networks on a Raspberry Pi Pico 2 W. The first is a world model that predicts the next frame of a game and the reward that comes with it. The second is an actor that plays the game inside those predictions. As the Adafruit Blog put it when it covered the project on 30 October 2026, neither network touches the real game. Every frame on screen is generated.

The repository was created on 22 October 2026 and last pushed on 27 October, according to GitHub. Five games are supported: Breakout, Doom-lite, Flappy Bird, Pong and Pac-Man lite. The headline number missing so far is how fast any of it runs on the Pico itself. The author says so directly in the README: "I haven't measured the frame rate on the Pico itself yet."

Two networks, one transformer block

The world model is described in the README as a looped transformer. Adafruit's write-up explains that this is a single transformer block applied between one and four times per step. The firmware uses two loops. Weights and activations are int8, trained with quantization-aware training (QAT) so the network learns to tolerate 8-bit precision rather than being squeezed down after training. Across the five games, the README gives sizes from 26k to 131k parameters and compute of roughly 2 to 8 million multiply-accumulates (MACs) per frame.

The actor is much smaller and simpler: a float32 multilayer perceptron of 9k to 16k parameters. The README also describes an on-device learning agent, called stream-x, which can learn from scratch. Adafruit identifies the algorithm as Stream AC(λ), a streaming actor-critic method. Per Adafruit, the same engine also builds to WebAssembly, so the models can run in a browser as well as on the board.

The firmware is no_std Rust on the embassy async framework. The RP2350's two cores split the work. Core 1 runs the world model. Core 0 handles USB and an optional 320×240 ST7789 Display Pack, which the README lists as driven over SPI at up to 62.5 MHz.

The per-game numbers

The README breaks out each game's native frame size, model size and per-frame compute:

GameFrameWorld-model paramsMACs/frameExact-frame accuracy (2 loops)
Breakout20×1626k4.3M99.99%
Doom-lite32×3255k4.2M83.6%
Flappy Bird24×2446k2.0M100%
Pong20×3246k2.3M99.45%
Pac-Man lite48×48131k8.2M86.4%

The columns don't track each other neatly. Breakout has the smallest frame and the fewest parameters, yet it needs slightly more compute per frame than Doom-lite (4.3M MACs versus 4.2M). Parameter count alone won't tell you what a looped model costs to run. Activations are computed again on every pass of the block, so per-frame compute depends on more than weight count.

The accuracy column is the clearest measure of what the model can do. The three simple, mostly deterministic games (Breakout, Flappy Bird, Pong) are reproduced almost perfectly frame for frame. The two games with more on-screen state fall to the mid-80s: Doom-lite at 83.6% and Pac-Man lite at 86.4%. The README defines "exact frames" as the share of held-out transitions where every cell of the predicted frame matches the real game, leaving out frames right after a random event, which can only be sampled rather than predicted. It is a strict metric, since one wrong cell makes the whole frame a miss. The README itself notes that Doom-lite's 3D view has 768 cells, so its number "looks worse than it plays". Still, on these figures roughly one frame in six or seven differs somewhere from what the real game would have drawn.

Does it fit? The memory budget

Memory decides whether this is possible at all, and the README gives figures for both ends of the range. Breakout, the smallest, uses 361 KB of flash and 299 KB of SRAM. Pac-Man lite, the largest, uses 600 KB of flash and 460 KB of SRAM. Adafruit repeats the Pac-Man figures. The README says every game fits within the board's 4 MB of flash and 512 KiB of SRAM, the portion of the chip's SRAM that sits in the main memory map.

The README also states the full SRAM size as 520 KB, which matches the Pico 2 W datasheet: 520 kB of multi-bank SRAM on the RP2350. Pac-Man lite's 460 KB fits under either number.

For reference, the datasheet also lists dual Arm Cortex-M33 or Hazard3 RISC-V cores at up to 150 MHz, 802.11n Wi-Fi and Bluetooth 5.2, 26 multi-function GPIO on a 21 mm × 51 mm board, and three PIO blocks with 12 state machines in total.

What has been measured, and what hasn't

How fast does it run on the Pico? Unknown for now. The author hasn't measured the on-device frame rate. The timing figures in the README come from a desktop CPU running the same Rust code, which generates a frame in 0.7 ms (Flappy Bird) to 1.5 ms (Breakout). Those numbers tell you nothing about a 150 MHz Cortex-M33, and no on-Pico throughput should be inferred from them.

What about the 66–150 ms figure? The README says that when a human plays, core 1 slows to 66–150 ms per frame, depending on the game, to reach a playable speed. That describes how the firmware behaves in human-play mode. It is not presented as a benchmark of the model's maximum speed on the chip, and it shouldn't be read as one.

Is the accuracy measured on-device? The README reports exact-frame accuracy at two loops, the loop count the firmware uses. It does not say that those figures were collected on the Pico rather than on a host.

Can I use the code in my own project? The GitHub API reports no license for the repository. Without a license, the default is that the author keeps all rights. Anyone planning to reuse or redistribute the code should ask the author or wait for a license to be added.

What It Means for Makers

tinyworldformer is mainly a demonstration and a teaching artifact. It is not a product. For embedded engineers interested in TinyML, it is a compact, readable example of several techniques on a part many already own: int8 quantization-aware training, a weight-shared looped transformer that trades extra compute for less storage, and an RL agent that learns inside a learned model. It also shows the RP2350's two cores divided between an inference core and an I/O core, in async Rust on embassy. Educators get something unusually tangible: the "world model" idea, often discussed at data-centre scale, running in a few hundred kilobytes and drawing to a 320×240 screen.

It doesn't replace a game engine and doesn't claim to. The interesting part is that the game is learned rather than programmed. The accuracy table shows the trade-off: near-perfect results on simple games, visible drift on the more complex ones.

On cost and availability: the software is free to fetch from GitHub but has no license, as noted above. None of the sources quoted here give a price for the Pico 2 W or the optional Display Pack, so check current retailer pricing. The hardware needed is a Raspberry Pi Pico 2 W, plus the ST7789 Display Pack if you want an on-board screen. The project is under active development, and the number makers most want, the on-Pico frame rate, has not been published. Treat any speed claims you see elsewhere with caution until the author measures it.

Sources