Level 24
Moderators: UncleTimmy, mjpieters
Enjoying the challenge? Need a hint?Make a donation and help keep the site running! -thesamet
62 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Okay, finally getting around to playing with this. I remembered that I wrote a maze solving program many, many moons ago back in a data-structures class and I was actually able to find the C code for it and it still compiles.
Now it expects an NxM text file for input with a 0 marking an alley and a 1 marking a wall, but it will be easy enough to use Python to translate the image file into a text file of this form. Mostly I just want to run the ancient code.
The only question I have is this: does the maze solving algorithm that I use for this problem make a difference? e.g.
http://www.astrolog.org/labyrnth/algrithm.htm
j.
Now it expects an NxM text file for input with a 0 marking an alley and a 1 marking a wall, but it will be easy enough to use Python to translate the image file into a text file of this form. Mostly I just want to run the ancient code.
The only question I have is this: does the maze solving algorithm that I use for this problem make a difference? e.g.
http://www.astrolog.org/labyrnth/algrithm.htm
j.
japyh wrote:The only question I have is this: does the maze solving algorithm that I use for this problem make a difference? e.g.
http://www.astrolog.org/labyrnth/algrithm.htm
j.
Should work ok, but writing a new one in python will be much more fun than writing the C one was
jeremy wrote:Am I barking up the wrong tree, or does my version of the image (size 264419 bytes) not have a way through?
It might just be my algorithm, but doing a flood-fill also seems to suggest this. Anybody care to nudge me towards the true path, so to speak?
You're not walking on the walls instead of the floor, are you?
rspyc wrote:You're not walking on the walls instead of the floor, are you?
Honestly, you're like one of those gardeners at the stately home who keep telling me to stop climbing on the hedges. How am I supposed to find my way to the middle if I can't see where I'm going?
Ok - 1 equality fixed, and I'm having a better attempt this time...
rspyc wrote:jeremy wrote:Am I barking up the wrong tree, or does my version of the image (size 264419 bytes) not have a way through?
It might just be my algorithm, but doing a flood-fill also seems to suggest this. Anybody care to nudge me towards the true path, so to speak?
You're not walking on the walls instead of the floor, are you?
I might be in the same boat. I assumed that a pixel value of [spoiler removed] were the open paths and that anything else was wall. My algorithm wasn't getting a solution so I opened the maze in Photoshop and filled it from the top and the fill doesn't get to the last row.
Am I walking on the walls?
62 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Return to Python Challenge Hints
Who is online
Users browsing this forum: Google [Bot] and 2 guests
