Hashiwokakero问题的Benchmark算法和分支切割算法
Benchmark Instances and Branch-and-Cut Algorithm for the Hashiwokakero Puzzle
摘要:
Hashiwokakero,或简称为Hashi,是一款日本单人益智游戏,在没有标准尺寸的矩形网格上进行。网格的一些单元包含一个圆圈,称为岛,里面有一个从1到8的数字。网格的其余位置为空。玩家必须在所有岛屿之间画一系列水平或垂直的桥来连接它们,并遵守一系列规则:岛屿上的桥数等于圆圈中的数字,岛屿的任何一侧最多有两座桥,桥不能相互交叉或穿过岛屿,每个岛屿最终必须从任何其他岛屿到达。在本文中,我们提出了一些复杂性的结果和Hashi和著名的图论问题之间的关系。我们给出了一个整数线性数学规划模型的问题的制定,并应用分支和切割算法来解决模型中的连通性约束是动态生成的。我们还开发了一个谜题生成器。我们对1440个Hashi谜题的实验表明,该算法可以一致地解决多达400个岛屿的难题。
英文摘要:
Hashiwokakero, or simply Hashi, is a Japanese single-player puzzle played on a rectangular grid with no standard size. Some cells of the grid contain a circle, called island, with a number inside it ranging from one to eight. The remaining positions of the grid are empty. The player must connect all of the islands by drawing a series of horizontal or vertical bridges between them, respecting a series of rules: the number of bridges incident to an island equals the number indicated in the circle, at most two bridges are incident to any side of an island, bridges cannot cross each other or pass through islands, and each island must eventually be reachable from any other island. In this paper, we present some complexity results and relationships between Hashi and well-known graph theory problems. We give a formulation of the problem by means of an integer linear mathematical programming model, and apply a branch-and-cut algorithm to solve the model in which connectivity constraints are dynamically generated. We also develop a puzzle generator. Our experiments on 1440 Hashi puzzles show that the algorithm can consistently solve hard puzzles with up to 400 islands.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。