文件名称:2006081223131713066
- 所属分类:
- C#编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2008-10-13
- 文件大小:
- 13.86kb
- 下载次数:
- 0次
- 提 供 者:
- Xi ***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
迷宫地图的生成也有很多种方法,但是有些算法在生成较大维度时的计算速度很慢,尤其是如果用在电子词典之类上可能很成问题的。还有一个较大的问题就是很多算法生成的迷宫并不是真正意义上的迷宫,即路径不唯一。
用离散数学的集合观点来生成一个迷宫。
首先是M*N的一个矩阵,生成为M*N个集合,然后每次循环就合并一个集合,这样在M*N-1次合并之后就成了一个集合,也就是这M*N个元素连通了。算法首先得问题的是选择哪个元素来合并,我在这里是随机选择相邻集合。算法的关键是要记录合并的次序,否则你最后得到的只是一个M*N的集合而已。
再次由于是用集合生成的迷宫,在用程序自动生成任意两点的路径时就更为方便了-generated maps of the maze are also many ways, But some algorithm for generating larger dimension in the calculation speed is very slow, particularly if used in electronic dictionaries may like very problematic. There is a larger problem is that many of our method is not the real meaning of the maze of maze that is not the only path. Discrete Mathematics with a collection of viewpoints to generate a maze. First M * N is a matrix of Health as M * N pools, and then each cycle a pool on the merger, Thus, M * N-1 after the merger became a pool, which is M * N elements linked. Algorithm in the first issue is to choose which elements of the merger, I was here in the adjacent random selection pool. Algorithm, the key is to record the merger order, or else you get is the last one M * N pool only.
用离散数学的集合观点来生成一个迷宫。
首先是M*N的一个矩阵,生成为M*N个集合,然后每次循环就合并一个集合,这样在M*N-1次合并之后就成了一个集合,也就是这M*N个元素连通了。算法首先得问题的是选择哪个元素来合并,我在这里是随机选择相邻集合。算法的关键是要记录合并的次序,否则你最后得到的只是一个M*N的集合而已。
再次由于是用集合生成的迷宫,在用程序自动生成任意两点的路径时就更为方便了-generated maps of the maze are also many ways, But some algorithm for generating larger dimension in the calculation speed is very slow, particularly if used in electronic dictionaries may like very problematic. There is a larger problem is that many of our method is not the real meaning of the maze of maze that is not the only path. Discrete Mathematics with a collection of viewpoints to generate a maze. First M * N is a matrix of Health as M * N pools, and then each cycle a pool on the merger, Thus, M * N-1 after the merger became a pool, which is M * N elements linked. Algorithm in the first issue is to choose which elements of the merger, I was here in the adjacent random selection pool. Algorithm, the key is to record the merger order, or else you get is the last one M * N pool only.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 595643672006081223131713066.rar 列表 Migong Migong\bin Migong\bin\Debug Migong\bin\Release Migong\Drawing.cs Migong\Form1.cs Migong\Form1.Designer.cs Migong\Form1.resx Migong\Migong.cs Migong\Migong.csproj Migong\obj Migong\obj\Debug Migong\obj\Migong.csproj.FileList.txt Migong\obj\Release Migong\Program.cs Migong\Properties Migong\Properties\AssemblyInfo.cs Migong\Properties\Resources.Designer.cs Migong\Properties\Resources.resx Migong\Properties\Settings.Designer.cs Migong\Properties\Settings.settings Migong\SearchPath.cs