文件名称:maze-game
-
所属分类:
- 标签属性:
- 上传时间:2014-12-16
-
文件大小:1.42kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
迷宫问题的求解过程可以采用回溯法即在一定的约束条件下试探地搜索前进,若前进中受阻,则及时回头纠正错误另择通路继续搜索的方法。从入口出发,按某一方向向前探索,若能走通,即某处可达,则到达新点,否则探索下一个方向;若所有的方向均没有通路,则沿原路返回前一点,换下一个方向再继续试探,直到所有可能的道路都探索到,或找到一条通路,或无路可走又返回入口点。在求解过程中,为了保证在达到某一个点后不能向前继续行走时,能正确返回前一个以便从下一个方向向前试探,则需要在试探过程中保存所能够达到的每个点的下标以及该点前进的方向,当找到出口时试探过程就结束了-Maze problem solving process can be used backtracking that under certain constraints exploratory search forward, if the advance is blocked, then go back in time to correct the errors continue to choose another path searching method. Starting the entrance, according to a forward direction to explore, if go through, that somewhere up, the new point is reached, otherwise explore the next direction if all directions are no paths, then a little before returning along the same route, replaced in one direction and then continue to test until all possible roads to explore, or find a path, or no way out but to return the entry point. Under the former in the solution process, when you can not move forward in order to ensure continued walking after reaching a certain point, in order to be able to return to the correct one the next tentative forward direction, you need to save in the test process of each point can be achieved scale and direction of the point forward, when the temptation to find
(系统自动生成,下载前可以参看下载内容)
下载文件列表
勇闯迷宫游戏.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.