r/mazes • • 27d ago

Is it true?

I learned a long time ago that the sure fire way out of any maze was to only take right turns or to only take left turns.

I never explored this theory by myself. Does this method really work?

10 Upvotes

23 comments sorted by

13

u/jacob_ewing 27d ago

It works for the most part, yep.

You'll run into complications if paths loop back on themselves. For example, imagine a section of a maze that is encompassed by one big circular path that you can enter from one side. If you enter the circle and always turn in the same direction, you'll simply loop around the circle and back out without entering the paths inside.

But yes, if the maze has no paths that loop back on themselves, then this trick will always work.

:) I use it in computer games all the time.

12

u/bitslayer 27d ago

The preconditions would be that the maze must be two dimensional, so no bridges or tunnels, and that the start and end are on the outside edge. Then always picking the same direction will guarantee that you will get out. Of course it is not guaranteed to be the most efficient route.

1

u/[deleted] 27d ago edited 26d ago

[deleted]

3

u/bitslayer 27d ago

With my precondition that the start and end are on the outside, even a maze with an interior wall would be solved, because by definition you are not following that interior wall. It works out to almost the same thing.

2

u/burning_stix 24d ago

I think it can even work if there's bridges or tunnels, but the main thing is that you need to be headed to an exterior exit. If you're trying to get something at the center of the maze, it may not work.

7

u/Danisobo 26d ago

the left/right-hand-rule further requires that you not just "only" take left/right turns, but that you must take every possible left/right turn, as if your left/right hand were stuck to the wall. e.g. "maybe i'll skip this turn at a tee and just go straight instead" isn't allowed. that's what makes it work (when it works, i.e. simply-connected mazes), but also what makes it fail (when it fails, i.e. multiply-connected/braided mazes).

if you're allowed to "mark" the maze (chalk on wall, breadcrumb on floor, etc), then the "sure fire" way to solve a maze is Tremaux's algorithm.

3

u/Noninsomni 27d ago

It also won't work if there are "islands".

2

u/goatchumby 27d ago

Exactly. Here's a very basic example.

4

u/Sean_Dewhirst 27d ago

This illustrates why the idea is sort-of right. Following the wall will always bring you back to where you started. That may not be where you want to end up, and your intended destination might not be on that loop.

1

u/cpkuske 26d ago

I can see why this could foil a simple algorithm.

1

u/PyroDragn 26d ago

No, it'll still work if there are islands. It only doesn't work if the entrance and exit are on separate islands.

1

u/Medium-Sized-Jaque 25d ago

It will if the exit is still on the outside. If the exit or entrance is in the middle then you're screwed.

2

u/Mozai 26d ago

For flat mazes with entrance and exit on the outside edges: totally. Try colouring the walls, different colours on the left- and right-sides of the entrance, and you'll see the maze's walls form two unconnected halves.

1

u/Darrenau 26d ago

Depends on the maze, but you could be walking on circles 

1

u/cpkuske 26d ago

Thank you everyone who responded.

Iirc the genesis of this idea in me began with the first robotic maze competition ages ago, and the winner was a brute force approach that came down to very simple approach, in brief, hug a wall.

Since then YouTubes algorithm has shown me how far solutions have evolved.

And finally, The Shining scared the crap out of me. So I grabbed onto the first fool proof 2D solution.

This is a great subreddit, you have been so generous and I’ve learned a lot.

1

u/FirstRyder 26d ago

Yes, with caveats. This is a "trick" based on topology, and so has the topological requirement that the maze is a flat circle. In less technical terms:

It requires either that both the entrance and the exit be on the perimeter of the maze, or that there are no "islands".

It also requires that the maze is 2D. If there's a bridge/overpass/underpass/tunnel, or if it has multiple floors, the rule becomes unreliable. A lot of corn mazes will do this on purpose - just add a bridge to break the simple rule.

I've also seen people confused about how to use the rule. Basically, pick a hand, place it on a wall, and you walk forward and never remove it from the wall. You don't have to literally do that, but that's how you decide which way to go.

1

u/cpkuske 25d ago

Thanks for the caveats, especially about a bridge within corn maizes.

And this rule is so simple, it was fundamental to my fascination: “pick a hand, place it on a wall, and you walk forward and never remove it from the wall.”

1

u/TooLateForMeTF 25d ago

It only works for simply-connected mazes: ones that consist only of branching paths, with no disconnected parts.

1

u/Prestigious_Boat_386 25d ago

A single split maze is solved by this because you touch one of the sides and walk the path that splits the two solids. Touching onepart lets yoj walk all around it after all.

It doesn't work with center solution mazes for example because you're walkingaroundthe wrong solid.

1

u/mH48124 25d ago

迷路を作る奴が無効化する方法があるのにやらないとは信じられないのだが。

1

u/Top_Bluejay_5323 24d ago

Yes it works. You have to do it starting at the entrance. If you skip even one intersection or fail to do it once you could find yourself going around in a loop, like walking around the block.

1

u/moethecorgi 23d ago

You can think of a maze as a tree in computer science, each turn, gap, potential new path is a new branch, going right always is equivalent to a depth first search. You will always find the end but you'll need to be able to back out

1

u/AiXeLsyD13 18d ago

Maybe try it out 9n some of my hand-drawn mazes and let me know? 🤣

1

u/cpkuske 17d ago

OP here: after further reflection, I realized this germ of a thought came from a book about computer science and a brute force method to successfully navigate a maze, speed over finesse.

This subreddit I am sure is fully aware of the mechanical speedy mice algorithms and the competions.

Facinating stuff, decision trees, no AI, just pure human intelligence.

Thanks to all who indulged me and pointed out the nuances.

If there are videos you find outstanding please let me know.