Transformer在国际象棋中展现规则推理能力,能处理训练外的新局面。
Out-of-distribution Tests Reveal Compositionality in Chess Transformers
- 用270M参数的Transformer学习下棋,测试其对新布局的适应性。
- 模型在960种开局变体中仍能生成高质量走法,但弱于符号化搜索算法。
- 训练初期只动己方棋子,暗示逐步形成游戏规则的组合理解。
国际象棋是需要严谨推理与长期规划的经典任务。现代决策Transformer虽能学会有效对弈,但其是否真正掌握棋规尚不明确。我们训练了一个270M参数的国际象棋Transformer,通过分布外(OOD)测试检验其系统泛化能力。结果表明,模型表现出组合泛化:在训练数据之外的极端情境下仍能遵守基本语法规则,持续选择合法走法。此外,在更复杂的960种开局变体(Chess960)测试中,模型虽展现出基础策略调整能力,但仍不及采用显式搜索的符号化AI算法,但在与Lichess用户对战时表现差距缩小。训练动态显示,模型初期仅学习移动己方棋子,提示其逐步涌现出对游戏规则的组合理解。
原文摘要 · Abstract (English)
Chess is a canonical example of a task that requires rigorous reasoning and long-term planning. Modern decision Transformers - trained similarly to LLMs - are able to learn competent gameplay, but it is unclear to what extent they truly capture the rules of chess. To investigate this, we train a 270M parameter chess Transformer and test it on out-of-distribution scenarios, designed to reveal failures of systematic generalization. Our analysis shows that Transformers exhibit compositional generalization, as evidenced by strong rule extrapolation: they adhere to fundamental syntactic rules of the game by consistently choosing valid moves even in situations very different from the training data. Moreover, they also generate high-quality moves for OOD puzzles. In a more challenging test, we evaluate the models on variants including Chess960 (Fischer Random Chess) - a variant of chess where starting positions of pieces are randomized. We found that while the model exhibits basic strategy adaptation, they are inferior to symbolic AI algorithms that perform explicit search, but gap is smaller when playing against users on Lichess. Moreover, the training dynamics revealed that the model initially learns to move only its own pieces, suggesting an emergent compositional understanding of the game.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。