打造能和頂尖引擎對弈的西洋棋程式,往往需要大量運算資源。
- 作者用 Rust 從頭寫出開源引擎 Chatarunga,表示它的 ELO 為 3533,對上 Stockfish 時有 37% 的對局得分,並在 7% 的對局中將對手將死。作者也分享開發經驗:每次訓練先做小規模測試,仔細找出失敗原因,曾因此發現程式把搜尋節點截斷的錯誤。
- 他也安排資料生成和程式調校同時進行,讓等待運算時能繼續推進工作。
AI 伴隨問答
針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:
I just built a top 50-100 chess engine in Rust from scratch, zero dependencies, with an ELO of 3533, scoring 37% against the #1 engine, Stockfish, with checkmate in 7% of games!
It's wild how far Fable, Neon, Astra + Modal went with just a little guidance for ~$50 total compute.
It's called Chatarunga and you can play it on Lichess here! It's fully open-sourced, and submitted to the CCRL best Chess AI leaderboards. The paper shows how it thinks in critical positions, traps Stockfish's Queen (10. Bxf7+!!) and organically discovers GM piece values.
I learnt a bunch of things while working on this:
- Verification loops are everything. When running a new training run, figure out what minimum viable run looks like, make the model establish a plan for what to expect and test, and then scrutinize the failure modality deeply if it doesn't achieve that. If you don't do that, it'll happily run long jobs without realizing there's a simple off-by-1 type error in training (this happened, we were mistakenly cutting off nodes!)
- Rust is unbeatable for agentic coding. The compiler and test suite catches whole classes of silent regressions before they poison long downstream runs.
- Having a consistent paper.pdf helped fight context slop. It serves as a ground truth for what experiments were performed and the results.
- Humans' job is as a scheduler (today). Models don't always have a strong sense of blocking and tackling and parallelism. I found a lot of my job was to say, look the Modal training run is going to take ~30mins, so maybe optimize the performance of the core training stack before running it, and run data gen in parallel while forking the core algo to run another experiment on the side. Coordinating between the different agents was also tricky. Getting this right ultimately lets you move the fastest.
Play Chatarunga live: https://t.co/zSeiDwWSGI
Github: https://t.co/buGtJjMPKu
14 page technical paper: https://t.co/ARQEXDAuum