News for hackers. Stuff that matters.
Re:A ride that takes 10^20k years to complete in Roller Coas... by SwiftyBug on Monday August 03, 2020 @04:50PM (#24043236)
Re:A ride that takes 10^20k years to complete in Roller Coas... by 9nGQluzmnq3M on Monday August 03, 2020 @11:01PM (#24046100)
And this comment both explains why it's the way it is, and proposes an improvement:

For solving mazes, here's the most popular algorithm:

Touch the wall or hedge with the hand nearest to it, left or right. Keep that same hand touching the wall and keep walking. This may take you on a horribly long route, but it will eventually get you out.

[...]

Rather than doing complete randomness when choosing directions, I think it would be actually better to assign an strategy for each player (once they enter the attraction), setting their default direction to "always clockwise" (as it was before this PR) or "always counter-clockwise".

https://github.com/OpenRCT2/OpenRCT2/pull/12546#issuecomment...

Re:A ride that takes 10^20k years to complete in Roller Coas... by ben509 on Monday August 03, 2020 @11:43PM (#24046330)
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.

A simple mechanism that would also make it more interesting would be for wall following to flip handedness at random intervals. That is, the guest would start off by following the wall with his left hand, and then after some random number of steps, start following with his right hand.

Re:A ride that takes 10^20k years to complete in Roller Coas... by kd5bjo on Tuesday August 04, 2020 @02:30AM (#24047261)
> 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.

Re:A ride that takes 10^20k years to complete in Roller Coas... by OJFord on Tuesday August 04, 2020 @03:07AM (#24047466)
I 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.
Re:A ride that takes 10^20k years to complete in Roller Coas... by mcv on Tuesday August 04, 2020 @08:58AM (#24049455)
Also, 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.

Re:A ride that takes 10^20k years to complete in Roller Coas... by kd5bjo on Tuesday August 04, 2020 @09:11AM (#24049580)
All 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.
Re:A ride that takes 10^20k years to complete in Roller Coas... by viridian on Tuesday August 04, 2020 @11:04AM (#24050685)
The 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/

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.

Re:A ride that takes 10^20k years to complete in Roller Coas... by Munksgaard on Tuesday August 04, 2020 @10:18AM (#24050211)
I'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...
Re:A ride that takes 10^20k years to complete in Roller Coas... by OJFord on Tuesday August 04, 2020 @11:54AM (#24051177)
If 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.
Re:A ride that takes 10^20k years to complete in Roller Coas... by peeters on Tuesday August 04, 2020 @10:29AM (#24050323)
How 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?
Re:A ride that takes 10^20k years to complete in Roller Coas... by OJFord on Tuesday August 04, 2020 @11:16AM (#24050793)
As 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.
Re:A ride that takes 10^20k years to complete in Roller Coas... by peeters on Tuesday August 04, 2020 @02:21PM (#24052924)
Very true and thanks for clarifying.
Re:A ride that takes 10^20k years to complete in Roller Coas... by gpderetta on Tuesday August 04, 2020 @09:46AM (#24049875)
there is exactly an example of that in the github comment thread.
Re:A ride that takes 10^20k years to complete in Roller Coas... by liendolucas on Tuesday August 04, 2020 @12:46AM (#24046694)
I remember when I was a kid and going to my dad's office. They had Wolfenstein 3D installed and that would keep me occupied for the rest of the day. I remember my dad coming one occasion and exactly telling me that to make any progress if I was lost or blocked in one of the mazes.
Re:A ride that takes 10^20k years to complete in Roller Coas... by tapland on Tuesday August 04, 2020 @03:13AM (#24047498)
That would make guests follow some very strict paths, which would be much less realistic and would severely hamper any regular gameplay.
Re:A ride that takes 10^20k years to complete in Roller Coas... by Causality1 on Monday August 03, 2020 @11:47PM (#24046356)
That's a trope I always find irritating because it only applies to one type of maze: those where there are no freestanding paths, walls, or barriers.
Re:A ride that takes 10^20k years to complete in Roller Coas... by matsemann on Tuesday August 04, 2020 @04:47AM (#24047959)
I think it still will work in those cases, as long as both entrance and exit is at the perimeter wall? And that it's the placements of those that determines if left-touching is a viable option. For instance, it doesn't matter if it there's a freestanding wall/loop, as one wouldn't reach that anyway.
Re:A ride that takes 10^20k years to complete in Roller Coas... by 9nGQluzmnq3M on Monday August 03, 2020 @11:58PM (#24046421)
Canonical hedge mazes, like the ones in the games, typically don't have any of those.

FWIW, I taught my kids to use "right-following" when exploring caves in Minecraft, and it works pretty even though its randomly generated "mazes" (caves) can and do loop in on each other etc.

Re:A ride that takes 10^20k years to complete in Roller Coas... by c17r on Tuesday August 04, 2020 @03:10PM (#24053414)
My Minecraft cave process was "torches to the right on the way in" so it's easy to backtrack
Re:A ride that takes 10^20k years to complete in Roller Coas... by hwc on Wednesday August 05, 2020 @12:36PM (#24062713)
This is why I always design 3-dimensional mazes.
Re:A ride that takes 10^20k years to complete in Roller Coas... by infogulch on Monday August 03, 2020 @05:18PM (#24043585)
It's always so wholesome when devs interact positively with 'exploit hunter' types. I wonder why it feels like that.
Re:A ride that takes 10^20k years to complete in Roller Coas... by spanhandler on Monday August 03, 2020 @10:41PM (#24045989)
Probably something to do with the "status games" definition of friendship from Impro. Friendly ribbing in a faux-antagonistic relationship may also come off as really healthy-looking, comfortable, and pleasant, for similar reasons, namely that you can't do that safely with people you aren't on good and (at least in some confined sense) equal terms with. So from the outside it's like vicariously being part of the everyday intimacy of a friendship.
Re:A ride that takes 10^20k years to complete in Roller Coas... by infogulch on Tuesday August 04, 2020 @12:48AM (#24046699)
I like this perspective. It acknowledges that they are equal at least in that they both care about the game and express that by paying attention to all of its detail, even small defects.
Re:A ride that takes 10^20k years to complete in Roller Coas... by fsniper on Tuesday August 04, 2020 @03:20AM (#24047533)
Maybe because "exploit hunter" types are in fact doing QA for the developer?
Re:A ride that takes 10^20k years to complete in Roller Coas... by jansan on Monday August 03, 2020 @05:05PM (#24043414)
It actually is funny.
Re:A ride that takes 10^20k years to complete in Roller Coas... by SwiftyBug on Tuesday August 04, 2020 @08:02AM (#24049083)
Indeed!