arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.20138cs.AI
收藏

极小极大算法的正式验证

Formal Verification of Minimax Algorithms

Eindhoven University of Technology(埃因霍温理工大学)

Wieger Wesselink, Kees Huizing, Huub van de Wetering

AI总结:

本文通过Dafny系统验证了极小极大搜索算法,包括alpha-beta剪枝和转位置表的变种,提出基于见证的正确性准则,并通过机械证明和反例展示验证结果。

摘要:

基于alpha-beta剪枝和转位置表的极小极大搜索算法是经典游戏引擎的核心组件,广泛应用于实践中。尽管使用广泛,这些算法复杂、高度优化且难以推理,使测试难以发现非显性错误。使用Dafny验证系统,我们正式验证了多种极小极大搜索算法,包括带有alpha-beta剪枝和转位置表的变种。对于有限深度搜索与转位置表,我们引入基于见证的正确性准则,以捕捉返回值是否可通过显式游戏树扩展来证明。我们将此准则应用于两种实际的有限深度negamax变种:对于一种变种,我们获得完全机械化的正确性证明;而对于另一种变种,我们构建了一个具体的反例,展示其违反所提出的正确性观念。所有验证成果,包括Dafny证明和可执行的Python实现,均已公开。

英文摘要:

Minimax-based search algorithms with alpha-beta pruning and transposition tables are a central component of classical game-playing engines and remain widely used in practice. Despite their widespread use, these algorithms are subtle, highly optimized, and notoriously difficult to reason about, making non-obvious errors hard to detect by testing alone. Using the Dafny verification system, we formally verify a range of minimax search algorithms, including variants with alpha-beta pruning and transposition tables. For depth-limited search with transposition tables, we introduce a witness-based correctness criterion that captures when returned values can be justified by an explicit game-tree expansion. We apply this criterion to two practical variants of depth-limited negamax with alpha-beta pruning and transposition tables: for one variant, we obtain a fully mechanized correctness proof, while for the other we construct a concrete counterexample demonstrating a violation of the proposed correctness notion. All verification artifacts, including Dafny proofs and executable Python implementations, are publicly available.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑