Description: 数独小游戏,纯JS手工编写,参考了国外的精典案例-Sudoku game, pure JS manual prepared with reference to the classical case of foreign Platform: |
Size: 32768 |
Author:1117444 |
Hits:
Description: 八数码问题(类似于华容道),是一个有益智力的小游戏,通过空白滑块的移动来将混乱的图案恢复到有序的状态
本代码的核心算法通过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文件中-Eight digital (similar Huarong), is a useful intellectual game by moving the slider to the blank will restore order to the chaotic state of the pattern of the core algorithm code written by fortran, after mapping function matlab visualization, eight digital solve any initial conditions automatically solving process 1, 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 error). 5. If you need to demonstrate again, you can c Platform: |
Size: 1559552 |
Author:曾克成 |
Hits: