7 ms·
> It is a popular algorithm, especially because it's stateless, but it only works if the maze is simply connected, so a simple loop can cause it to fail. If we
by kd5bjo 6y ago
> It is a popular algorithm, especially because it's stateless, but it only works if the maze is simply connected, so a simple loop can cause it to fail.
If we’re talking about mazes where the entrance and exit are both on the perimeter wall, those points must be connected by that wall and the algorithm is guaranteed to be successful.
- OJFord 6y agoI think GP meant if there's an island in the middle, it won't work following that. But if you start from the entrance, it's fine.
- mcv 6y agoAlso, the exit or entrance shouldn't be on that island in the middle. Bridges/tunnels connecting different points will also mess it up. It's a good algorithm within some very specific constraints.
- kd5bjo 6y agoAll of those things are conveniently excluded by the architectural constraint of using live hegdes as the construction medium: the maze must be planar, and the entrance and exit need to be at the outside to allow access. You can have secondary desinations in the interior that aren’t reachable this way, though.
- Munksgaard 6y agoI'm not sure exactly what you're saying here, but if you're saying that the proposed algorithm will work for all mazes in RCT2, I think you're wrong: https://github.com/OpenRCT2/OpenRCT2/pull/12546#issuecomment-668370640 https://github.com/OpenRCT2/OpenRCT2/pull/12546#issuecomment...
- deleted 6y ago[deleted]
- viridian 6y agoThe hedge maze needn't be planar though, that's a faulty assumption. See Honey Pot Hill Orchard's hedge maze for a counterexample: https://www.honeypothill.com/ https://www.honeypothill.com/ The trick used in the github issue cited by the other reply is a similar idea, but the change in y axis value is applied to the exit rather than throughout the maze, via a tunnel from the center.
- OJFord 6y agoIf the entrance were, the exit necessarily would be too; so it would work. (The island would be a corner of the maze, you'd just walk in, then left/right (according to hand) and out.
- gpderetta 6y agothere is exactly an example of that in the github comment thread.
- peeters 6y agoHow does one get to the island by keeping one hand on a wall? Wouldn't an island just be equivalent to a big empty area?
- OJFord 6y agoAs I said 'if you start from the entrance, it's fine'. The comment up thread that I interpreted that way (it wasn't my own) was in reply to a comment that sounded like you could start anywhere (e.g. attempt the maze in the right spirit and then give up and put your hand on any wall), not just at the entrance.
- peeters 6y agoVery true and thanks for clarifying.