Page 1 of 1

Labyrinth

Posted: Sat Sep 26, 2009 3:06 pm
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..,

Posted: Tue Sep 29, 2009 10:06 am
by Zeta
My solution was a bit shorter: 469 bytes...

Posted: Sun Sep 12, 2010 8:15 pm
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:

Posted: Mon Jan 17, 2011 4:28 pm
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.

Posted: Tue Nov 29, 2011 8:38 am
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.

Posted: Thu Dec 27, 2012 7:39 pm
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.

Posted: Thu Apr 04, 2013 1:21 pm
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 ;)

Posted: Fri Apr 05, 2013 1:17 pm
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'?

Posted: Sun Dec 15, 2013 8:54 am
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.

Posted: Mon Dec 06, 2021 4:04 pm
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.