← Back
Home › Systems › Games

go-engine

Go engine

KataGo

SystemTechniques · 10Primitives · 33 go-engine Batched MCTS inferencegame-ai · medium: Feed an accelerator from tree search driven by a learned evaluator: virtual loss gathers leaves within a tree, parallel searches fill batches, an async queue overlaps CPU and GPU.›Gumbel mctsgame-ai · medium: Gumbel AlphaZero: sequential halving at the root with Gumbel noise for policy improvement at few simulationsMonte Carlo tree searchgame-ai · medium: Grows a search tree one simulation at a time, picking visits by a bandit rule (UCT or PUCT) and backing up averages; the search behind AlphaZero.›Parallel tree searchgame-ai · medium: Search one game tree on many threads: shared lossy transposition table (Lazy SMP), split points (YBWC), virtual loss for MCTSProof number searchgame-ai · medium: Best-first AND/OR search guided by proof and disproof numbers to solve positions; depth-first df-pn bounds memoryAlphaZero self-playmachine-learning · medium: A policy-value net guides PUCT search; search visit counts and game results become its training targets, so it learns from its own improved play.›Sequential probability ratio teststatistics · medium: Add up the log-likelihood ratio per observation and stop when it crosses a fixed bound; the least data of any test with the same error rates (for two point hypotheses).›Transposition tablegame-ai · low: A fixed-size, lossy hash table of search results keyed by a state hash; gives ordering and cutoffs for repeated states, shared lock-free between threads.›Symmetry data augmentationmachine-learning · low: Augment board-game training data with the board's symmetry group (8 dihedral transforms)Convolutional networksml-training · low: Layers that slide a small shared kernel over a grid, giving translation equivariance and few parameters; still the most compute-efficient choice for many vision tasks.›Search time managementgame-ai · low: Allocate thinking time per move from clock, increment and search instabilityZobrist hashinggame-ai · low: A state's hash is the XOR of one random 64-bit key per (item, slot) fact that holds in it, updated in a few XORs per change.›Elo ratinggame-networking · low: One number per competitor, moved by K × (actual − expected score) after each pairwise result; expected score is logistic in the rating difference.›Union-findgraphs · low: Disjoint-set forest with union by size and path compression; merges sets and answers same-set queries in effectively constant time.›Kernel fusionml-training · low: Merge chains of memory-bound GPU ops into one kernel, so intermediates stay in registers instead of round-tripping through HBM.›Mixed-precision trainingml-training · low: Run matmuls in bf16/fp16/fp8 on tensor cores while keeping master weights, optimizer state and reductions in fp32; about 2x speed, half the activation memory.›Weight quantizationml-training · low: Store weights as 8/4-bit integers with per-group scales; decode is memory-bound, so 4-bit weights give about 3-4x tokens/s and fit 4x larger models.›MPMC bounded queueconcurrency · low: Vyukov's array queue for many producers and consumers: each slot carries a sequence number, so one CAS per operation claims a slot without locks.›PRNGs (PCG, xoshiro)numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.›Top-k selectionsearch-sort · low: Keep the k best of n items without sorting all n - bounded min-heap for streams, quickselect for arrays, threshold pruning to skip most items.›Memory orderingconcurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.›Experience replaymachine-learning · low: Ring-buffer replay memory with uniform or prioritized sampling for off-policy and self-play trainingSGD with momentumml-training · low: Gradient descent plus a decaying velocity buffer that averages minibatch noise and speeds up progress along shallow, consistent directions.›+ 3 more techniques+ 17 more primitives

Similar systems

Share the most building blocks with this one.