Hardik's Notes · AI, simply

A tiny chip that dreams up its own video games

A maker runs two small neural networks on a Raspberry Pi Pico 2 W. One invents each game frame. The other plays it.

A small purple circuit board with a screen showing a pixel brick game. A thought bubble floats above it.

What is a world model?

Think of a flip book. Each page is the page before it, changed a little.

A world model is a neural network (a program that learns from examples) that draws the next page. You give it the current picture and a button press. It gives back the next picture, and a score for what just happened.

What did the maker build?

Two small networks run together on a Raspberry Pi Pico 2 W, a cheap board. The project is called tinyworldformer. The README on GitHub says no real game runs on the chip. The game you see is made up, frame by frame.

Network 1: the world model

  • Gets the frame and a button
  • Draws the next frame
  • Also gives a reward
  • 26 thousand to 131 thousand numbers, depending on the game

Network 2: the player

  • Gets the frame
  • Picks a button
  • Never sees the real game
  • 9 thousand to 16 thousand numbers

The author made five tiny games this way: Breakout, Pong, Flappy Bird, and small versions of Doom and Pac-Man. Any button press from you hands control to you, so you can play the dream yourself.

How does it fit on a small board?

Two tricks, both from the README.

  • Small numbers. The main weights are stored as int8 (whole numbers from -128 to 127) instead of long decimals. In Breakout these weights take about 19.7 KB.
  • Reuse. The network is one block that is run again and again with the same weights. The chip runs it twice for each frame. More runs make the picture slower to draw, and the README shows they usually make it more correct.

The board has 4 MB of storage and 520 KB of working memory. The README says Breakout uses 361 KB and 299 KB of those.

99.99%

of held-out Breakout frames predicted exactly right at two runs. Doom-lite: 83.6%.

Author's own tests on recorded games, tinyworldformer README

Why should you care?

Most “world model” news comes from big labs with big computers. This one is small enough to read and to check. It also shows a real weakness.

The player cheats the dream. In one Breakout test, the player scored 154 with 26 bricks still standing. The world model had forgotten to remove bricks in one corner, so the player found free points there. The author’s fix was to record real games with that player and train the world model on them again.

That is a lesson for any AI trained inside a made-up world: it will find the mistakes in the world.

What’s the catch?

  • These are the author’s own tests, on games the author wrote. Nobody else has checked them.
  • The README says the speed on the Pico itself has not been measured yet. On a desktop computer one frame takes between 0.7 and 1.5 milliseconds.
  • Pac-Man is only right about 86 times in 100 frames, on the author’s measure.
  • We read the README. We did not run the code or flash a board.

Try it

This step is our idea, not the author’s. On squared paper, draw a Pong frame: a bat on the left, a ball two squares away. Write a button press, “up”. Now draw the next frame. You just did what the world model does. Then ask: how many rules did you use?

If you own a Pico 2 W and can install Rust, the README lists the steps to flash a game. It also says the same engine can run in a web browser.

Sources

  • tinyworldformer, README, Sebastian Nae, GitHub (no publication date given; read on 30 October 2026)

Beyond the notebook

This is what we do in schools.

A year-long programme for classes 6 to 12. Creativity, taught as a skill, inside the classroom you already have, led by your teachers.

See the programme