What happened
Benjamin Wood has built a reinforcement learning system that learns to play games directly on a Pico 2 W microcontroller. The core of this system is a looped transformer, which acts as a world model. This transformer predicts the next frame of the game and also provides a reward signal. It’s a clever approach designed to keep the model size small enough to run on the limited resources of the tiny computer.
He trained the world model by recording real games and then streaming data into it via stream-x, either in the real game or inside the dream. The agent network takes the frames and actions generated by the world model and uses them to take its turn. The key innovation is using a looped transformer – essentially applying the same transformer block repeatedly with the same weights. This dramatically reduces memory requirements compared to stacking multiple layers of different transformers. The world model utilizes an qint8 MLP with two hidden layers and float32 size 26k–131k parameters, and 9k–16k multiply-adds cost per frame, while the actor network uses 9k–16k multiply-adds. He’s actively experimenting with different games to optimize performance and has successfully transitioned to a streaming RL agent within the board's own dream.
Why it matters
This project demonstrates an impressive level of miniaturization in AI development, pushing the limits of what can be run on low-powered hardware like microcontrollers. It’s a compelling case study for resource-constrained environments and presents a potential pathway to deploying sophisticated AI agents in areas where traditional servers are impractical.
The work highlights innovative approaches to world model training – using both real game data and simulated ‘dream worlds’. This combined approach could lead to more robust and adaptable RL agents, capable of learning quickly across diverse environments. The focus on qint8 quantization further minimizes computational demands and memory footprint, increasing the feasibility of running these complex models in real-world scenarios.
But, but, but…
The biggest potential challenge is generalizability. The project has been primarily focused on small games, and it remains to be seen how well these techniques will scale to more complex environments with a greater variety of states and actions.
Furthermore, while quantization helps reduce memory requirements, it can also impact model accuracy – the balance between compression and performance needs careful tuning. A crucial aspect that’s often overlooked is the baseline for comparison; benchmarks are frequently self-scored by vendors and don't represent independent replication. Also, a key objective is to keep the number of parameters small enough, with current results staying under 26k–131k parameters.
“‘We’re trying to get the number of the parameters small enough,’ says benjamin wood.”
— Dr Non
The counter-take
The current trend of over-engineering complex models is often misguided; this project demonstrates that sophisticated AI can emerge from surprisingly simple architectures when constraints are carefully considered. This challenges the assumption that larger models always equal better performance, especially in resource-limited settings – a narrative often pushed by companies selling expensive cloud computing services.
The AI angle
This work represents an upgrade in resource efficiency for AI systems, enabling deployment in traditionally inaccessible environments. The asymmetry created by running the agent’s world model locally increases responsiveness and reduces reliance on external networks.
