迷宫算法 (2017)
Maze Algorithms (2017)

原始链接: http://www.jamisbuck.org/mazes/

迷宫算法 如果你对迷宫算法感兴趣,我写了一本书关于这个主题:“程序员的迷宫”。请查看!这些演示的源代码在 http://github.com/jamis/csmazes 上免费提供。 阈值:小 中 大 这结合了Aldous-Broder和Wilson算法,以获得两者的最佳性能。不幸的是,它不能保证像其他两种算法一样均匀,但它更快!它运行Aldous-Broder,直到访问了最小数量的单元格,然后切换到Wilson算法。例如:random:50, newest:30, oldest:75, middle:100,或这些值的任何逗号分隔组合。你必须点击“重置”才能使迷宫识别你的更改。例如:random:50, newest:30, oldest:75, middle:100,或这些值的任何逗号分隔组合。

## 黑客新闻讨论:迷宫算法 最近的黑客新闻讨论强调了各种迷宫生成算法和资源。最初的帖子链接到一篇2017年关于迷宫算法的文章([https://tromp.github.io/maze.html](https://tromp.github.io/maze.html)),其中包含一个紧凑的C程序,用于生成迷宫,最初提交给国际混淆C代码竞赛(IOCCC)。 对话扩展到学习资源的推荐,特别是Jamis Buck的“程序员的迷宫”,以及与AI驱动的定制迷宫生成器相关的链接([https://kamens.com/blog/generating-custom-mazes-with-ai](https://kamens.com/blog/generating-custom-mazes-with-ai))。用户还分享了其他迷宫算法(Wilson算法、Kruskal算法、Eller算法、递归回溯法)以及过去几年黑客新闻中相关的讨论链接。 一个关键点是算法选择对迷宫“感觉”的影响——递归回溯法会产生蜿蜒的走廊,而Prim算法会生成更多的死胡同。讨论还涉及创建“困难”迷宫以及针对人类求解者与算法求解者优化的算法之间的差异。
相关文章

原文
Maze Algorithms

If you're interested in maze algorithms, I've written a book about the subject: "Mazes for Programmers". Check it out!

The source code for these demos is freely available at http://github.com/jamis/csmazes.








Threshold:




This combines Aldous-Broder and Wilson's, to get the best performance of both. Sadly, it is not guaranteed to be uniform like the other two, but it is faster! It runs Aldous-Broder until some minimum number of cells have been visited, and then switches to Wilson's.




E.g. random:50, newest:30, oldest:75, middle:100, or any comma-delimited combination of those.
You must click "reset" before the maze will recognize your changes.



E.g. random:50, newest:30, oldest:75, middle:100, or any comma-delimited combination of those.



联系我们 contact @ memedata.com