> Infinite length Mazes: It's possible to create an infinitely long Maze (a finite number of columns by as many rows as you like) by only keeping part of the Maze in memory at a time and "scrolling" from one end to the other, discarding earlier rows while creating later rows.
> An easier way to make an infinite Maze is with Eller's or the Sidewinder algorithms, as they already make Mazes one row at time, so simply keep letting them add rows to the Maze forever.
Great idea. However it is infinite in one direction. Could be made infinite in two directions (I guess) by extending along a diagonal line that get long with each step. Probably could also make it infinite in all directions with a square that gets extended with each step. However, that would mean that if one walks away from the origin, the maze has to be generated in all directions. For practical applications it would be nice to only generate the part of the maze that is 'visible' from a certain point of view (either from the top or while walking inside the maze up to a certain distance).
It's not really what you asked but the article does mention infinite recursive mazes in the fractal section and you might be able to do interesting transformations on those to make them more interesting for your purpose (such as block off obvious paths to force the player to venture further)
What would it mean for a maze to be infinite? It seems to me that a key part of the concept is having a goal to reach.
Although I guess you could have an infinitely large map and an algorithm that guaranteed connectivity. Infinite ways to fail to reach the goal. But I doubt there would be much practical benefit.
To actually answer your question it should be fairly easy to convert nearly any existing algorithm to cover an infinite area by simply tiling it. A common method to avoid boundary issues is to overlap the tiles slightly.
I've always had a dream of creating an infinite braid maze algorithm:
The requirements I've come up with are:
1. Distribution of path length for any two points of a fixed taxicab distance should be some kind of long-tail distribution.
2. In general, the path between any two nearby points should often stray far outside the smallest box that contains both of those two points. Of course, this won't apply to nearby points in the same corridor. I'm not sure how best to state this formally.
3. It should be possible to calculate the exits for any cell in O(log(N)) time where N = abs(sum of the coordinates).
And the most hazy requirement of all: the maze should look decent.
I'm looking for such an algorithm, with intermediate goals: you start at the bottom, go up, and as you reach the goal, more maze appears. I left out some unimportant details :)
I maze that grows in one direction can be generated with Eller's or the Sidewinder algorithms (as also mentioned by the user John Tromp in one of the other replies).
Please explain how to deal with slightly overlapping tiles and still create a maze that has no cycles and locations that cannot be reached from any other location. These are properties that go tiles.
I do know of an algorithm with 'nesting' that generate mazes but results in very long walls and thus does not feel random.
I'm not sure how to address that within the scope of an HN comment (and I don't think I have the time). To start with the problem is severely underspecified.
What do you mean by "infinity" exactly? 2^64? 2^128? Any arbitrary bigint? Periodic boundary condition?
Why perfect mazes - does that really matter? Are these supposed to be human solvable or is this some sort of abstract art? Anything human solvable requires at least one path of (very) finite length from start to finish.
Overlapping tiles and doing nothing else produces multiple paths. It's the quick and easy solution if the goal is practicality of implementation and human oriented puzzles.
If you insist on a perfect maze an obvious solution is 2^64, a periodic boundary condition, and a space partitioning tree with many children per node (ie n >>> 2). Connectivity is determined at each level. Long uniform walls can be reduced or even eliminated by warping block boundaries in various ways; among other things, you could potentially use the maze solution at each level to assign node membership for the next level.
I'd probably go with something like the wave function collapse algorithm. It should be possible to make it generate trees with somewhat uniform probability.
Interesting idea, but the problem is that being connected and being non-cyclic (properties you want for a perfect maze where you can reach every location and where there is exactly one route between every two locations) are global conditions that are difficult to implement with function collapse algorithm that are local.
I think being connected is easy enough, being non-cyclic is trickier I suppose. If you do it badly the shape of the maze is going to depend on the order it's generated in. I imagine some people may have looked into it.
> being connected and being non-cyclic (properties you want for a perfect maze where you can reach every location and where there is exactly one route between every two locations)
Connected, sure, that's table stakes. But why is being non-cyclic a desirable property? (Other than it being the definition of "perfect maze", a term I've come to despise)
If one could prove that human like consciousness can be reproduced by electronic components (probably not possible), it means there is nothing 'super natural' about it and that humans should have the same rights as these kind of machines.
I think Frank Herbert was not interested in how the Jihad could work out, but just used it in his plot. The science in Dune does not work. (One example are the stillsuits.) He is not a 'hard' S.F. author, but more of a political and psychology author. It is that what makes this story stand out.
We are returning to the pre WW2 world order and it is not due to some influential 'prophets' and leaders, but because history teaches us that we do not learn from history. The relative peace we experienced in the past 80 years was a response to WW2. Maybe only after another WW will there be a time of peace, of World Order again.
I use my own editor too. I modified an existing editor to my own needs. But I do use VSC as well for multi file projects. My editor can load images as well and has a scripting language to manipulate images. I primarily use it to edit my website, which is a static website in bare HTML. It also has some 'browser' functions in the sense that F5 opens a link including jumping to an anker if there is one in the link. It does have colour coding for HTML that also checks for matching tags.
The Dutch zipcode and the house number are unique. So, to mail something to the Netherlands anywhere from the world, it is enough to write something like: NL 1072CT 4.
Germany is one of the most pro-Israel countries and known for using excessive police voilance against pro-Palestina protestors and strongly denies that there is a genocide going on in Gaza.
In the past years, I developed a forth like language as an intermediate language for a C compiler. For debuging purposes, I also implemented a memory safe interpreter, besides a compiler that generates assembly output.
See my profile for link to my github repositories and look under MES-replacement for stack_c
reply