Labyrinth

Discussion of challenges you have already solved
Post Reply
burnpanck
Posts: 5
Joined: Mon Sep 14, 2009 6:32 pm

Labyrinth

Post by burnpanck »

That was a nice one!
How big were your solutions? Mine was 4370 characters or 4324 opcodes.
I had to write a small compiler/assembler to calculate the jump offsets for me..,
Zeta
Posts: 62
Joined: Thu Apr 16, 2009 3:37 pm

Post by Zeta »

My solution was a bit shorter: 469 bytes...
Last edited by Zeta on Sun Sep 12, 2010 10:41 pm, edited 1 time in total.
miroe
Posts: 5
Joined: Sun Mar 08, 2009 2:58 am

Post by miroe »

280 bytes :)

...unfortunately, it does not always solve within the given 40k cycles, in some unfortunate situations it can take up to 100k. So I had to try it several times as the solution before it got accepted. But I was too lazy to optimize further :roll:
cLiEbiG
Posts: 1
Joined: Sat Oct 16, 2010 5:48 pm

Post by cLiEbiG »

I liked this one, too (although it took me weeks with some restarts to solve this... after working too long on it continously you will probably get crazy ;-) )

Without optimization (still a lot of spaces for better readability) my solution was 260 chars long.
User avatar
dangermouse
Posts: 89
Joined: Sun Jun 05, 2011 8:14 pm
Location: deep space computing AG
Contact:

Post by dangermouse »

mine is 221 bytes with lot of spaces. i took this algorithm from a book:

1 right
2 if touch goto 1
3 printdir
4 forward
5 left
6 checkendgame
7 goto 2

forward, touch and printdir where implemented as routines, the rest inline.
however, i had to try several times until the solution got accepted.
rafael
Posts: 2
Joined: Fri Aug 05, 2011 9:25 am
Location: Germany

Post by rafael »

I needed 258 Bytes with some unnecessary spaces. I solved it offline (with a 4x4 test-labyrinth) and the first committed version was fast enough.
<><
Redford
Posts: 41
Joined: Sat Jul 04, 2009 8:32 pm
Location: Poland
Contact:

Post by Redford »

Very nice challenge! :)
246 bytes, DFS (from the end)
In each field, after entering it, DFS writes to this field the index from which it came. After that, I run a simple loop, go backwards and print appropriate letters.
It always solves the maze in < 40k cycles so I didn't need to resubmit ;)
Image
avrrobot
Posts: 51
Joined: Fri Mar 04, 2011 2:54 pm
Location: Germany

Post by avrrobot »

My Code has 208 instructions.
It will solve the maze always in the cycle limit.
But I was a bit lazy, I copied most of the code just from my Deluge and Flash Flood Warmup programm, worked perfectly at the first try.
It is a recursive approach from the end.
But why is there no following Challenge like 'Fast Labyrinth'?
chiefrocker
Posts: 5
Joined: Fri Aug 16, 2013 11:53 am

Post by chiefrocker »

I "solved" it in ~3 hours, but with backtracking, i.e. I would always give the shortest path. However, that took 76k cycles, and I spent the last days optimizing that down to <47k cycles, but all tries to improve on that would not work out anymore.

So, finally, I realized that the shortest path was not required, so I got rid of the backtracking and got below 40k cycles. ;)

However, something's fishy: I got some "program failed to execute correctly" messages when first trying to commit, with what's running perfectly locally. Did not find out what that was, in a later retry, it just worked.
sliiser
Posts: 1
Joined: Fri Mar 06, 2015 11:56 am

Post by sliiser »

174 bytes. Recursive from the end.

Started by going from the beginning, but printing as I go (with backwards from dead ends) took too many cycles and printing the stack in the end was tedious. Starting from the end solved it all.
Post Reply