HOME | DD

TGFWritter — Maze problems

Published: 2012-04-20 08:59:16 +0000 UTC; Views: 1496; Favourites: 3; Downloads: 9
Redirect to original
Description Ok, so I was running the program we had done through the maze, and we discovered something interesting.

Those red areas are places where the program would suddenly enter a "infinity loop". It would just go round and round over and over again till infinity.

Needless to say, we're adding some safeguards to the program to avoid it doing something like that ever again, but it's been somewhat of a logistical nightmare to make sure that the extra code doesn't become that large to begin with.

Oh well, at least it's proven to solve it in time.

But since we've still got some times we're thinking of making a new and improved maze searcher... just hope the teachers don't count it as cheating if the new version actually works.

Maze for everyone to solve will be out real soon, see ya.
Related content
Comments: 15

4maram [2021-12-28 14:07:11 +0000 UTC]

👍: 0 ⏩: 0

l33tn3rdz [2015-08-13 02:48:20 +0000 UTC]

So the maze is not a perfect maze but rather a braid maze?

Also on that note, I would use a program called Daedalus to solve it.

👍: 0 ⏩: 1

TGFWritter In reply to l33tn3rdz [2015-08-13 07:02:16 +0000 UTC]

This is from quite some time ago, so sorry if the details are a bit blurry, but I can't quite remember the "kinds of mazes" there are...

Anyway, this was an uni project, we had to create a maze and then make a program to solve it in the least amount of time. The program was also used in multiple other mazes just to make sure it wasn't TOO specifically geared for this kind.

👍: 0 ⏩: 0

tpainton [2013-01-12 03:55:37 +0000 UTC]

You know another option is just random brute force hack. Literally. Randomly make decisions with only one condition to check.. isMazeExited(). I mean.. what's time to a Java Mouse?

👍: 0 ⏩: 1

TGFWritter In reply to tpainton [2013-01-12 08:37:42 +0000 UTC]

Problem was that it has to be solved in a certain number of steps or less, so you gotta make the program smarter than that.

👍: 0 ⏩: 0

llirbwerdnadivad [2012-04-25 14:11:40 +0000 UTC]

So you actually made a program to find the path through the maze? How'd you do that?

👍: 0 ⏩: 1

TGFWritter In reply to llirbwerdnadivad [2012-04-25 16:32:46 +0000 UTC]

Java, Eclipse.

And it was three of us, though the teacher handed us a pre-made "Reader" that allowed us to read images.

👍: 0 ⏩: 0

legofreak502 [2012-04-20 17:06:43 +0000 UTC]

Well if you look at the top problem it looks like a four way intersection.

👍: 0 ⏩: 1

TGFWritter In reply to legofreak502 [2012-04-21 09:48:06 +0000 UTC]

Yep, that was kinda my objective when I put that there.

But the program would just reach there, take a couple of options, and then suddenly start going around the dot.

Lucky for us, we think we found a solution for the "merry go round" problem, we're giving it the finishing touches and will test the hell out of it on Monday.

👍: 0 ⏩: 1

legofreak502 In reply to TGFWritter [2012-04-22 05:30:56 +0000 UTC]

Well i hope it goes well for you and the intersection.

👍: 0 ⏩: 0

Uncle-Ben [2012-04-20 15:33:43 +0000 UTC]

Well, there is a way to fix that problem, the "easy" way. Eliminate the circles in the drawing. Most mazes don't have circles. Then you won't need to add the extra code.

👍: 0 ⏩: 1

TGFWritter In reply to Uncle-Ben [2012-04-20 16:36:55 +0000 UTC]

It could also happen if the maze had more than one solution since it would, in a way, form a bigger circle.

And we aren't sure even if the teacher will test our program in our own maze, so we have to prepare for every possible outcome... and then some.

👍: 0 ⏩: 0

mhtg [2012-04-20 11:52:32 +0000 UTC]

so the program hugs the left or right wall

👍: 0 ⏩: 1

TGFWritter In reply to mhtg [2012-04-20 11:57:40 +0000 UTC]

More or less.

When a computer has to go through a maze, you have to define what priorities should be given. So, for example, if it has to decide between "Go right" and "Go straight", you it'll always take one of the two (depends on how you program it). So, regardless whether it had "Go straight" "Go Left" or "Go right" as the highest priority, on those areas it continued going on circles.

That's why we now have to include something that would be the equivalent of "Haven't we been here already?" sort of thing, so the program, once faced with going through the same area, even though it hasn't found dead ends, will try to search for another "Option" out of there.

👍: 0 ⏩: 1

mhtg In reply to TGFWritter [2012-04-20 14:54:46 +0000 UTC]

thats why in mazes in pc games (like minecraft) its a good idea to leave "breadcrumbs"

👍: 0 ⏩: 0