The GitHub commit message says it was just to mess up MarcelVos, the videomaker
The GitHub commit message says it was just to mess up MarcelVos, the videomaker
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...
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.
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.
It's a good algorithm within some very specific constraints.
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.
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.
According to their quick test, this will definitely result in guests solving mazes a lot faster.
1. guests wandering around randomly - every part of the maze is regularly visited if the maze is busy
2. guests being not hopeless at actually solving mazes
If the guest makes progress opaquely by sometimes cheating, I'm really not going to notice as a player.
On the other hand, some of the other solutions presented here (like using the left hand rule) would make the mazes a lot less interesting to watch.
> remember places they had been previously and bias against those places
Which is something a real maze solving algorithm could do. The linked solution might do that, but mainly it works by cheating (effectively, implementing "gravity" pulling guests towards squares that it knows are closer to the end). That might be just fine for the purposes of making a video game, but it doesn't seem like the sort of approach you were talking about.
I loved Transport Tycoon and have clocked up nearly as many hours on OpenTTD as I had on the original DOS game. I did also have RCT but sadly never had the time to play it as much when it was new.