The "Play vs AI" mode lets you play live 9×9 games against a neural-network opponent. Unlike most online Go AIs, every move is computed on your device — no server round-trip, no account required, works offline once loaded.

Getting Started

  1. Go to /play/ai (or pick "Play vs AI" from the main menu).
  2. Choose your opponent:
    • Beginner (~20 kyu) — plays simply and keeps poking at your position, giving you practice defending against probes
    • Intermediate (~10 kyu) — solid moves but exploitable
    • Strong (~5 kyu) — plays the network's top move
  3. Optionally pick a handicap (2 or 4 black stones) to even the odds.
  4. Click "Start Game". You play black; the AI plays white. With handicap, the AI moves first.

How a Game Ends

The game ends when either:

  • Both players pass consecutively
  • One player resigns

After two passes, the AI runs one final evaluation to identify any dead stones still on the board (groups it thinks are functionally captured). Those stones are marked with a red X and counted as prisoners for the surrounding color, then territory is counted using Japanese rules: empty territory + prisoners + komi (7 for 9×9).

If you and the AI disagree about which stones are dead, just keep playing — the dead-stone identification only runs after both sides have decided the game is over.

How It Works

The AI is a converted KataGo neural network — specifically the b6c96 model (6 residual blocks, 96 channels, ~3M parameters). It was converted from KataGo's native format to ONNX and is served via ONNX Runtime Web running on WebAssembly.

On first visit the browser downloads ~16 MB of assets (4 MB model file + ~12 MB WASM runtime) and caches them — subsequent games load instantly.

Each move:

  1. The current board position is encoded into KataGo's 22-channel input format
  2. The neural network produces a probability distribution over all legal moves plus pass
  3. Depending on the difficulty profile, we either play the top move (Strong) or sample from a wider pool of weaker moves (Beginner, Intermediate)
  4. If the model strongly favors passing, the bot passes

There's no tree search — just one forward pass per move. That's why even the Strong setting peaks around 5 kyu rather than playing at superhuman strength. Adding Monte Carlo Tree Search on top of this network would push it 3-5 stones stronger; it's on the roadmap.

Privacy

Because the AI runs in your browser, none of your moves leave your device. We don't log games, we don't send positions to a server, and we don't need an account to let you play. The only network requests are the initial download of the model weights and the WASM runtime.

Known Limitations

  • 9×9 only. Larger boards aren't supported yet.
  • No game saving. Closing the tab discards the game. A future update will save games to your local browser history.
  • Approximate strength estimates. The kyu ratings are best-guess and not based on rated play.
  • No move review. When the game ends, you see the final score but no per-move analysis. For deep analysis of your games, use the scenario-based training modes.

Feedback

Found a bug? Got a position where the AI plays badly? Please report it through the report button on any other game page, or open an issue if you found this repo.