DWARKESH · 2026-05 HARDWARE & ROBOTICS
DWARKESH · EPISODE DECK

Rebuilding AlphaGo from scratch

What MCTS really teaches us about RL, LLMs, and 10 layers of compute

Eric Jang · ex-VP AI @ 1X · ex-Google DeepMind Robotics

Eric Jang 在 sabbatical 期间用大约 10K 美元 + Claude Code 重新实现了 AlphaGo, 在和 Dwarkesh 的对谈里把 MCTS 拆到底——为什么它不是 credit assignment、 为什么它比当下 LLM RL 优雅得多、以及 10 层网络居然能把一个看似 intractable 的搜索问题塞进一次 f…

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

这一期讲什么

用 10K 美元复刻 AlphaGo

当年 DeepMind 的"几百万美元 + 一整队研究员",今天 LLM 编程辅助下,a few thousand dollars of rented compute 就够了。

MCTS 到底在做什么

不是 credit assignment,不是策略梯度——而是给每一步重打一个更好的标签,然后做 supervised learning。

比 LLM RL 优雅得多

LLM RL 是 sucking supervision through a straw。AlphaGo 永远不需要从 0% 成功率起步。

10 层网络 = 一个"NP-hard"问题

"一个看似非常困难的问题,可以塌缩到一个非常简单的宏观仿真里"——这才是 AlphaGo 最深的洞见。

Test-time scaling 的祖师爷

Andy Jones 2021 年的 board-games scaling laws,是后来 LLM 推理时间扩展的原型。

Opus 真的能做研究吗

能:超参搜索 + 做实验。不能:从一条死路里跳出来"换个思路"。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

嘉宾:Eric Jang

现在

Sabbatical · 业余项目:用现代硬件 + Claude Code 复刻 AlphaGo

项目代码:github.com/ericjang/autogo

之前

VP of AI @ 1X Technologies · 人形机器人

Senior Research Scientist @ Google DeepMind Robotics

这次复刻

  • 经费:来自 Prime Intellect 的赞助,"about 10K"
  • 探索阶段花了 ~4K
  • 最终训练跑 ~3K
  • 剩下留着 serving model

为什么是 AlphaGo

"It was just profound to see ... how smart AI systems could become."

围棋长期被认为是 search-intractable 的问题,但深度学习一把就破了。

而最神秘的是:"a 10 layer network can sort of amortize the simulation of something so so so deep in the game tree."

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

为什么围棋这么难

经典论证:

  • 19×19 棋盘上每步 ~361 个可走点
  • 一局约 250-300 步
  • 朴素地展开整棵博弈树 → 大约 361³⁰⁰ 种走法

"it's just far more than the number of atoms in the universe."

计算机科学家曾长期认为:本世纪内不可能用搜索解决围棋。

搜索空间的breadth(每层选择多)与 depth(每局太长),

两者都得砍。

…~361 moves~300 plies deep≈ 361³⁰⁰ possibilities— far more than atoms in the universe
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

MCTS 的核心数据结构

每个 node 存四个东西:

N (visit count) — 从 parent 走到这里走了几次

Q (mean action value) — 在这里平均最终能赢吗?

P (prior policy) — 来自 policy net,"先验觉得这步好不好"

children — 链表式指针

"This was what Claude 4.6 wrote for me when I asked it

and it was a very reasonable choice."

关键设计选择

  • 每个 node 代表状态(不是动作)
  • 因为围棋是 deterministic,根据 child 就能反推动作
  • 不存动作,省内存
  • 树是边搜索边长的,不是一次性建好

不像 tic-tac-toe 那样可以完整展开 9!——围棋的搜索树必须稀疏,只往看起来 promising 的方向长。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

选哪一步走:PUCT 公式

argmaxa   [   Q(s, a)   +   c · P(a) · √N / (1 + Na)   ]

第一项:exploit

Q = 这条分支历史模拟的平均胜率

"已经知道这里好不好。"

第二项:explore

Na 越小这项越大;

visit count 还少的分支会被强行多看几眼。

Dwarkesh 的复述

"as over time you will move from the argmax being dominated by this exploration term ... to the argmax being dominated by the Q term."

随着搜索深入,"被 exploration 项主导"过渡到"被 Q 项主导"。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

一次 simulation = 四步走

① Selection — 沿当前树用 PUCT 一路 argmax 下到 leaf

② Expansion — leaf 不是终局?跑一遍 policy net,把它的 children 全部生成出来

③ Evaluation — value net 给每个新 child 估一个 v(s);不需要真的下到终局

④ Backup — 把估值沿路径反推回 root,更新每个节点的 Q

每走一步棋跑 200–2,048 次 simulation;

AlphaGo Lee vs 李世石那场用了 tens of thousands of simulations per move。

rootN=3Q=.4N=12Q=.7N=1Q=.3visit count N + mean action value Qare stored on each edge
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

价值函数:为什么人类能"瞄一眼就知道输赢"

朴素 MCTS 的问题

终局太远——你不可能为每个 simulation 都搜到 300 步深。

AlphaGo 的赌注

human glances at the board and they know "I'm probably going to lose"

人脑里有一个隐式 value function,"在 a few seconds without actually playing every single game logically" 就给出判断。

推论

  • 如果一个 10 层网络能学会这个 value function
  • 那它就能在 MCTS 里当作搜索的截断器
  • depth 问题解决一半

关键引述

"this gives us a hint that ... in games like Go there are ways to basically radically speed up the search process."

而且这种"压缩"远比想象中神奇——

"a 10 layer neural network pass ... 10 steps of neural network paralyzed distributed representation thinking is able to amortize and approximate to a very very high fidelity a nearly intractable search problem."

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

一张网络,两个头

value head (R¹)

单个 logit:从这个 state 出发,我赢的概率是多少?

policy head (R³⁶¹)

对 361 个落点的 softmax:哪些走法看起来不错?

架构选择基本不重要:ResNet 和 Transformer 都能 work。Eric 实测在小预算下 ResNet 反而比 Transformer 略好——因为它的局部卷积归纳偏置正好契合围棋的局部攻防。

AlphaGo Lee 用两个独立网络;后续所有论文合并成共享 backbone + 两个 head。"presumably this saves compute."

board state3 channels:black / white / emptyResNet~10 layersvalue head1 logit"will I win?"policy head361 logits"good moves"shared trunk, two heads(AlphaGo Lee had two separate networks)
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

实践哲学:init is everything

Eric 自己复刻时的选择

先用 KataGo 的开源模型做 best-response training——拿一个已经很强的对手当陪练,自己的网络从一个"勉强能跟"的状态出发。

然后再尝试 tabula rasa(AlphaGo Zero 风格、从零自博弈)那一套。

为什么不上来就 cold start?

"init in initialization is everything."
"always pick something that works and then get it to do something better rather than start from something that doesn't work at all and then try to make it work."

通用研究原则

把研究问题初始化到尽可能接近成功的状态,再从那里 push improvement。

"always want to initialize your research project to something as close to success as possible."

→ 对应到 LLM 时代:

  • pretrain 是最大的 init
  • 蒸馏一个 frontier 模型也是一种 init
  • 而不是 from scratch 训 RL
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

MCTS 作为"策略改进算子"

横轴是 simulation 次数:

  • 红色虚线:raw policy net 单次前向,"shoots from the hip"
  • 蓝色实线:套上 MCTS 之后,胜率单调爬升

核心 trick:把蓝线相对红线的提升,蒸馏回 policy net。

"distill this MCTS policy network back into your sort of shoot from the hip policy network"

下一轮的 policy net 起点就更高了——MCTS 再爬一段更高,再蒸馏回去。

一个稳定单调的 boostrap loop。

win rate# of MCTS simulationsraw policy netMCTS policydistill this gapback into the net
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

蒸馏的对象:分布,不是动作

错误做法

训练 policy net 去预测 MCTS 选出来的那一步(one-hot label)。

  • 单一动作的熵 = 0
  • 每个样本只带 1 bit 的"对错"信号
  • 浪费了 MCTS 辛苦搜出来的不确定性

AlphaGo 的做法

预测 MCTS 的整个访问分布(soft labels)。

"you don't train the policy network to imitate the MCTS action you train it to imitate the MCTS distribution"
  • soft label 的熵远高于 one-hot
  • bits per sample 多得多
  • 这正是 distillation 之所以高效的本质

"the entropy of this distribution is far far higher than the one-hot. So there's actually way more information ... in bits per sample in a soft label."

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

MCTS 不在做 credit assignment

"Monte Carlo tree search is doing something very fundamentally different which is it's not trying to do credit assignment on wins. It's trying to improve the label for any given action you took."

朴素 policy gradient

  • 拿到游戏结果(赢/输)
  • 对赢家的整条轨迹做 reinforce
  • 哪一步真的有用?全靠 N → ∞ 的平均洗出来

MCTS 的 dagger 视角

"for every action we took, we did a pretty exhaustive search ... to see if we could do better"
  • 每一步都搜出一个"更好的版本"
  • 每一步都有干净的监督信号
  • 这才是为什么 variance 低、训练稳
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

Dagger 类比:被风吹偏了怎么办

"the problem with go and chess is that the other player is always trying to do some [thing]"

对手总会让你漂出"最优轨迹"。鲁棒训练的关键不是只见过 optimal states,而是知道 从一个 drifted state 怎么走回来。

Replay buffer 该长什么样:

  • 大部分 = on-policy 的最优轨迹
  • 少量 = 周围一圈"还能救回来"的偏离态
  • 每个偏离态都被 MCTS 标了一个返回最优的动作

真正的 off-policy 灾难:训练数据全是 policy 根本不可能到达的状态——浪费 capacity,越训越差。

S₀S₁S₂WINhigh-dimensional tube of "recoverable" statesdrifted state — MCTS provides a recovery action
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

朴素 self-play 的 variance 灾难

一个具体例子

两个实力 50/50 的策略 πA、πB 互打 100 局,每局 300 步:

  • 51 局 πA 赢
  • 49 局 πB 赢
  • 但只有 1 个关键 move 真正让 πA 占优;剩下 50×300 步基本是巧合

信号 vs 噪音

  • 真正的训练信号:≈ 1 个 token
  • 你要 reinforce 的轨迹:99 × 300 = 29,700 步

Dwarkesh 的总结

"this thing you're saying ... would be intractable and prevents you from actually getting beyond a certain level in Go is just by default how LLMs are trained."

LLM RL 之所以勉强 work 是因为 sample 数量足够大、advantage estimation 替你做了 baseline 减法——但这是用堆量换信号。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

Karpathy 的"用吸管喝监督"

"sucking supervision through a straw"

LLM RL 的现状

  • 一条 trajectory 跑完,只拿到一个 scalar reward(对 / 错)
  • 把这个信号强行均摊到每个 token
  • agent 任务越长 → samples-per-flop 越低 → 信号越稀

MCTS 的优势

  • 不需要走完整轨迹
  • 每一步就地搜出更优动作
  • 价值函数把"未来"压缩进当前状态
  • 每个 token 都拿到了一个 dense supervision

"To get the supervision through a straw. Uh basically just upgrade all the tokens in a trajectory that might or might not have been relevant to getting the answer right."

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

Bits per flop = bits/sample × samples/flop

把 LLM RL 极端拆解:

早期训练:

  • 一个未训练模型猜"the sky is ___"
  • 词表 10⁵,猜中 "blue" 的概率 ≈ 10⁻⁵
  • 监督学习的 bits 是 −log(p) → 很大
  • RL 的 bits 是 binary entropy H(p) → 几乎为 0

"the problem is you spend most of training in this regime ... in the low pass rate regime." — "a sort of depressing plot."

bits / samplepass rate (log scale)supervised −log(p)RL H(binary)"you spend all your time here"
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

为什么 AlphaGo 是"最优雅的 RL 算法"

"you never have to initialize at a 0% success rate and solve the exploration problem of how to get a non-zero success rate. And this is what allows you to hill climb this beautiful supervised learning signal."

没有 0% trap

MCTS 在任何 policy(哪怕乱猜)上都能给出比当前 policy 更好的动作。

完全是 supervised

"supervised learning problem on improved labels"

没有 TD error、没有 PPO clip、没有动态规划——就是 KL min + 二分类。

训练超级稳

"You can train like as big of a network as you want ... everything will just go stably."

⚠️ 前提:value function 必须靠谱。Eric 推荐先用 expert data 或 KataGo selfplay warm-up value head——chain of assumptions 里最容易塌的一环。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

一个让人不安的洞见

"there's something to it that ... is very disturbing where like what felt like a very hard problem can fall to a very very simple macroscopic simulation."

字面意思

10 层网络 ≈ 10 步顺序推理

却能把一个搜索意义上 intractable 的问题,压进一次 forward pass。

→ AlphaFold 也是同一种现象:本来要跑天量微观模拟,结果一个不大的网络一把搞定。

推论

Eric 的猜想:

"our understanding of problems like P equals NP or these very fundamental computational hardness problems are incomplete."

Worst case 的 NP-hardness 不代表平均场景的硬度——大部分实际问题是有结构、可摊销的。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

混沌 vs 宏观结构

围棋 / 天气 / 蛋白质折叠都对初始条件极端敏感——一个石子位置不同,整个未来全变。

但我们关心的从来不是"未来 100 步的精确棋盘",而是谁会赢、飓风去哪、蛋白怎么折。

"sometimes we don't necessarily care about the microscale things. We actually care about the macroscopic structure."

Lorenz attractor 单点轨迹不可预测,但整个吸引子有形状。Eric 说:"you have the maximum power of a neural network at the edge of chaos."

single state…but the attractor itself has shape
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

Andy Jones 2021 — 推理时间扩展的祖师爷

论文

"Scaling Scaling Laws with Board Games" · 2021

第一个核心发现

Test-time compute ↔ training compute 可以互换:

  • 多花一些 MCTS simulation 步数
  • 等价于多训一段时间
  • 二者沿一条等价曲线移动

第二个发现

可以从小棋盘外推大棋盘所需的 compute——这是 LLM 之前就出现的"scaling laws 跨规模迁移"案例。

为什么今天值得重做

"you actually have to make a strong gobot first and then use the scaling laws to kind of extrapolate."

Eric 一开始踩的坑:带 bug 的系统上研究 scaling 没意义——先得让东西真的 work。

后来 LLM 的 test-time scaling(CoT、推理模型)几乎是这个发现的直接续作——只不过载体从 MCTS 换成了语言里的思考链。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

比特的不对称:先做 vs 追赶

"The compute required to be the first to do something is always like much larger than the compute it takes to catch up."

AlphaGo Zero 当年

3e23 FLOPs

整整一个 TPU pod

"way more compute than any other AI model at the time"

KataGo 2020

40× 算力压缩

开源代码

Jane Street 的 David Woo 主导

Eric 2026

~$10K · Prime Intellect 赞助

4K 探索 + 3K 最终训练

"a few thousand dollars of rented compute"

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

Bitter Lesson 在围棋上发生了吗

Eric 的实测(非 peer-reviewed)

  • ✅ 架构选择不太重要:ResNet vs Transformer 差距小
  • ✅ 分布式 RL infra 可省:dumb synchronous 训练就够
  • ✅ GPU 涨了:Katago 用 V100s → 现在桌面 Blackwell 一半数量
  • ✅ 辅助 supervision objectives 可省——只要有一个强的初始化(best-response training against KataGo)

但还活着的 trick

  • 9×9 → 19×19 的多棋盘迁移仍然显著加速 warm start
  • AlphaGo Zero 的前 30 小时基本花在追赶 supervised baseline

一句话总结

任何 compute multiplier 都是 transitory 的:
三年后 NVIDIA 出更快的卡,
你今天精心设计的 trick 大概率就废了。

研究品味 = 知道 bitter lesson 现在能买你多少东西,以及什么时候不能完全依赖它。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

自动化 AI 研究:Opus 现在能做什么

现在已经很强

超参搜索:不只是 grid search,而是开放式探索——

"I've identified that the gradients are kind of small on this layer so let me change it up here, let me rewrite the code so the data loader has a new augmentation."

像一个会 grind 性能指标的初级博士生 ("grad studentlike")。

执行实验:Eric 写了一个叫 experiment 的 Claude skill——给坐标轴和目标,自动跑、画图、写报告、推测原因。

还差什么

不擅长 lateral thinking:在一个 track 上一头扎到底,不会停下来问"是不是这条路本身就走不通"。

"they don't seem to be able to kind of step back and do the lateral thinking ... like wait a minute this track doesn't really make sense."

很多 infra bug 是 Eric 自己手动 prompt "请检查 X" 才发现的。

Eric 使用:Opus 4.6 和 4.7

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

Go 作为自动化研究的 sandbox

外层 outer loop

对战 KataGo 的胜率——干净、可验证、不可 hack。

"verifiable game like go on the outer loop."

内层 inner loop

和 LLM / 机器人重叠的所有子问题:

  • 分布式系统
  • 预测哪个 idea 会 work
  • 训练算法的局部调优
  • ⇒ 全部可以在小预算上做

一个非显然的 outer loop 设计

不一定要"打败 KataGo"——也可以是:

  • 能不能预测我自己 gobot 的胜率?
  • 能不能预测修改某个超参后的 scaling law?

这样 reward hacking 风险更低,但仍然需要靠"打 KataGo"做最终校验。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

当深度学习本身就是要被发现的东西

Dwarkesh 的反问

要训练一个强围棋 bot,你得先发现深度学习。但深度学习是个几十年的赌注:

"this presents a very challenging long horizon RL problem where every step of the way you have like a committee telling you that this is a bad idea and then ultimately you break it through."

当下的悖论

  • 真正重要的发现都是 decadesl long idea that took a lot of faith
  • 但你的 RL 环境只能给短期 reward
  • 怎么设计一个对长视野的"研究信仰"有耐心的 outer loop?

Eric 的一个押注

LLM 可以充当 "universal grammar":

  • 在 stack 任意层级思考
  • 既能局部、也能 step back
  • → 是未来"lateral thinking 自动化"的载体
重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

局部改进真的能叠加吗?

Dwarkesh 听到的传闻

某些 lab 的训练 run 失败,是因为一群人独立地各跑各的好 idea,最后两个看上去都对的 trick 在一起反而互相破坏。

→ "having a single top down vision of how things should work is very important."

Eric 的回答

很多 compute multiplier 有 correlated benefit——它们都在解决"GPU 不够快"的副作用,本质重叠。

  • 现在 work 的 trick
  • 三年后 GPU 翻倍
  • 大概率就废了或退化成噪音

任何一个 trick 的优势都是 transitory 的。

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

游戏经验能迁移到 LLM 吗?

Eric 的非严格论证

DeepMind 一开始就在游戏上磨刀:Atari、AlphaGo、StarCraft、AlphaStar。

后来转 LLM 时,看上去有 positive transfer——研究 taste、coding ability、distributed infra、project management 全都用得上。

"I assume that there's like positive transfer in some regard."

Dwarkesh 反驳

但 Google 一开始在 LLM 上落后——会不会正因为他们的 RL/games tech tree 反而拖后腿?

Eric 让步

"the jury is still out ... it's even hard for humans to reason about what the optimal research strategy should be even with the data we have today."

→ 那么自动化研究员怎么可能做对?

重建AlphaGo教会我们的自博弈、RL与LLM未来 - Eric Jang HARDWARE & ROBOTICS

核心金句

这期对谈里最值得记住的几句:

"a 10 layer neural network ... is able to amortize and approximate to a very very high fidelity a nearly intractable search problem."

— Eric 论 AlphaGo 最深的洞见

"It's not trying to do credit assignment on wins. It's trying to improve the label for any given action you took."

— MCTS 到底在做什么

"You never have to initialize at a 0% success rate and solve the exploration problem of how to get a non-zero success rate."

— 为什么 AlphaGo 是优雅的 RL

"You don't train the policy network to imitate the MCTS action — you train it to imitate the MCTS distribution."

— 蒸馏的真正力量在 soft label

"What felt like a very hard problem can fall to a very very simple macroscopic simulation."

— NP-hard 也许不像我们以为的那么硬

"The compute required to be the first to do something is always much larger than the compute it takes to catch up."

— 为什么 10K 就能复刻 AlphaGo
Eric Jang

一个 10 层网络 ≈ 10 步推理

却能塌缩"一个本该 intractable 的搜索问题"

代码 · github.com/ericjang/autogo

博客 · evjang.com

推荐延伸阅读:Eric 的 "As Rocks May Think"

"There is some very interesting duality between [Go and LLMs]

and you can actually do a lot of research on Go MCTS and reasoning

with very small budgets."

← PodDeck