九宫格的八数码问题自动求解模拟我要分享

Sudoko eight digital automatic simulation

fortran 九宫 自动 模拟 求解 问题 数码

关注次数: 257

下载次数: 2

文件大小: 1.49 MB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:八数码问题(类似于华容道),是一个有益智力的小游戏,通过空白滑块的移动来将混乱的图案恢复到有序的状态本代码的核心算法通过fortran编写,经过matlab的制图功能进行可视化,解决了任意初始条件下的八数码问题的自动求解过程1、matlab的exe文件在matlab文件夹中,点击打开之后出现gui图形化界面。2、点击start按钮,程序会随机生成一个初始状态,并判断是否可解(solvable按钮显示YES即可解,NO即不可解)。3、可解的话点击go按钮,程序开始自动运行,每0.5s运行一步,演示解的过程,完成之后会显示操作步数。4、不可解的话重新点击start按钮,生成新的初始状态(如果此时强行点击go按钮的话会显示程序错误)。5、如果需要再次演示,可以点击redo按钮。6、除此之外,点击timecost按钮,会显示fortran程序的运行时间。7、fortran文件夹中包括的是大赛之前第一次提交的fortran文件,程序的注释都在其中,可以参照。8、matlab文件夹中的sourcecode文件夹中包括的是matlab所调用的fortran程序exe文件的源代码,由于各种原因,其中没有注释,还请见谅。9、具体的移动情况(测试算例)保存在matlab文件夹的object.txt文件中


English Description:

Eight digital (similar Huarong), is a useful intellectual game by moving the slider to the blank will restore order to the chaotic pattern of stateThe core algorithm code written by fortran, after mapping function matlab visualization, automatic solution to solve any problem of initial conditions, eight digital process1, matlab matlab exe file in the folder, gui graphical interface appears after clicking Open.2. Click on the start button, the program will generate a random initial state, and determine whether the solvability (solvable solution button to display YES, NO that is unsolvable).3, then click on the go button solvable, the program starts running automatically run every step of 0.5s, the operation step number will be displayed during the demonstration solution, is completed.4, unsolvable, then re-click the start button to generate a new initial state (if at this time if forced to click on the go button will display program


代码预览