Developer SheepSeb has released tinyworldformer, an open-source project that uses two tiny neural networks to create and play video games inside a Raspberry Pi Pico 2 W, a low-cost microcontroller. Instead of running a game's traditional code, the board has one neural network dream up every frame of the match, while a second network decides the inputs.
The first network is the so-called world model: a looped transformer, quantized to int8, with 26,000 to 131,000 parameters depending on the game. For each frame, it takes the current frame and the chosen action and predicts the next frame and the reward. The second network, the actor, is a multilayer perceptron with two hidden layers and 9,000 to 16,000 parameters, which looks at the generated frame and picks the next button to press.
The most curious detail is that, on the chip, the real game never runs. The actor only sees frames dreamed up by the world model, and the model only receives the actor's actions. Both networks share core 1 of the RP2350 chip, while core 0 handles USB and the display. By pressing a button, the player can take over and play the machine's own dream.
There are five games in reduced versions: Breakout, Doom-lite, Flappy Bird, Pong and Pac-Man lite. According to the developer, with two transformer passes, the model gets every frame exactly right in 99.99% of tested transitions in Breakout, 100% in Flappy Bird and 99.45% in Pong; in Doom-lite and Pac-Man lite the rates are 83.6% and 86.4%, partly because a single wrong pixel already counts the whole frame as incorrect.
The project also fits comfortably in the hardware: the Pico 2 W has 4 MB of flash memory and 520 KB of SRAM, and each firmware takes 361 KB to 600 KB of flash and 227 KB to 460 KB of RAM, depending on the game. The playing agent can also be swapped for one that learns from scratch on the board itself, thanks to the stream-x learning algorithm implemented in Rust with no dynamic allocation.
Anyone who wants to try it without hardware can run the same engine in the browser, compiled to WebAssembly, with the same games and the same agent. The code, firmware and training tools are published in the project's GitHub repository, created on October 22, 2026, which already has more than 170 stars.
Image credit: banner of the tinyworldformer project, shared by developer SheepSeb in his GitHub repository.
Transparency: this article was prepared with the assistance of artificial intelligence, based on cross-checking public posts and the internet sources listed below. We recommend consulting the original sources to confirm the details.
Muse
Sources: tinyworldformer on GitHub (SheepSeb); Wisevoter.