[论文解读] Solving Rubik's Cube Using SAT Solvers
本文首次成功将SAT求解器应用于鲁比克魔方的最优求解,采用一种新颖的SAT编码方法,通过双变量颜色表示和基于层的移动编码,将变量数从288减少至96。作者在PrecoSAT中引入一种ALO(至少一个)求解策略及子问题分解机制,使求解器能够在合理时间内找到长度为20的最优解,而无需依赖大型查表。
Rubik's Cube is an easily-understood puzzle, which is originally called the "magic cube". It is a well-known planning problem, which has been studied for a long time. Yet many simple properties remain unknown. This paper studies whether modern SAT solvers are applicable to this puzzle. To our best knowledge, we are the first to translate Rubik's Cube to a SAT problem. To reduce the number of variables and clauses needed for the encoding, we replace a naive approach of 6 Boolean variables to represent each color on each facelet with a new approach of 3 or 2 Boolean variables. In order to be able to solve quickly Rubik's Cube, we replace the direct encoding of 18 turns with the layer encoding of 18-subtype turns based on 6-type turns. To speed up the solving further, we encode some properties of two-phase algorithm as an additional constraint, and restrict some move sequences by adding some constraint clauses. Using only efficient encoding cannot solve this puzzle. For this reason, we improve the existing SAT solvers, and develop a new SAT solver based on PrecoSAT, though it is suited only for Rubik's Cube. The new SAT solver replaces the lookahead solving strategy with an ALO (\emph{at-least-one}) solving strategy, and decomposes the original problem into sub-problems. Each sub-problem is solved by PrecoSAT. The empirical results demonstrate both our SAT translation and new solving technique are efficient. Without the efficient SAT encoding and the new solving technique, Rubik's Cube will not be able to be solved still by any SAT solver. Using the improved SAT solver, we can find always a solution of length 20 in a reasonable time. Although our solver is slower than Kociemba's algorithm using lookup tables, but does not require a huge lookup table.
研究动机与目标
- 开发一种针对鲁比克魔方的高效SAT编码,该问题为经典规划问题,其最优解性质尚不明确。
- 克服标准SAT求解器在求解复杂状态转移谜题(如鲁比克魔方)时的局限性。
- 设计一种针对谜题结构的新型SAT求解策略,实现在无需大型查表的情况下找到最优解。
- 证明当结合问题特定优化时,SAT求解器能够求解如鲁比克魔方这类困难的组合谜题。
提出的方法
- 将每个贴纸的朴素6变量编码替换为2或3变量编码,将布尔变量数从288减少至96或144。
- 将18种移动类型基于层编码为6种基础转动类型,以减少子句数量并提升可扩展性。
- 在CNF公式中引入两阶段算法第一阶段的目标状态作为额外约束,以引导搜索。
- 实现一种新型ALO(至少一个)求解策略,基于AMO约束变量将问题分解为子问题。
- 通过基于AMO子句参与度的决策变量选择机制增强PrecoSAT,并独立求解子问题。
- 将两阶段算法的启发式信息集成到CNF编码中,以剪枝搜索空间。
实验结果
研究问题
- RQ1现代SAT求解器能否有效应用于求解鲁比克魔方这一著名规划问题,其状态空间复杂度极高?
- RQ2在鲁比克魔方表示中,最小化变量与子句数的最优SAT编码策略是什么?
- RQ3SAT求解器能否在不依赖大型查表或模式数据库的情况下找到最优解(长度为20)?
- RQ4如何将两阶段算法的结构编码为CNF以提升求解效率?
- RQ5混合SAT求解策略(如ALO结合子问题分解)是否能在该谜题上超越标准SAT求解?
主要发现
- 所提出的SAT编码将布尔变量数从288减少至96,显著降低问题规模。
- 基于PrecoSAT改进的SAT求解器(采用ALO策略与子问题分解)成功在合理时间内找到长度为20的最优解。
- 对于10个随机生成的魔方状态,求解器在7,000秒内找到长度≤20的解,部分解在100秒内完成。
- 当第一阶段长度已知时(如13步),求解器在310秒内找到最优20步解。
- 该方法仅需10 MB内存,相比查表方法展现出极低的内存占用。
- 尽管速度不及使用查表的Kociemba算法,但SAT方法避免了构建庞大预计算数据库的需求。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。