|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
RE: So... close...
Well, half the battle is won! You have taken half the time to do half the battle. Now, you have another week to figure out the other part. What I do sometimes when something is stumping me is just walk away and do something else. If you take a break for a couple days, it very well might just come to you.
|
|
#2
|
|||
|
|||
|
RE: So... close...
Hey, that might help. I'll try not thinking about the maze for a while.
|
|
#3
|
|||
|
|||
|
RE: So... close...
A basic implementation of the 'Lee-Moore' algorithm is all that is necscary to find the shortest route to the end. The advantage we have is that we know for certain where the maze begins and ends. In theory that is all we need to know (besides the actuall maze itself) to find the route thru it. It sounds like you might be using some sort of 'walker' to traverse the maze, while this would be the only method avaible to say a rodent looking for cheeze. or some sort of pre programmed robot trying to find its way out of a maze. But in our case, the path is known at all times.. its only a matter of finding the shortest one. Its sorta like the force, its allready there you just need to find it. (sorry gearing up for episode II ;) ). The force is strong within you, but there is much fear...
|
|
#4
|
|||
|
|||
|
RE: So... close...
a easy way to look at it is. Imagine the ground of the maze was a giant conductor. and you hooked up leads to the entrace and exit. The current (by laws of nature) will follow the shortest path, hence all you need now is some sort of looking glass that allows you to see what part of the maze the electrons are flowing through, follow their path(s). and badda boom, you have the shortest route.
|
|
#5
|
|||
|
|||
|
RE: So... close...
Sounds easy enough... In fact, I started implementing the Lee Moore algorithm, but it didn't work out right. I tried to find my error but didn't succeed, and now I ended up with a "find-a-path-any-path-through-the-maze"-algorithm... Actually, I'm quite proud about it ;)
Yes, I gotta use the force. Thanks, master Yoda! |
|
#6
|
|||
|
|||
|
So... close...
Here is a test run of my solution http://www.gemueseauflauf.de/maze |
|
#7
|
|||
|
|||
|
RE: So... close...
W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W W
W W 2 1 S W W W W W W W W W W W W 3 W W W W W W W W W W W 4 5 W W 10 11 12 13 14 15 16 17 18 W W W W W W W 6 7 8 9 W W W 19 20 21 22 W W W W W W W W W W 23 W W W W W W W W W W W 24 W W W W W W W W 25 W W W W W W W W W W 26 W W W W W W W W W W W W 27 W W W W W W W W W W 28 W W W W W W W W W 29 W W W W W W W W W W W W 30 31 32 33 W W W W W W W W W W 34 35 36 W W W W W W W 37 W W W W W W W W W W W W W W W W W W W W W W W W W W W E W W W W W W |
|
#8
|
|||
|
|||
|
RE: So... close...
38 steps... sorry about the last post...
|
|
#9
|
|||
|
|||
|
RE: So... close...
I KNOW. This is my problem...
|
![]() |
| Viewing: Codewalkers Forums > PHP Contests > Older Contests > So... close... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|