Gofer is a Go (Baduk) playing engine I built from scratch in Go, inspired by the AlphaGo Zero research paper, currently at version 2.7.0. It supports Chinese rules, a GTP interface so it works with popular Go analysis tools like Sabaki and Lizzie, terminal play, self-play generation, and SGF import/export. Rather than trying to compete with production-grade engines like KataGo, I built it as a research-focused project to deeply understand how these systems actually work under the hood.
At its core, Gofer uses Monte Carlo Tree Search with a PUCT selection strategy — the same family of algorithm that powers AlphaZero — combined with a neural network evaluator to judge board positions. I implemented ONNX-based neural inference directly in Go, which let me plug in trained model weights and validate that my Go inference pipeline produces results that exactly match a Python reference implementation. Playout counts scale with board size, so the engine can play quick games on small boards or think harder on a full 19x19 board.
Beyond just the engine itself, I built a full training and validation pipeline around it, including a replay buffer for generating self-play data and an “arena” system that only promotes a new model if it statistically beats the current best version. I also set up automated nightly games and performance benchmarks through GitHub Actions to make sure new changes don’t quietly make the engine weaker or slower. It’s been a great deep dive into machine learning, search algorithms, and systems engineering all in one project.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.