Menu

1 / 2

Tiny world model generates games and stream ac plays them all on Pico 2W #PiDay

Adafruit Industries – Makers, hackers, artists, designers and engineers!·Anne Barela·about 12 hours ago
#uj8qJuoG
#adafruit#model#frame#networks#pico
Reading 0:00
15s threshold

Sebastian-Ion Nae has put two small neural networks on a Raspberry Pi Pico 2 W, and published the project on GitHub. One network is a world model: given the current frame and an action, it predicts the next frame and the reward. The other is an actor that looks at the dreamed frame and picks the next action. Neither ever touches the real game.

The world model is a single transformer block with one set of weights, applied one to four times, with the input added back before each pass. More loops means better frames and slower play, so the firmware runs two on the Pico. Weights and activations are int8, trained with quantization aware training so the int8 model is the model that was trained. Games include Breakout, Pong, Flappy Bird, Pac-Man lite and a Doom-lite with a 3D view and a minimap.

Both networks run on core 1 of the RP2350 while core 0 handles USB and an optional ST7789 Display Pack. Pac-Man is the largest at 600 KB of flash and 460 KB of SRAM.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.