Live data from Hacker News

Maze Algorithms (1997)

astrolog.org

31–37 of 37 posts

Re: Maze Algorithms (1997)

#31
post #14

Earlier quoted context omitted.

Thanks! I haven't really shared it with many people yet - if you have any feedback I'd be happy to hear.

the controls feel extremely sensitive

Is... that a bad thing or a good thing? Are you saying the snowman should move slower? Are you using small or large screen, touch or keyboard?

Re: Maze Algorithms (1997)

#32
post #30

Earlier quoted context omitted.

So you only want dead ends to have loops? You might try computing the depth of each node, marking the solution, and then assigning each branch off of the solution a unique color. At that point knocking out walls only within the same color won't interfere with the solution. Alternatively you could take care to track depth and knock out walls between different colors only when the total resulting path length would be g…

Well, I don't have "walls" - my maze is sort of 2.5 dimensions - so that complicates things somewhat. I wonder whether there's an algorithm to "lift" a 2d maze with walls into my 2.5d maze, and I think if it's possible it's WFC or model synthesis. I will go try stuff, just haven't gotten around to it yet :)

You do have walls, they're just implicit. There obviously must be a way for someone looking at it to tell which directions they are permitted to move in.

Don't think of it as an image but rather as a graph of the passable tiles. You can render the nodes and vertices in various different ways.

Re: Maze Algorithms (1997)

#33
post #24

Earlier quoted context omitted.

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.

> 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)

Re: Maze Algorithms (1997)

#34
post #30

Earlier quoted context omitted.

Well, I don't have "walls" - my maze is sort of 2.5 dimensions - so that complicates things somewhat. I wonder whether there's an algorithm to "lift" a 2d maze with walls into my 2.5d maze, and I think if it's possible it's WFC or model synthesis. I will go try stuff, just haven't gotten around to it yet :)

You do have walls, they're just implicit. There obviously must be a way for someone looking at it to tell which directions they are permitted to move in. Don't think of it as an image but rather as a graph of the passable tiles. You can render the nodes and vertices in various different ways.

> You do have walls, they're just implicit.

Yes but not each constellation of walls can be lifted into the 2.5 dimensions: it's important that two neighboring flat cells which are separated be at different heights. Also I do not want the path to be occluded.

Re: Maze Algorithms (1997)

#35
post #7

Yes, this page is a good overview of the sorry state of maze generation. The maze-creating algorithms might be interesting for computer scientists, but they're terrible at creating mazes interesting for humans! First, I'm not sure "perfect maze" is a good requirement - well placed loops make mazes more interesting. Second, "uniform" is a useless metric: generating all mazes with equal probability leads to the mazes b…

Wow! I really enjoyed this.

The 2.5D rendering gives a lot of opportunities to visually obscure the insight that’s necessary to solve the maze. It makes me think that a good maze should have a “oh, duh” moment. There were a few times where the false assumption I had to resolve was very close to the starting point. Tricky stuff.

And you designed all of these by hand? That is very impressive. How many mazes are there? The way I would start automating some of this would be to build a catalog of these visually tricky blocks that require the player to resolve a false assumption. Then I think it would be a matter of stitching these together in novel ways. Maybe the stitching procedure can be implemented by expressing a constraint system and solving for a stitching that has the properties you want.

I’m on a touch screen and I would say that the movement is a little bit sensitive. Concretely this means I found myself… going in a direction I didn’t intend to. Maybe this is a skill issue on my part. I don’t have alternative controls to suggest and I probably don’t understand the mechanics of the movement enough to even suggest which parameters to tweak.

Again, great work.

Re: Maze Algorithms (1997)

#36
Some interesting stuff I wasn't familiar with, thanks.

I really like the book Mazes for Programmers by Jamis Buck [1].

Also, my open source Dungeon generator is a (slightly-misnamed) maze generator [2]. It produces 2D maps, and also 3D files (OBJ and MTL) for use in Blender etc. I like to think it does a more 'reasonable' job than many, but I am biased.

- [1] http://www.mazesforprogrammers.com

- [2] https://github.com/kcartlidge/Dungeon

Re: Maze Algorithms (1997)

#37
post #35
post #7

Yes, this page is a good overview of the sorry state of maze generation. The maze-creating algorithms might be interesting for computer scientists, but they're terrible at creating mazes interesting for humans! First, I'm not sure "perfect maze" is a good requirement - well placed loops make mazes more interesting. Second, "uniform" is a useless metric: generating all mazes with equal probability leads to the mazes b…

Wow! I really enjoyed this. The 2.5D rendering gives a lot of opportunities to visually obscure the insight that’s necessary to solve the maze. It makes me think that a good maze should have a “oh, duh” moment. There were a few times where the false assumption I had to resolve was very close to the starting point. Tricky stuff. And you designed all of these by hand? That is very impressive. How many mazes are there?…

Thanks! I keep creating new mazes by hand, right now I'm at 45 and the goal is 60, plan is that then the game is finished :)

Initially, I wanted to create a maze generator. But I had no idea how to write it. Creating mazes by hand, I'm slowly learning how to make them work (I've gotten waaay better than I was at the beginning). So, perhaps in the future, a maze generator that generates a daily maze seeded by the current date. Idea is to start with a simple maze every Monday and gradually increase the difficulty over the week. But I'm getting a little carried away: the more I think about it, the more I don't know how to create the maze generator.

FWIW, it's MIT licensed and available here: https://github.com/tasuki/iso-maze

Wrt sensitive controls: not sure which version you played, but I just reworked the controls a whole lot to automove to the next junction when you stop touching. It took my LLM and me a lot of time, mostly because I was searching in the dark, not entirely sure what I wanted. The controls are by far the least legible part of the codebase for me!

Post reply on HN