How I made a small decision model's belief visible, and what that taught me about building honest AI demos.
Five AI models, one race track, zero cloud The demo problem Every AI demo you have watched in the last two years looks the same. A prompt box, a streaming answer, a slow reveal. It is a good demo, and it has taught everyone the same lesson: AI means a model that writes. But most of the models shipping onto devices this year are not writing anything. They are picking an option. A phone decides…
The AI Grand Prix is a project that brings together five small decision models to compete on a closed track. Each model is given a JSON state describing its car and the road ahead, and must return a probability for each of five steering options. The key insight behind this project is the belief cone, a translucent fan drawn out of every car, showing the probability for each steering option. This visual representation reveals the model's uncertainty and allows viewers to understand the decision-making process.
Four architectural decisions shaped the AI Grand Prix project. Firstly, using a single WebGL context instead of five canvases prevented performance issues and allowed for a more efficient rendering of the track and cars. Secondly, using the stdlib HTTP server instead of a FastAPI gateway ensured that the demo could be run with a simple clone of the code, without any additional setup or dependencies.
Thirdly, separating decisions from the render loop eliminated frame stutter caused by slower models, ensuring smooth gameplay. Finally, sampling from the probability distribution rather than taking the maximum probability made the decisions more realistic and allowed viewers to observe the uncertainty in the models' choices.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.