No cloud GPUs. No H100s. Just a Mac Mini.
Backgammon is a game of perfect information with imperfect odds. Every roll is visible to both players — there are no hidden cards. But the 21 possible dice outcomes per turn create a branching factor that compounds into a game tree of approximately 10^24 nodes. You can't brute-force that. You have to evaluate.
This is why TD-Gammon (1992) was revolutionary. Gerald Tesauro at IBM showed that a neural network could learn backgammon evaluation through temporal-difference learning and self-play — no human labels, just game outcomes. TD-Gammon reached world-class play and reshaped how experts understood the game's opening theory. It proved that neural evaluation functions could master a game where traditional search was hopeless.
Modern backgammon engines have pushed further with deeper networks, more rollouts, and massive compute. But the frontier of competitive AI assumes you have datacenter GPUs, weeks of cloud budget, and infrastructure teams. That raises a question worth answering:
Can you build a competitive backgammon AI on a $700 consumer machine?
No cloud. No H100s. No multi-thousand-dollar training runs. Just a Mac mini sitting on a desk.
Pip AI is the answer — and it's not a toy. It's a fully pipeline-driven, benchmarked, iteratively improved engine that has been climbing through version after version, each warm-started from the last, each generating its own training data from the previous champion's play style.
The flywheel is everything. Each version of Pip AI generates the training data for the next version. It's a self-reinforcing loop: better models generate better positions, which produce better labels, which train better models. The key insight is that supervised learning from rollout labels — not self-play TD(λ) — is the engine that has driven improvement so far.
The current champion plays games against itself. Every position reached during those games is recorded. This isn't random sampling — the positions reflect the actual distribution of positions the current best model encounters, which means the training data is always targeted at the positions that matter. The Rust engine generates 100K contact positions and 30K race positions per iteration.
Each position is evaluated by running 3888 rollouts — 3× the standard 1296 — using the wildbg Rust engine. Rollouts are Monte Carlo simulations: from the current position, play out the game many times with near-optimal play, and measure the win/loss/gammon/backgammon distribution. The result is a label vector of probabilities that represents the "true" equity of the position. The Rust engine uses rayon for data parallelism, distributing rollouts across all available cores.
The labeled positions are fed into a PyTorch training loop running on Apple's Metal Performance Shaders (MPS) backend. The network is warm-started from the previous champion's weights — it doesn't start from random initialization. This means each iteration begins from an already-strong baseline and refines it. A full training iteration takes 51 minutes on the Mac mini.
The newly trained model plays 100–1000 games against the previous champion. Win rate is measured with confidence intervals (Wilson score). If the new model wins decisively, it becomes the new champion and generates positions for the next iteration. If not — as happened with v26 — the champion holds and the pipeline adjusts.
The loop repeats. The new champion generates new positions from its own play style, which differ from the old champion's. The rollouts label those positions. The network learns. The benchmark runs. Each turn of the wheel produces a slightly better, slightly different model — until it doesn't, and you have to change methodology (see Lessons Learned).
Pip AI uses a residual convolutional network — the same family of architectures that powers image recognition, but adapted for the 1D structure of backgammon positions. The input is a thermometer-encoded feature vector; the output is a multi-headed prediction of game outcomes, cube actions, and move equity.
The board is encoded as a 207-dimensional vector using thermometer encoding — a scheme where each point on the board is represented by multiple binary threshold features rather than a single count. This gives the network a richer, more learnable representation of piece density.
The core of the network is a tower of 14 residual blocks, each containing two Conv1d layers with batch normalization and ReLU activations, plus a skip connection. The hidden dimension is the primary scaling knob:
HID=384 → 7.4M parametersHID=512 → ~12M parameters (in progress)The network has three output heads, each serving a different decision:
Predicts the probability distribution of game outcomes: p_win, p_gammon_win, p_bg_win, p_gammon_loss, p_bg_loss. This is the primary signal for position evaluation.
Classifies the optimal doubling cube decision: no-double, double/take, double/drop, or pass. This head enables the engine to make cube decisions without separate heuristic logic.
A single scalar value used for move selection. During search, the engine generates all legal moves and picks the one with the highest predicted equity from this head.
The entire pipeline runs on two consumer Apple Silicon machines. No cloud instances are spun up. No GPU rentals. No per-hour charges. The compute budget is whatever the electricity costs — which is negligible.
Training runs on the Mac mini's MPS backend, which provides GPU acceleration through Apple's unified memory architecture. There's no CPU↔GPU data transfer penalty — the tensor data sits in unified memory accessible to both. A full training iteration — forward pass, backward pass, optimizer step, across all batches — completes in 51 minutes.
Rollouts are embarrassingly parallel. Each of the 3888 rollouts per position is independent, so they distribute cleanly across the Mac Studio's 28 cores via Rust's rayon crate. A full rollout batch across both machines takes 12–14 hours. Both machines run overnight; the results are ready by morning.
Total cloud compute cost: $0. The machines were already on the desk. No instances were provisioned. No storage was rented. No data was uploaded. The entire pipeline is local, reproducible, and open source.
Each version is benchmarked against the previous champion in head-to-head play. The table below shows the progression from v17 through v27. Win rates are measured with confidence intervals (Wilson score, 95%) where applicable.
| Version | vs Previous | Win Rate | 95% CI | Games | Architecture |
|---|---|---|---|---|---|
| v22 | vs v17 | 66.6% | — | 500 | HID=128 |
| v24 | vs v22 | 65.2% | — | 500 | HID=256 |
| v25 | vs v24 | 59.0% | 49.2–68.1% | 100 | HID=384 |
| v26 | vs v25 | 44.0% | 34.7–53.8% | 100 | HID=384 (failed) |
| v27 | vs v25 | In Progress | TBD | TBD | HID=512 + 3888 rollouts |
Note on v24's benchmark: A 1000-game run showed only 52.9% — the 500-game measurement at 65.2% was less reliable. This is why v25 onward uses 100-game benchmarks with explicit confidence intervals. Fewer games but honest uncertainty.
Building Pip AI was not a smooth upward curve. The failures are more instructive than the successes.
v26 used the exact same architecture (HID=384) and the same data distribution as v25. The result: 44.0% win rate — a regression. Adding more of the same data to the same model doesn't help. The network has already learned what that data distribution has to teach. You need either a methodology change, new data sources, or a bigger model — not more of the same.
Positions were generated and rolled out, but nobody checked the results for two weeks. The flywheel didn't break — it stalled at the handoff. The rollouts completed, the data sat on disk, and training didn't pick it up. The lesson: automation needs monitoring, not just scripting. A pipeline that runs but isn't observed is a pipeline that silently stops improving.
v19 vs v18 was 50/50 — a coin flip. Same data, bigger model, no improvement. Supervised learning from rollout labels has a ceiling. You can keep generating positions and rolling them out, but eventually the network extracts everything it can from that signal. Breaking through requires a different learning paradigm — which is why TD(λ) self-play is the next step.
Every champion since v22 has been warm-started from the previous champion's weights. v25 warm-started from v24 and jumped to a 59% win rate. Starting from an already-trained baseline means each iteration begins from a strong position and only needs to learn the delta — not relearn the entire game from scratch.
When v27 expanded from HID=384 to HID=512, the weight matrices didn't match. Instead of random initialization, the 384-channel weights were linearly interpolated to 512 channels. This lets the bigger model start from v25's hard-won knowledge rather than learning everything from scratch. The bigger model starts smart, not blind.
The supervised flywheel has carried Pip AI from v17 to v25. The next phase requires a fundamentally different learning signal.
The TD-Gammon approach: learn from game outcomes, not supervised labels. Instead of rolling out each position to get a "true" equity, the network plays games against itself and learns from whether it won or lost. Temporal-difference learning with λ-tracing propagates the final outcome back through the game tree, adjusting evaluations toward the actual result. This is the paradigm that produced world-class play in 1992 — and it's the natural next step when supervised labels hit diminishing returns.
v27's HID=512 is the first scaling experiment. If the flywheel continues to turn, deeper or wider networks may extract more signal from the same data. The weight interpolation technique means architecture changes don't waste the knowledge accumulated by previous versions.
The endgame is deployment. Pip AI could power the AI opponents on roll-cube.com, giving human players a genuine challenge from an engine trained entirely on consumer hardware — and proving that the $700 Mac mini on your desk can produce competitive game AI.
Every line of code is open source. The entire pipeline — position generation, Monte Carlo rollouts, neural network training, and benchmarking — is reproducible on any Apple Silicon Mac with Python 3.11 and Rust.
The Rust backgammon engine that powers position generation and Monte Carlo rollouts. Licensed under CC0 (public domain).
The Python training pipeline: PyTorch model definitions, MPS training loop, rollout orchestration, benchmarking harness, and the flywheel automation.
Requirements: Any Apple Silicon Mac (M1 or later), Python 3.11, Rust toolchain, and patience. The 3888-rollout labeling step is the bottleneck — it's embarrassingly parallel, so more cores = faster. Training itself is 51 minutes per iteration on an M4 Pro.
Pip AI powers the AI opponents on Roll-Cube. Test your backgammon against an engine trained on a $700 Mac.