研究高维滑动拼图的最优解法,对比三种算法在不同维度下的表现。
Approximately Optimal Search on a Higher-dimensional Sliding Puzzle
- 提出A*、进化算法和强化学习三种求解方法
- 三维拼图可解,四维五维下强化学习与进化算法中位数少于30步
- 进化算法速度最快,但难以最小化移动次数
高维滑动拼图构建在d维超立方体的顶点上,其中有2^d - l个顶点被赋予不同颜色的环。这些同色环最初随机分布在超立方体顶点上。目标是将每个环移动到预设的目标顶点。k-规则约束是对边碰撞的推广,仅当包含某环的k维面完全无其他环时才允许移动。初始配置下,使环颜色匹配顶点颜色所需的最少移动次数称为“上帝算法”。该算法在15-拼图(对应k=1)情况下不具有多项式时间复杂度。本文对高维拼图的不同场景进行了全面计算研究,对比了三种技术:精确算法(A*搜索)、近似最优搜索(进化算法和强化学习)。实验表明,三者均可成功解决三维拼图,在不同面维度和难度下表现良好。维度增加后,A*失效,而强化学习与进化算法仍能提供合理解,即移动次数分布中位数小于30。总体上,进化算法计算时间最短,但在d=4和d=5维度下大多未能最小化移动次数。
原文摘要 · Abstract (English)
Higher-dimensional sliding puzzles are constructed on the vertices of a $d$-dimensional hypercube, where $2^d-l$ vertices are distinctly coloured. Rings with the same colours are initially set randomly on the vertices of the hypercube. The goal of the puzzle is to move each of the $2^d-l$ rings to pre-defined target vertices on the cube. In this setting, the $k$-rule constraint represents a generalisation of edge collision for the movement of colours between vertices, allowing movement only when a hypercube face of dimension $k$ containing a ring is completely free of other rings. Starting from an initial configuration, what is the minimum number of moves needed to make ring colours match the vertex colours? An algorithm that provides us with such a number is called God's algorithm. When such an algorithm exists, it does not have a polynomial time complexity, at least in the case of the 15-puzzle corresponding to $k=1$ in the cubical puzzle. This paper presents a comprehensive computational study of different scenarios of the higher-dimensional puzzle. A benchmark of three computational techniques, an exact algorithm (the A* search) and two approximately optimal search techniques (an evolutionary algorithm (EA) and reinforcement learning (RL)) is presented in this work. The experiments show that all three methods can successfully solve the puzzle of dimension three for different face dimensions and across various difficulty levels. When the dimension increases, the A* search fails, and RL and EA methods can still provide a generally acceptable solution, i.e. a distribution of a number of moves with a median value of less than $30$. Overall, the EA method consistently requires less computational time, while failing in most cases to minimise the number of moves for the puzzle dimensions $d=4$ and $d=5$.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。