Gofer is a full Go (Baduk) engine written in Go, implementing Chinese rules with Monte Carlo Tree Search (MCTS) as its core decision-making algorithm. The engine supports terminal play, self-play, position analysis, and SGF import/export, making it usable both as a standalone player and as a research tool. It also implements the Go Text Protocol (GTP), which lets it plug directly into popular Go GUIs like Sabaki and Lizzie for a more visual playing and analysis experience.
Technical Implementation Paragraph
Under the hood, Gofer uses PUCT-based MCTS with a transposition table and parallel playouts, paired with a heuristic evaluator (stones, liberties, territory estimate, move priors) or an ONNX neural network backend for stronger play. The project includes a full machine learning training loop inspired by AlphaGo Zero-style research, with a PyTorch bootstrap trainer, self-play sample generation, and arena gating (using Wilson confidence intervals) to validate that new model versions actually outperform prior ones before promotion. It's built primarily in Go (70.8%) with Python for the training pipeline and Shell for automation scripts, and ships with a nightly 200-game arena workflow on GitHub Actions plus a public web demo hosted at gofer.devomb.com.
Progress and Learnings Paragraph
The current release, v2.7.0, includes in-process ONNX inference (no external sidecar needed), a parity harness proving the Go inference engine matches the Python reference implementation bit-for-bit, and profile-guided build optimization for performance tuning. Building Gofer meant tackling real research-to-code translation, implementing ideas from the Wu et al. 2020 Go ML paper, wiring together board logic, tree search, and neural inference into one coherent binary. Remaining goals include closing the strength gap toward KataGo-level play, moving fully off the ONNX sidecar architecture, and adding complete time control support like byo-yomi.
- 2 devlogs
- 12h