Eric Jang – Building AlphaGo from scratch

Eric Jang – Building AlphaGo from scratch

A 10-layer neural network can compress a nearly intractable game-tree search — and AlphaGo's training loop is actually just supervised learning on better labels, never raw RL.

May 15, 2026 2:37:29 Difficulty: Intermediate Played

TL;DR

Eric Jang, former VP of AI at 1X Technologies, walks through building AlphaGo from scratch using modern AI tools, using the project to illuminate the future of AI research. He explains how Monte Carlo Tree Search (MCTS) sidesteps the credit assignment problem that plagues naive policy gradient RL — by generating a strictly better action label for every single move, rather than reinforcing entire winning trajectories. This contrast exposes deep inefficiencies in how LLMs currently learn via RL. The key takeaway: AlphaGo's self-play loop is elegant precisely because it never starts from zero signal — MCTS always gives you something to improve on.

#AlphaGo #Monte Carlo Tree Search #reinforcement learning #LLM RL training #credit assignment problem #policy gradient variance #self-play #AI research automation #scaling laws #NP-hard problems and neural nets #distillation #off-policy learning #Go AI #inference-time compute #bits per sample #MCTS #LLMs #credit assignment #policy gradient #value function #neural networks #Go #automated research #KataGo #off-policy training #ResNets #exploration #AlphaZero #NP-hard

Eric Jang walks through how to build AlphaGo from scratch using modern AI tools, explaining MCTS, self-play, and RL — and drawing connections to how LLMs learn and where AI research automation is headed.

Chapter list
  • Dwarkesh explains how he used the Cursor agent SDK to build a multi-stage flashcard generation pipeline for this episode, including blackboard screenshot ingestion and SVG generation.

  • Eric walks through the UCB1 bandit algorithm and AlphaGo's PUCT variant — how visit counts, Q-values, and prior probabilities are balanced to explore and exploit.

  • Eric describes the neural network architecture — ResNet or Transformer, two output heads (policy and value) — and explains how training on expert human games produces a strong Go player before any search.

  • Eric explains how MCTS produces a more confident action distribution than the raw policy, and how AlphaGo trains the policy to imitate that improved distribution — the core self-play loop.

  • Eric explains neural fictitious self-play — training best-response policies against fixed opponents and distilling them — as an MCTS substitute for games without tractable tree search.

  • Eric and Dwarkesh discuss why MCTS fails for LLM reasoning: language's vast token space violates the discrete finite-action assumption, and value estimation is much harder than in Go.

  • Eric explains the DAGGER-inspired view of replay buffers: off-policy data is helpful if it covers reachable states, harmful if it covers states the current policy would never visit.

  • Dwarkesh presents an information-theoretic argument: naive RL learns near-zero bits per sample at low pass rates, while supervised learning learns negative log(pass rate) bits. The gap is enormous.

  • Eric reports from his AlphaGo project: LLMs excel at hyperparameter tuning and executing experiments, but fail at lateral thinking — choosing the right question and recognizing dead-end research tracks.

MCTS (Monte Carlo Tree Search)
A tree-search algorithm that iteratively selects, expands, evaluates, and backs up nodes to estimate the best move, without needing to search the full game tree.
PUCT
Predicted Upper Confidence Bound with Trees — the action selection formula in AlphaGo that balances exploitation (mean action value Q) with exploration (prior probability P divided by visit count).
Policy network
A neural network that outputs a probability distribution over possible moves, representing which actions are likely to be good from a given board state.
Value network
A neural network that takes a board state and predicts the probability of winning from that state, allowing deep tree search to be truncated early.
Credit assignment problem
The challenge in RL of determining which specific actions in a long trajectory were responsible for a final reward, as opposed to irrelevant or harmful actions.
Policy gradient (REINFORCE)
A family of RL algorithms that estimate gradients by rolling out full trajectories and scaling action log-probabilities by the trajectory's return, suffering from high variance.
Tabula rasa
Latin for 'blank slate' — in AI, training a model entirely from self-play or random initialization without any supervised pretraining on human data.
Tromp-Taylor rules
A version of Go rules designed to be completely unambiguous and algorithmically decidable, used by all Go AIs for scoring instead of the human-interpretation-dependent Japanese or Chinese rules.
DAGGER
Dataset Aggregation — an imitation learning algorithm that corrects a policy by querying an expert for better actions at states the current policy visits, used here as an analogy to MCTS relabeling.
Off-policy training
Training a reinforcement learning agent on data collected by a different (older) version of the policy, rather than the current policy — can be unstable if the old data is too far from the current policy's distribution.
Advantage estimation
In RL, the advantage of an action is how much better it is than the average — subtracting a baseline value from the return to reduce gradient variance.
Neural fictitious self-play
A game-theoretic training method where agents are trained as best responses to a league of fixed opponents, then distilled into a mixed strategy — used in AlphaStar and OpenAI Five.
TD learning (Temporal Difference)
A class of RL methods that update value estimates using the difference between predicted and observed rewards at successive timesteps, without waiting for full episode outcomes.
Amortize
To spread the cost of a computation across many instances; here, a neural network 'amortizes' expensive tree search by encoding its results into learned weights.
Inductive bias
The set of assumptions a model makes about data structure; CNNs have a local spatial bias, while Transformers have a global attention bias — relevant to choosing architectures for Go.
Lorenz attractor
A canonical chaotic dynamical system whose trajectories are unpredictable in detail but remain on a recognizable butterfly-shaped structure — used here as an analogy for macroscopic predictability despite microscopic chaos.
Bitter lesson
Richard Sutton's observation that in the long run, general methods that leverage compute (search, learning) consistently outperform methods that encode human knowledge — referenced multiple times as a design principle.
KL minimization
Kullback-Leibler divergence minimization — a training objective that measures how much one probability distribution differs from another; used in AlphaGo to train the policy to match the MCTS distribution.
Bellman backup
The dynamic programming operation that updates a value or Q-function estimate using the reward plus the discounted value of the next state — the backbone of Q-learning and TD methods.
Replay buffer
A data structure that stores past transitions (state, action, reward, next state) for off-policy RL training, allowing the agent to learn from experiences not generated by its current policy.

Chapter 1 · 00:00

Basics of Go

Dwarkesh explains how he used the Cursor agent SDK to build a multi-stage flashcard generation pipeline for this episode, including blackboard screenshot ingestion and SVG generation.

Claims made here

David Wu's KataGo project achieved a 40x reduction in compute needed to train a strong tabula rasa Go bot compared to previous work.

Eric Jang KataGo paper by David Wu (2020)

Technology
Data point 40x

Eric Jang – Building AlphaGo from scratch · May 15, 2026

David Wu's open-source KataGo project in 2020 achieved a 40x reduction in the compute needed to train a strong Go bot tabula rasa.

Chapter 2 · 08:17

Monte Carlo Tree Search

Eric walks through the UCB1 bandit algorithm and AlphaGo's PUCT variant — how visit counts, Q-values, and prior probabilities are balanced to explore and exploit.

Claims made here

A 19x19 Go board has approximately 361 possible moves per turn over roughly 250-300 moves per game, producing a tree larger than the number of atoms in the universe.

Eric Jang no source cited

Chapter 3 · 32:04

What the neural network does

Eric describes the neural network architecture — ResNet or Transformer, two output heads (policy and value) — and explains how training on expert human games produces a strong Go player before any search.

Claims made here

For low-budget experiments on Go, ResNets outperform Transformers because of their local convolutional inductive bias, though this may reverse at higher data scales.

Eric Jang no source cited

KataGo found it useful to pool global features throughout the network to give it a global sense of how to connect value across different parts of the 19x19 board.

Eric Jang KataGo paper by David Wu

In perfect information games like Go, there exists a Nash equilibrium strategy decidable solely from the current state — no temporal history of opponent moves is required.

Eric Jang no source cited

In AlphaGo Lee, the value estimate used during MCTS was averaged with the result of a full playout to the end of the game; all subsequent AlphaGo papers removed this and used only the neural network value.

Eric Jang AlphaGo Lee paper (DeepMind)

Chapter 4 · 1:00:33

Self-play

Eric explains how MCTS produces a more confident action distribution than the raw policy, and how AlphaGo trains the policy to imitate that improved distribution — the core self-play loop.

Chapter 5 · 1:25:38

Alternative RL approaches

Eric explains neural fictitious self-play — training best-response policies against fixed opponents and distilling them — as an MCTS substitute for games without tractable tree search.

Claims made here

AlphaGo Lee (the original AlphaGo paper) used two separate neural networks for policy and value; all subsequent AlphaGo papers merged them into a single network with two output heads.

Eric Jang AlphaGo Lee paper (DeepMind)

In naive policy gradient RL, gradient variance grows quadratically with trajectory length due to the multiplicative coupling between reward and per-token log-probability terms.

Eric Jang no source cited

Andy Jones' 2021 paper 'Scaling Scaling Laws for Board Games' showed that training compute and inference compute (MCTS simulations) can be traded off, anticipating inference-time scaling laws for LLMs.

Dwarkesh Patel Andy Jones, 'Scaling Scaling Laws for Board Games' (2021)

Current LLM RL treats the entire decoded token sequence as a single action (T=1), avoiding multi-step gradient variance but losing fine-grained credit assignment.

Eric Jang no source cited

Chapter 6 · 1:41:09

Why doesn't MCTS work for LLMs

Eric and Dwarkesh discuss why MCTS fails for LLM reasoning: language's vast token space violates the discrete finite-action assumption, and value estimation is much harder than in Go.

Claims made here

Eric Jang trained a competitive AlphaGo-style Go bot for approximately $10K in donated compute from Prime Intellect, with ~$3K spent on the final training run.

Eric Jang no source cited

AlphaGo Zero was trained on approximately 3e23 flops — an anomalous outlier in the historical chart of AI training compute, comparable in order of magnitude to frontier LLMs.

Dwarkesh Patel no source cited

AlphaGo Zero's training plot shows that approximately the first 30 hours are spent just catching up to the supervised learning baseline before the tabula rasa policy surpasses it.

Eric Jang AlphaGo Zero paper (DeepMind)

Technology
Why MCTS Doesn't Work for LLMs

Eric Jang – Building AlphaGo from scratch · May 15, 2026 Technology

Language has billions of possible next tokens — the PUCT exploration heuristic assumes you'll visit the same node multiple times, but an LLM will almost never generate the exact same token sequence twice. The discrete action assumption breaks.

Technology
Data point $10K

Eric Jang – Building AlphaGo from scratch · May 15, 2026

Eric Jang trained a strong Go bot for roughly $10K of donated compute from Prime Intellect, spending about $3K on the final training run.

Chapter 7 · 2:01:09

Off-policy training

Eric explains the DAGGER-inspired view of replay buffers: off-policy data is helpful if it covers reachable states, harmful if it covers states the current policy would never visit.

Chapter 8 · 2:08:56

RL is even more information inefficient than you thought

Dwarkesh presents an information-theoretic argument: naive RL learns near-zero bits per sample at low pass rates, while supervised learning learns negative log(pass rate) bits. The gap is enormous.

Chapter 9 · 2:16:16

Automated AI researchers

Eric reports from his AlphaGo project: LLMs excel at hyperparameter tuning and executing experiments, but fail at lateral thinking — choosing the right question and recognizing dead-end research tracks.

Claims made here

Distillation from soft target distributions is far more information-efficient per sample than one-hot labels because soft distributions have much higher entropy.

Eric Jang no source cited

No indexed bits in this chapter.

Show stoppers

Snapshots ()

Key Quotes ()

This episode

Cast

Stats

Episode stats

Insight Overview

insights
chapters

Insight distribution

Sub-Categories

Speaker breakdown

Talk Time

This episode

Claims & Sources

6 / 14 cited (43%)

Factual claims made this episode, and whether a source was named.

David Wu's KataGo project achieved a 40x reduction in compute needed to train a strong tabula rasa Go bot compared to previous work.

Eric Jang KataGo paper by David Wu (2020)

A 19x19 Go board has approximately 361 possible moves per turn over roughly 250-300 moves per game, producing a tree larger than the number of atoms in the universe.

Eric Jang no source cited

AlphaGo Lee (the original AlphaGo paper) used two separate neural networks for policy and value; all subsequent AlphaGo papers merged them into a single network with two output heads.

Eric Jang AlphaGo Lee paper (DeepMind)

AlphaGo Zero was trained on approximately 3e23 flops — an anomalous outlier in the historical chart of AI training compute, comparable in order of magnitude to frontier LLMs.

Dwarkesh Patel no source cited

Eric Jang trained a competitive AlphaGo-style Go bot for approximately $10K in donated compute from Prime Intellect, with ~$3K spent on the final training run.

Eric Jang no source cited

In AlphaGo Lee, the value estimate used during MCTS was averaged with the result of a full playout to the end of the game; all subsequent AlphaGo papers removed this and used only the neural network value.

Eric Jang AlphaGo Lee paper (DeepMind)

For low-budget experiments on Go, ResNets outperform Transformers because of their local convolutional inductive bias, though this may reverse at higher data scales.

Eric Jang no source cited

KataGo found it useful to pool global features throughout the network to give it a global sense of how to connect value across different parts of the 19x19 board.

Eric Jang KataGo paper by David Wu

Andy Jones' 2021 paper 'Scaling Scaling Laws for Board Games' showed that training compute and inference compute (MCTS simulations) can be traded off, anticipating inference-time scaling laws for LLMs.

Dwarkesh Patel Andy Jones, 'Scaling Scaling Laws for Board Games' (2021)

AlphaGo Zero's training plot shows that approximately the first 30 hours are spent just catching up to the supervised learning baseline before the tabula rasa policy surpasses it.

Eric Jang AlphaGo Zero paper (DeepMind)

In naive policy gradient RL, gradient variance grows quadratically with trajectory length due to the multiplicative coupling between reward and per-token log-probability terms.

Eric Jang no source cited

Current LLM RL treats the entire decoded token sequence as a single action (T=1), avoiding multi-step gradient variance but losing fine-grained credit assignment.

Eric Jang no source cited

In perfect information games like Go, there exists a Nash equilibrium strategy decidable solely from the current state — no temporal history of opponent moves is required.

Eric Jang no source cited

Distillation from soft target distributions is far more information-efficient per sample than one-hot labels because soft distributions have much higher entropy.

Eric Jang no source cited