question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

More complex maze generation by circular implementation of the grid

See original GitHub issue

It would be great if a circular maze, which is usually more complex to be comprehended by the human mind, could be implemented using the algorithm that is already here. What I have in mind is the following cell structure: grid 2

The design above is not geometrically optimal but could be implemented the following way:

  • The rows can be represented as a set of concentric circles and columns seperated by lines between two circles.
  • The key difference would be that columns will be looped i.e., the last column will be connected to the first column
  • In order to maintain an even distribution in the size of the cell, I recommend doubling the number of columns for every row without which there would be an exponential increase in cell size with increase in number of rows. This would greatly add to the complexity and at the same time maintain the cell size. -That would imply, only the rows (number of circles) will be given as input and the number of columns would be : pow(2,rows+2) -The condition for a cell to be start/exit would be row = num_rows-1

I have implemented the above condition but I am yet to commit the changes as visualizing this in matplotlib is not as simple as doing that for a grid. The following is a manual visualization from the raw outputs of generate_maze.

c_maze

Please do let me know if you’re more interested in this and have ideas about visualzing this implementation in matplotlib

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jostbrcommented, Feb 10, 2018

Okay, yeah, I see what you mean. Might need a little restructure nefore it should be merged withmaster. Reverted the pull request now.

0reactions
ThomasThelencommented, Feb 10, 2018

See my comments on the commit; with the way things are currently done, adding new features is going to be difficult. Can we un do the merge? We should either create a new branch under dev and put this there, or once some changes are made do a pull request to the dev branch

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maze generations: Algorithms and Visualizations. - H.urna
We will first have an overview of the maze world, we will then explore 6 different strategies and algorithms to generate random mazes;...
Read more >
Maze generation algorithm - Wikipedia
Maze generation algorithms are automated methods for the creation of mazes. This maze generated by modified version of Prim's algorithm, below.
Read more >
Maze Generation: Growing Tree algorithm - The Buckblog
Implementation -wise, this is one of the simplest algorithms (another reason to love it!). In fact, in my own implementation, the most complex...
Read more >
Vortex Maze Construction - University of Waterloo
We join vortices into networks, leading to mazes that are difficult to solve. We also show some results generated with our techniques. 1....
Read more >
maze generator — Blog
Comparison of the even MORE online maze generation websites ... Starting in the top left corner a simple 20x20 maze, a hexagonal grid...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found