A Ludo engine, a network that learned it, and this page.
AlphaLudo is a side project by Sumit Pal on what it actually takes to teach a small neural network a game of chance. Everything was built end to end: the game engine, the training pipeline, the interpretability work, and the site you are reading.
The AI you play against
The opponent is AlphaLudo V15.2, a graph transformer with 587,306 parameters. It treats the 15×15 board as a graph: each of the 225 cells is a node described by 3 numbers, and 4 layers of attention pass information between them, nudged along the routes tokens actually travel.
It has two outputs. One scores every cell you could move a token from and picks the best; the other estimates its own chance of winning, which is the number you see during a game. It sees only the current board, keeps no history, and runs no search: one forward pass per move, about 13ms on a laptop. It always plays its top-scored move, so the same position gets the same answer every time.
It learned in two stages. First it imitated the strongest earlier model until it played as well as its teacher. Then it played against a pool of past champions and itself, rewarded only for winning. Against the model it replaced it wins 52.7% of games; against the strongest scripted opponent, 68.4%. Six separate tests say the gap that remains is mostly the dice, not skill. The research page has the whole story, including what didn’t work.
How to play
You are green; the AI is amber, in the opposite corner. You take turns rolling one die, and the first to bring all four tokens home to the centre wins.
- Leaving base. A token needs a 6 to come out onto your start square.
- Moving. Move one token forward by the number you rolled, around the board and up your coloured home column. You need the exact number to reach home.
- Capturing. Land on a single opposing token and it goes back to its base. Two or more tokens on the same square form a block and can’t be captured, though you can pass them.
- Safe squares. Start squares and star squares are safe; nothing is captured there.
- Extra turns. Rolling a 6, capturing, and bringing a token home each earn another roll. Three 6s in a row forfeits the turn.
To play: press Space or tap the die to roll, then click or tap a highlighted token. The number keys 1–4 pick a token too. If only one move is possible, it plays itself.
How this page works
- Game engine
- Hand-written C++ compiled to WebAssembly via Emscripten, the same code the network was trained against.
- Inference
- ONNX Runtime Web (single-threaded WASM). The model file is 2.8MB.
- The board
- three.js and WebGL, with a flat board if WebGL isn’t available.
- Front end
- Plain ES modules, no framework.
- Hosting
- Static files on Cloudflare Pages. There is no server to talk to.
- Download
- About 6MB the first time you play, most of it the inference runtime and the model. Your browser keeps them afterwards. The research and about pages load none of it.
What we collect
Nothing. There is no backend. Your moves never leave your browser: the engine and the network both run on your machine. There are no analytics, no cookies and no tracking, and the fonts are served from this site rather than a third party.
Your display name, your win–loss record and your sound setting are kept in your browser’s local storage, on this device only. Clearing the site’s data removes them.
The only third-party content is the AlphaGo documentary on the research page, a youtube-nocookie.com player that loads only when you press play. Share buttons open the network you pick, only when you pick it.
Who made it
AlphaLudo is built by Sumit Pal. It started in October 2025 as a question about how small a network could be and still play well, and kept going for ten months. The training pipeline and the interpretability work are open source, including the training journal the numbers on this site come from.
- github.com/sumit7194/AlphaLudo: engine, training code, experiments, journal
- github.com/sumit7194/AlphaLudo-MechInterp: the interpretability studies
- Sumit Pal on LinkedIn
Credits
The ideas it borrows are credited on the research page. The site is set in Instrument Serif, Geist and Geist Mono, under the SIL Open Font License. The board is drawn with three.js and the network runs on ONNX Runtime Web.