FAQ  •  Login

Level 24

Moderators: UncleTimmy, mjpieters

Enjoying the challenge? Need a hint?
Make a donation and help keep the site running! -thesamet
<<

johnlr

Posts: 41

Joined: Thu May 05, 2005 4:17 pm

Location: kiwi in aussie

Post Fri May 20, 2005 9:23 pm

Ok, ported to PIL, got to level 25. Still have to work out what m___n.___ is for, and no closer to apologising. Maybe I am just evil mwahahah :twisted:
<<

japyh

Posts: 30

Joined: Sat May 14, 2005 9:42 am

Post Sat May 21, 2005 12:56 pm

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.
<<

johnlr

Posts: 41

Joined: Thu May 05, 2005 4:17 pm

Location: kiwi in aussie

Post Sat May 21, 2005 8:29 pm

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 :wink:
<<

mjpieters

Site Admin

Posts: 172

Joined: Wed May 04, 2005 8:56 am

Location: Norway

Post Mon May 23, 2005 8:21 am

I've got a feeling that my genetic algorithm maze solver won't be much use here..
<<

mjpieters

Site Admin

Posts: 172

Joined: Wed May 04, 2005 8:56 am

Location: Norway

Post Mon May 23, 2005 2:12 pm

mjpieters wrote:I've got a feeling that my genetic algorithm maze solver won't be much use here..


But my generic A* (best first) search algorithm with generic base class *was* very helpful to find the solution to the maze:

  Code:
Created 136650 states, 3 states left on open.
Path length: 44623


Now; just to figure out what is secrets lie enclosed in that path..
<<

jeremy

Posts: 5

Joined: Sun May 08, 2005 3:11 pm

Location: London, UK

Post Tue May 24, 2005 11:44 am

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?
<<

rspyc

Posts: 80

Joined: Sat Apr 30, 2005 8:15 am

Location: Flanders, Belgium

Post Tue May 24, 2005 11:48 am

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?
<<

jeremy

Posts: 5

Joined: Sun May 08, 2005 3:11 pm

Location: London, UK

Post Tue May 24, 2005 12:12 pm

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...
<<

japyh

Posts: 30

Joined: Sat May 14, 2005 9:42 am

Post Tue May 24, 2005 6:13 pm

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?
<<

japyh

Posts: 30

Joined: Sat May 14, 2005 9:42 am

Post Tue May 24, 2005 6:19 pm

japyh wrote:Am I walking on the walls?


Yes, apparently I am. And talking to myself too. Not a good sign, not good at all...
<<

japyh

Posts: 30

Joined: Sat May 14, 2005 9:42 am

Post Tue May 24, 2005 9:00 pm

solved the maze, took l__s. Not seeing what to do with them though... pretty sure my solution is right as I got the same number of segments as others have posted.

Looking at previous levels for something useful to do with these l__s but not seeing anything obvious.

hmm.
<<

johnlr

Posts: 41

Joined: Thu May 05, 2005 4:17 pm

Location: kiwi in aussie

Post Tue May 24, 2005 11:14 pm

Wow that's a log of l__s, do you need all of it?
<<

rspyc

Posts: 80

Joined: Sat Apr 30, 2005 8:15 am

Location: Flanders, Belgium

Post Wed May 25, 2005 12:31 am

johnlr wrote:Wow that's a log of l__s, do you need all of it?

About half of it, I'd say.
<<

japyh

Posts: 30

Joined: Sat May 14, 2005 9:42 am

Post Fri May 27, 2005 7:16 pm

rspyc wrote:
johnlr wrote:Wow that's a log of l__s, do you need all of it?

About half of it, I'd say.


That's just annoying. I hate these tricks at the end after you've done the "hard part" the resulting data shouldn't require a hex editor to figure out. IMO.

Oh well, onto 25.
<<

ibis

Posts: 3

Joined: Sun May 22, 2005 6:07 pm

Post Thu Jun 02, 2005 5:26 pm

Any chance someone can PM me a hint, I have a 22kB file that I extracted from the l__s, and from the header it seems obvious what sort of file it is, but the usual methods (python and non-python) of handling this file don't work.
PreviousNext

Return to Python Challenge Hints

Who is online

Users browsing this forum: Bing [Bot] and 7 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.