A snake bot that taught itself to hunt.Play against it 100% offline, using your WebGPU.
One night of self-play reinforcement learning, from an untrained network to a bot that hunts, feeds and dodges. The training simulator, its observation encoder and every saved checkpoint of the run are ported to the browser and run on your GPU. No server, nothing leaves this tab.
HOW IT WORKS
- Runs in your tab. The whole game, 60 updates a second, runs on this page. There is no game server and nothing is sent anywhere.
- The real trained bot. The browser game reproduces the simulator the bots learned in, checked tick by tick, so you play the trained network and not an approximation of it.
- A tiny brain. Each bot is a 33k-parameter neural network, run on your GPU through WebGPU.
- Human limits. A bot sees only what is near its own head, decides 15 times a second, and its moves land 40 ms late, like a normal player's ping.
Pick your opponent
Every point is a checkpoint the league promoted during the run overnight-5-10-fan. Early ones barely steer; the later ones cut you off.
The tournament
After the run, every checkpoint played every other one and four fixed reference bots, in shared rooms and one on one. One Elo is fitted to all the games of each track. Shared rooms reward outlasting the others; duels reward the kill.
| # | Checkpoint | Steps | Elo | ± SE |
|---|---|---|---|---|
| 1 | 508M | 508M | 2420 | 22 |
| 2 | 468M | 468M | 2293 | 21 |
| 3 | 453M | 453M | 2282 | 21 |
| 4 | 394M | 394M | 2232 | 20 |
| 5 | 438M | 438M | 2217 | 18 |
| 6 | 291M | 291M | 2185 | 18 |
| 7 | 247M | 247M | 2114 | 18 |
| 8 | 230M | 230M | 2062 | 18 |
| 9 | 232M | 232M | 2050 | 18 |
| 10 | 217M | 217M | 2032 | 19 |
| 11 | 141M | 141M | 2007 | 19 |
| 12 | 126M | 126M | 1885 | 20 |
| 13 | 112M | 112M | 1834 | 21 |
| 14 | 89M | 89M | 1735 | 20 |
| 15 | c-143m-final reference | — | 1589 | 21 |
| 16 | 72M | 72M | 1556 | 21 |
| 17 | 58M | 58M | 1453 | 21 |
| 18 | c-50m-best reference | — | 1327 | 22 |
| 19 | 43M | 43M | 1255 | 23 |
| 20 | discrete-40m-peak reference | — | 1169 | 23 |
| 21 | 28M | 28M | 1069 | 25 |
| 22 | discrete-132m-passive reference | — | 1000 | 27 |
| 23 | 0M | 0M | 926 | 29 |
| # | Checkpoint | Steps | Elo | ± SE |
|---|---|---|---|---|
| 1 | 508M | 508M | 1489 | 16 |
| 2 | 438M | 438M | 1364 | 14 |
| 3 | 453M | 453M | 1362 | 14 |
| 4 | 291M | 291M | 1356 | 14 |
| 5 | 468M | 468M | 1345 | 13 |
| 6 | 394M | 394M | 1337 | 13 |
| 7 | 230M | 230M | 1329 | 13 |
| 8 | 247M | 247M | 1328 | 13 |
| 9 | 232M | 232M | 1326 | 13 |
| 10 | 217M | 217M | 1283 | 13 |
| 11 | 141M | 141M | 1262 | 13 |
| 12 | 89M | 89M | 1253 | 13 |
| 13 | 112M | 112M | 1251 | 13 |
| 14 | 126M | 126M | 1237 | 13 |
| 15 | c-143m-final reference | — | 1172 | 13 |
| 16 | discrete-40m-peak reference | — | 1113 | 13 |
| 17 | 72M | 72M | 1096 | 14 |
| 18 | c-50m-best reference | — | 1038 | 14 |
| 19 | 58M | 58M | 1032 | 14 |
| 20 | discrete-132m-passive reference | — | 1000 | 15 |
| 21 | 28M | 28M | 989 | 15 |
| 22 | 43M | 43M | 957 | 16 |
| 23 | 0M | 0M | 770 | 21 |
Training
Ego-centric PPO, trained purely by self-play. Each snake sees the world only from its own head. No human games and no scripted teachers: what it knows about hunting, feeding and dodging it found by playing copies of itself.
A fair fight
The bots are “lobotomized” on purpose. Every command lands 40 ms late, the ping a normal player has, and they pick a move only 15 times a second from what is near their own head. No reading your inputs, no superhuman reflexes.
This page
Next.js static export, shadcn/ui, recharts, onnxruntime-web. The room, physics, observation encoder and policy live in a web worker; the page receives the scene 30 times a second and sends your heading back every 50 ms.