用单子续延重新表述 Alpha-Beta 剪枝并给出正确性证明
Alpha-Beta Pruning via Monadic Continuations
用 Haskell 玩函数式编程的人会喜欢这篇:作者只用 continuation monad 就把 Alpha-Beta 剪枝写出来,还能顺便算出最优走子序列,Tic-Tac-Toe 实测比穷举少评估 39 倍。想理解定理证明式编程怎么用在经典 AI 算法上,这篇是不错的入口。
arXiv 论文《Alpha-Beta Pruning via Monadic Continuations》提出用 continuation monad 与 reader monad 组合来表述 Alpha-Beta 剪枝。与以往把剪枝边界编码进走子类型的做法不同,该构造将边界记录在单子化结果中,保持走子类型不变。
作者还证明,只需普通 continuation monad,把结果类型扩展为包含对应走子序列,就能同时计算最优结果与最优对局,无需依赖为解决 selection monad 低效而提出的扩展方案。论文以 Tic-Tac-Toe 为例实现,相比穷举搜索,计算最优对局时评估的走子序列数量减少 39 倍。
作者形式化证明了该单子化搜索与穷举 minimax 搜索得到相同的最优结果与对局,为对抗性搜索的组合式方法提供了基础。
Alpha-Beta Pruning via Monadic Continuations
Alpha-beta pruning is a fundamental technique in game-playing AI, enabling efficient minimax search by avoiding the exploration of branches that cannot affect the optimal decision. We present a monadic formulation of alpha-beta pruning based on the combination of the continuation monad and the reader monad. Unlike previous approaches that encode alpha-beta bounds into the types of available moves, our construction records these bounds within monadic outcomes, leaving the move types unchanged. We further show that the ordinary continuation monad suffices to compute not only optimal outcomes but also optimal plays, by extending the outcome type to include the corresponding sequences of moves. This provides an alternative to generalisations of the continuation monad proposed to address the inefficiencies associated with the selection monad in alpha-beta search. We illustrate our approach with an implementation of Tic-Tac-Toe, observing a 39-fold reduction in the number of plays evaluated, compared with exhaustive search, in computing an optimal play. Finally, we formally establish the correctness of our construction by proving that the monadic alpha-beta search computes the same optimal outcomes and plays as exhaustive minimax search. Our results demonstrate how a foundational algorithm in AI can be expressed and verified using standard monadic abstractions, providing a basis for further development of compositional approaches to adversarial search.
本条情报归属 AITOP「论文」核心追踪栏目。涉及核心实体与技术议题包括:Alpha-Beta剪枝、continuation monad、minimax、Haskell,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始线索采编自「arXiv cs.AI」(@Martín Escardó, Paulo Oliva),经 AITOP 多维评分管线结构化提炼。