摘要
本文在前人对华容道、孔明棋、九宫拼图问题求解算法研究的基础上,针对这些经典智力问题的特点,利用广度优先和深度优先搜索思路设计算法,并对算法进行搜索减枝优化,设计出了一个相对优化的算法。对于开窗问题,本文通过对该问题规则的分析,设计出了一种效率较高的求解算法。通过使用C#语言编写程序实现算法以及软件的求解功能,经测试与运行证实了本文求解算法的正确性和有效性,并给出了算法的核心C#代码。
Based on the predecessors' researches of solving algorithm to games,such as RoomEscape,Peg solitaire and Jiugong puzzles,according to the characteristics of the classic intelligence issues,this article,using the ideas of breadth first algorithm and depth first algorithm to design an algorithm,optimizing the algorithm by search pruning,designed a more optimizied algorithm.For fenestration problem,based on the analysis of this problem rules,this article designed a kind of high efficiency solving algorithm.By programming with c # language to realize this algorithm and the functions of this software,after testing and operating,the correctness and effectiveness of the solving algorithm in this paper are confirmed,and the core c # codes of the algorithm are given.
出处
《科技创新导报》
2011年第26期2-6,共5页
Science and Technology Innovation Herald
关键词
搜索算法
华容道
孔明棋
开窗游戏
九宫图
程序设计
search algorithm
RoomEscape
Peg solitaire
fenestration game
Jiugong puzzles
program design