魔方按层求解算法设计
Flowchart Design of Layer-by-Layer Method for Rubik’s Cube
DOI: 10.12677/CSA.2019.92045, PDF,   
作者: 刘润川*:西安电子科技大学附中,陕西 西安
关键词: 魔方层次法流程图数学模型Rubik’s Cube Layer Method Flow Chart Mathematical Model
摘要: 手动求解魔方方法很多,分层方法、棱方法、桥式方法、角方法、CFOOP方法、CFOP方法、笑面虎方法。计算机复原魔方的穷举搜索法要求获知魔方的所有状态,计算量巨大,算法效率低。本文研究了计算机复原三阶魔方的按层求解算法,首先建立数学模型,对魔方进行分层、判断继而用循环模式复原每一层方块;在此基础上设计了每一层复原算法的流程图,图例演示结果说明本文算法是可行的。
Abstract: There are many methods to solve Rubik’s cube manually, such as layered method, edge method, bridge method, angle method, CFOOP method, CFOP method, and smiling face tiger method. The exhaustive search method for computer restoring Rubik’s Cube requires calculating all states of Rubik’s cube. The computational load is huge and the method’s efficiency is low. In this paper, a layer-by-layer algorithm for computer restoration of third-order Rubik’s cube is studied. First, a mathematical model is established; second, Rubik’s Cube is judged hierarchically, and then squares of each layer are restored by cyclic mode. On this basis, the flowchart for restoring each layer of Rubik’s cube is designed. The simulation results prove the feasibility of the method.
文章引用:刘润川. 魔方按层求解算法设计[J]. 计算机科学与应用, 2019, 9(2): 406-413. https://doi.org/10.12677/CSA.2019.92045

参考文献

[1] 魔方[EB/OL].
https://baike.baidu.com/item/魔方/5275, 2018-11-07.
[2] 郝航行. 基于OpenGL的魔方游戏的设计与实现[D]: [学士学位论文]. 西安:西安理工大学, 2012.
[3] CFOP [EB/OL].
https://baike.baidu.com/item/CFOP/10504857, 2018-11-08.
[4] 孟坤, 王俊, 闫桐. 一种基于经验知识的军旗博弈算法设计与实现[J]. 智能计算机与应用, 2017, 7(2): 66-69.
[5] 层先法[EB/OL].
https://baike.baidu.com/item/层先法/5233102, 2018-11-07.
[6] 盛庆华, 杜永均, 罗飞, 李辰龙, 何凯. 基于STM32机械臂解魔方算法研究[J]. 实验室研究与探索, 2017, 36(4): 20-32.
[7] 李泽萱, 滕旭阳, 郑艺彬, 唐日成, 徐欢潇. 基于Arduino的两臂解魔方机器人——算法设计[J]. 电脑知识与技术, 2018, 14(17): 254-256.