Developer runs self-trained neural network opponent entirely in-browser with no backend
A developer has released a browser version of their custom four-in-a-row board game featuring a self-trained neural network opponent that runs entirely on the player's device with no server, accounts, or external calls. The game uses a larger 9x8 grid instead of the classic 7x6, which nearly doubles the number of possible four-in-a-row lines and required training a dedicated model from scratch. The neural network is a policy and value model of just under one million parameters, exported as a 3.9 MB ONNX file and executed in the browser via ONNX Runtime Web. Four difficulty levels are powered by a single network with varying amounts of search, ranging from a shallow heuristic at beginner level to 256-simulation MCTS at grandmaster. The developer chose a single-threaded WebAssembly build to avoid complex cross-origin isolation headers required by shared hosting environments, achieving move times of around 120 milliseconds.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in