Founders BetaFounder price: US$ 9.90/month locked for as long as you subscribe.→
HomeBlogDicasHow to run games with two neural networks on the Pico 2 W
How to run games with two neural networks on the Pico 2 W
Image: SheepSeb (GitHub TinyWorldFormer)
Dicas4 minOfficially confirmed

How to run games with two neural networks on the Pico 2 W

On October 30, the TinyWorldFormer project gained attention by showing that two small neural network models can generate and play simple versions of games directly

Marcelo Santiago

Marcelo Santiago

Criador do bridgecode

On 10/30, the TinyWorldFormer project gained attention showing that two small neural network models can generate and play simple versions of games directly on a Raspberry Pi Pico 2 W. With no hand written game code and no cloud dependency, the system delivers a game loop inside the chip itself.

The biggest AI newsletter in the World

Get AI articles in your inbox

Technical curation on models, agents and coding tools. No spam, unsubscribe anytime.

Daily at 8:00 and 16:00 Brasília time. No spam.

In this article you will see:

  • How the two neural networks work together
  • What you need to test
  • Where to download the project and run the demos

The core idea is to split the work between two networks. The first, the world, receives the current frame and the action, and predicts the next frame and the reward. The second, the actor, receives the generated frame and chooses the next action. Together, they create a game loop inside the microcontroller. This is tiny ML: consumption and complexity stay low enough to run on the chip, with no backend server.

The author used two very small networks. The world is a transformer with weight repetition, while the actor is a neural network with two layers and between 9,000 and 16,000 parameters. The model runs with 8 bit integer quantization, which keeps it within the limits of the Pico 2 W. The result is demonstrations of Breakout, Doom Lite, Flappy and Pong that run from scratch on the chip.

Game generated by the world network being played by the actor, running on the Raspberry Pi Pico 2 W
Imagem: SheepSeb (GitHub TinyWorldFormer)

The project illustrates a practical case of tiny machine learning: the algorithm leaves the cloud and lives on the device. For those who program agents, the example is useful for thinking about highly specialized agents, with isolated space and distinct responsibilities, each in its role. In the same territory, the Codex from Anthropic has similar work on software prototyping and the company PicPay used an AI agent to sell on WhatsApp, showing that lightweight agents have application even in non technical businesses.

Frequently asked questions

What does the Pico 2 W run?

Two small neural network models that build and play simple versions of games, such as Breakout, Doom Lite, Flappy and Pong.

Is it necessary to know the Raspberry Pi circuit?

To get started, just follow the project repository, which describes prerequisites, firmware and how to load a game onto the chip.

Are the games created by artificial intelligence?

Yes. The model generates the frame and decides the actions, without a fixed list of rules front to back.

What is tiny machine learning?

It is the practice of running machine learning algorithms on small, resource constrained devices, requiring less energy and less data exchange over the network.

What is the caution in using neural networks that small?

Size reduces consumption and complexity, but restricts the type of game and the quality of results. The ideal is to test with your use case and measure frame quality.

How to test today

The TinyWorldFormer repository explains how to compile and load firmware on the Raspberry Pi Pico 2 W. The project also shows how to run the world and the actor in the browser. Testing requires the chip, a compatible programming board and the development tools listed in the repository.

To get started, download the code, follow the compilation step by step and load the firmware onto the Pico 2 W. After loading, the little game appears and the agent plays on its own. The goal is to see the generate and act loop work within the chip limits, with no remote server.

Conclusion

The project shows a practical way to run lightweight AI systems on low cost hardware. For those who program agents, the example reinforces that each one has its own space and follows its role.

CTA

Stop switching between ten AI tools. On bridgecode you coordinate your agents in a single flow, with isolated space and each one in its role.

Get started today

The best approach is to start with a single simple game and watch how the world generates the frame and how the actor chooses the action. Then note where the loop breaks, in quantization, game size or frame resolution, and adjust one hyperparameter at a time. The repository describes the build order and what each circuit layer does, which helps isolate the problem when the chip does not load the firmware.

Para começar hoje

Choose a simple game and run the lightest version of the project. Compare frame quality with model size and test 8 bit quantization before increasing resolution. The goal the first time is to see the generate and act loop work within the chip limits, not to chase perfection.

Em resumo

The starting point is a cheap chip and two small models. The lesson for people programming agents is that isolated space and specialization reduce cost, without needing cloud for every decision.

Fonte

GitHub - SheepSeb/tinyworldformer

Share this article

Add bridgecode as a source on Google
Tags:#radar#ia
Marcelo Santiago
Marcelo Santiago·Creator of bridgecode

Developer and creator of bridgecode, an agentic development environment for orchestrating squads of AI agents. Helps people going from vibe coding to professional development move from idea to shipped product.

The biggest AI newsletter in the World

Enjoyed this content? Stay ahead in AI engineering.

Code analysis, multi-agent architecture, token benchmarks and tools selected by developers for developers.

Daily at 8:00 and 16:00 Brasília time. No spam.