One game, different ways to play
I built a self-play training application, then brought its saved neural models into a clear, responsive browser game. The same board supports a friend on one device, three trained opponents and a separate Pro solver, without a server making the moves.
Learned opponents, responsive play
Keep the board responsive while the AI thinks
The player’s disc appears while the AI calculates in a background Web Worker. Restarting cancels any calculation still in flight, and a game-generation check rejects old replies. A move from the previous game cannot land on the new board.
Bring trained models into the browser
Easy, Medium and Hard use three distinct saved networks from my self-play trainer, exported to ONNX for local inference. Easy samples the model’s policy; Medium and Hard add tree search guided by the model’s move scores and position estimates. Difficulty also changes search effort and move sampling.
Pro uses Benjamin Rall’s independent perfect-play solver, compiled to WebAssembly. It is a separate engine from my trained opponents.
Make the board feel physical
A perforated front face sits above the disc animation. The layout follows the same hole geometry on desktop and phones, while keyboard controls and reduced-motion play remain available.
What this work demonstrates
The work connects model training, browser inference and a finished game interface. Its reliability depends on details beyond choosing a move: showing progress, handling restarts and keeping calculations separate from interaction.

