CaptainLuma / New-Maze-Generating-Algorithm

Check out this algorithm for maze generation I came up with.
MIT License
53 stars 4 forks source link

Different Maze Types Implementation #5

Open romandykyi opened 5 days ago

romandykyi commented 5 days ago

Hi, I'm the author of the Labyrinthian library, which specializes in step-by-step generation of various graph-based maze types (e.g., delta, theta, upsilon) using different algorithms. Recently, I integrated your Origin Shift algorithm into my library, and users can now visualize the generation process in this online demo.

In my implementation, I start by selecting a cell (random by default) and perform a BFS from it to create the initial spanning tree (perfect maze). Then, I apply n iterations (n = 10 * mazeCellsCount by default, as per your suggestion in your video).

Your algorithm has truly impressed me. Unlike other graph-based algorithms like Kruskal or Wilson that generate a random spanning tree from scratch, Origin Shift operates on an existing spanning tree and dynamically modifies it. I also find it particularly innovative that directed graphs can be utilized effectively for maze generation, I haven't encountered a similar approach before.

However, Origin Shift does have its limitations. Occasionally, it fails to fully traverse the graph, especially with Delta mazes, even with 10 * mazeCellsCount iterations: Triangular maze(size 50)

Despite this, I believe your algorithm has significant potential for enhancement or as a valuable secondary post-processing tool.

CaptainLuma commented 4 days ago

Hi Roman, thank you so much for taking interest in Origin Shift. The Labyrinthian library is really great! I love the idea of a site which catalogs all maze generating techniques and shows visual demo's for each, and I think the Labyrinthian is a wonderful execution of that idea. It is so cool to have my algorithm featured on there.

The problem of the algorithm not always traversing the whole grid is a problem that a few people have pointed out. I believe it has to do with my suggested iteration equation of "i = 10a" being inaccurate. I basically eyeballed the equation and only tested it out with smaller mazes. A more accurate equation could be found mathematically, though I am not really skilled enough in math to do this. But if I do discover a more accurate equation, then I will let you know.

Thank you again for adding Origin Shift to your site. It is an honor!

On Tue, 2 Jul 2024 at 16:35, Roman Dykyi @.***> wrote:

Hi, I'm the author of the Labyrinthian https://github.com/romandykyi/Labyrinthian library, which specializes in step-by-step generation of various graph-based maze types (e.g., delta, theta, upsilon) using different algorithms. Recently, I integrated your Origin Shift algorithm into my library, and users can now visualize the generation process in this online demo https://romandykyi.github.io/LabyrinthianDemo/.

In my implementation, I start by selecting a cell (random by default) and perform a BFS from it to create the initial spanning tree (perfect maze). Then, I apply n iterations (n = 10 * mazeCellsCount by default, as per your suggestion in your video).

Your algorithm has truly impressed me. Unlike other graph-based algorithms like Kruskal or Wilson that generate a random spanning tree from scratch, Origin Shift operates on an existing spanning tree and dynamically modifies it. I also find it particularly innovative that directed graphs can be utilized effectively for maze generation, I haven't encountered a similar approach before.

However, Origin Shift does have its limitations. Occasionally, it fails to fully traverse the graph, especially with Delta mazes, even with 10 * mazeCellsCount iterations: Triangular.maze.size.50.png (view on web) https://github.com/CaptainLuma/New-Maze-Generating-Algorithm/assets/94003504/01f862e3-866a-4b4f-8d48-5ee9455d3c95

Despite this, I believe your algorithm has significant potential for enhancement or as a valuable secondary post-processing tool.

— Reply to this email directly, view it on GitHub https://github.com/CaptainLuma/New-Maze-Generating-Algorithm/issues/5, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFK4FWSMDVUVAUPRKMC4GULZKMTLDAVCNFSM6AAAAABKIM6BRKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DOMRXGA3DIMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>