Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : General : Force Arrow Mazes with Roaches (How on earth do you solve them?)
New Topic New Poll Post Reply
Poster Message
Vornicus
Level: Goblin
Rank Points: 17
Registered: 08-04-2011
IP: Logged
icon Force Arrow Mazes with Roaches (+1)  
This isn't really about a particular room. It is about a category of rooms that whenever I reach them I get stuck, and then the hints on the forum appear to assume some knowledge that I just plain don't have. Here's a few examples.


City of Queens : The Ancient Royal Chambers : 2 North, 7 East


Loony Labyrinth : Entrance : 2 South, 3 West


Odyssey : Start of Journey : 1 South, 1 East

In each of these, I always get the roaches stuck completely or running around in circles, with no clear direction to get them out. The only thing I've found that helps at all is full demos, which aren't really much fun to try to follow, and don't teach me anything useful about roached force arrow mazes in general. I just can't see paths.

So I ask you: how do roached force arrow mazes get solved? Is there a good tutorial hold for them or something? Would a better set of images for force arrows help?
09-04-2011 at 01:11 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
coppro
Level: Smitemaster
Rank Points: 1309
Registered: 11-24-2005
IP: Logged
icon Re: Force Arrow Mazes with Roaches (0)  
Like many mazes, it is often helpful to work backwards rather than forwards.

A set of tiles might help you a little, but I find the biggest thing to remember is that your path can only change by 45 degrees at a time, because the roach follows you.
09-04-2011 at 03:30 AM
View Profile Show all user's posts Quote Reply
Maurog
Level: Smitemaster
Avatar
Rank Points: 1501
Registered: 09-16-2004
IP: Logged

File: dijkstra.JPG (34.6 KB)
Downloaded 332 times.
License: Public Domain
icon Re: Force Arrow Mazes with Roaches (+4)  
If you are REALLY confused about paths, let me tell you a way that solves it 100%, although it is painstakingly long and meticulous. It's called Dijkstra's path finding algorithm and it's used in many computer programs which involve finding paths.

Here is how you do it - pick the goal first. It can be one square or many. This is where you want to go or where you want the roach to go. Pick the start too. For example, you are Beethro and you are in the bottom half of the last room you showed, you want to get to the middle - the X is your goal, Beethro is your start. Paint your goal in a color. This is your current color.

Now follow the following steps:
1. Look at all the tiles which have "current color". For each such tile, find all the adjacent tiles which you can step into the current colored tile FROM. Paint them in "next color". Don't paint any tiles which are already painted.
2. The "next color" you used in 1 is now your "current color". Pick some new color to be the new "next color".
3. Repeat from step 1 until start is reached. You now have a solid path from start to goal.

Diagram attached though is really horrible quality.
I solved it for Beethro going to middle, and then for roach going to middle. Keep in mind that for the roach you assume that Beethro is on the bottom, so you cannot paint tiles below "current color" tiles, because the roach never goes up. Also, roaches pick vertical over horizontal which should also be kept in mind (the botched part in blue is where I made a mistake).

Anyway, hope that helps. Here is the diagram:
Click here to view the secret text


Note that it finds A path, not the only path. It also varies depending on which tiles you check first, but it does always find one of the shortest possible paths to the goal.

____________________________
Slay the living! Raise the dead!
Paint the sky in crimson red!

[Last edited by Maurog at 09-04-2011 03:43 AM]
09-04-2011 at 03:41 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
Syntax
Level: Smitemaster
Rank Points: 1218
Registered: 05-12-2005
IP: Logged
icon Re: Force Arrow Mazes with Roaches (0)  
That's brilliant!

Now about those aumtlichs... ;)

Cheers!
09-04-2011 at 05:26 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Vornicus
Level: Goblin
Rank Points: 17
Registered: 08-04-2011
IP: Logged
icon Re: Force Arrow Mazes with Roaches (+1)  
And while Dijkstra's algorithm works all right for the Odyssey one, and with less restrictions for the Loony Labyrinth one, the City of Queens one has a more interesting problem: in order to change the direction of the roach to any of the cardinal directions, I have to walk a long way around, and that means that the roach is forced into a corner... and that any individual square can (and, if I understand the hints in its thread, actually does) appear multiple times in the solution. I tried once to write a program that solves it for me, but all it got me was complete befuddlement and a memory bomb.

...you know it occurs to me that it shouldn't be a memory bomb, (32 * 38)^2 is only 1.47 million records, and that doesn't even take into account how many of those are unreachable. Back to the code mines!
09-04-2011 at 06:05 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Vornicus
Level: Goblin
Rank Points: 17
Registered: 08-04-2011
IP: Logged
icon Re: Force Arrow Mazes with Roaches (0)  
When there's only two entities, the exponent is just 2; I calculated how many different situations there are for two entities in a 32x38 room, and it's not that many, which means the explosion was actually something like me screwing up the duplicate checker.

And, anyway, A*. Heuristic is broadway steps for the queen to get to the exit arrow. :P
09-16-2011 at 03:56 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : General : Force Arrow Mazes with Roaches (How on earth do you solve them?)
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.