hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Puzzle Level Limit

 
Reply to topic    hacker.org Forum Index » Runaway Robot Puzzle View previous topic
View next topic
Puzzle Level Limit
Author Message
bok
Site Admin


Joined: 30 Jan 2007
Posts: 24

Post Puzzle Level Limit Reply with quote
At the moment, the server is not able to generate puzzle boards beyond level 513... so if your solver gets there, you're get a server error (500 Internal Server Error) when you try to post your solution to 513...
We might fix this in the future. For now, consider that you've "reached the end" if you get to 513
Wed May 09, 2007 3:38 am View user's profile Send private message Send e-mail
raft



Joined: 26 Feb 2009
Posts: 1

Post Reply with quote
indeed it accepts solution of 513, sends 514, but does not accept solution of 514, saying 513 is max and my solution sucks :/
Thu Mar 19, 2009 11:48 pm View user's profile Send private message
boyo1991



Joined: 19 Dec 2009
Posts: 5

Post Reply with quote
i have reached lvl 20 on this puzzle... how come i cant post still.... (it says lvl 21 on it..)
Sat Dec 19, 2009 9:46 pm View user's profile Send private message
Dumbear



Joined: 22 Jul 2009
Posts: 1

Post Reply with quote
Will you fix it? That's I expected!
Mon Apr 05, 2010 9:30 am View user's profile Send private message
uws8505



Joined: 23 Jan 2011
Posts: 32

Post Reply with quote
I finally solved 513...
(I'm using C++ and text file I/O, so it took more than a minute to copy/paste the board into
the text file and a few seconds to get the answer Very Happy )

...and I could get the answer for 514, but answer submission for 514 seems to be currently blocked.

I want to know if there is some possibility that there will be more problems for this puzzle...?
Fri Feb 11, 2011 1:32 pm View user's profile Send private message
jonik555



Joined: 31 Aug 2009
Posts: 43
Location: Prague

Post Reply with quote
I think it wouldnt be any useful to have more levels. Think that there isn't any better algorhytm than mine one and also that everybody who solved last level used the same.

_________________
There are 10 types of people, those who understand ternary, those who think that this joke is about binary and the others.
Sat Feb 12, 2011 9:25 pm View user's profile Send private message
CodeX



Joined: 17 Oct 2008
Posts: 350

Post Reply with quote
If you really want to see how your program fares at higher levels you can generate them yourself fairly easily imagine, just create a n*m grid where each tile is given by something like:
Code:
*tile = ( (float)rand()/(float)RAND_MAX ) >= density ? '.' : 'X'
where density is the likelihood of a tile being non-traversable. Then determine some min & max move values then generate a random path of random length between min and max, then go over that path on the grid and make them all .s and finally spit it all out in a form you can work with.
Sat Feb 12, 2011 11:12 pm View user's profile Send private message
CodeX



Joined: 17 Oct 2008
Posts: 350

Post Reply with quote
I figured I'd throw some Python together to generate levels for you to test your RR solver with and so here it is! Frankly it's a bit lame but does use the same pattern that the existing challenges use to give the grid dimension and minimum+maximum moves so might be of interest if you wanted to use the same method for whatever sadistic reason.
Code:
# resulting levels will have over 2^30 tiles by level 2,147,483,642
def methodA(n):
   dimension = (n//2) + 3
   minimum = n//6 + 2
   maximum = n//24*7 + (1,1,2,2,2,2,3,3,3,3,4,4,5,5,5,5,5,5,7,7,7,7,7,7)[n%24]+1
   return (dimension,minimum,maximum)

# resulting levels will have over 2^30 tiles by level 1067
def methodB(n):
   dimension = 253 + int(30.5*n)
   minimum = 65 + int(61*(n+2)/6)
   maximum = 165 + (n-1)//11*196 + (0,18,36,54,72,90,107,125,142,161,179)[(n-1)%11]
   return (dimension,minimum,maximum)
methodA is employed on levels 1 to 500 and methodB works for 501-514 (n at 501 = 1) and maybe beyond but there isn't much to go on. As the comments show; methodB gets unmanageable rather quickly when compared to methodA.

The following code generates a random matrix then clears a path through it:
Code:
from random import *
def generate(info):
   dim,min,max = info
   matrix = [[ choice(('.','X')) for tile in range(dim)] for row in range(dim)]
   path = ''.join([ choice(('R','D')) for step in range(randint(min,max))])
   
   x = y = pos = 0
   while x < dim and y < dim:
      matrix[y][x] = '.'
      if path[pos % len(path)] == 'R': x +=1
      else: y += 1
      pos += 1
      
   return ''.join([''.join(row) for row in matrix])
Finally this last bit uses the above code generate levels that resemble the online level, these levels are then passed to a solver but you'd probably want to change it a bit if you were to ever use it (aside from Solver.exe to your program name):
Code:
from os import system
def useFVString(s):
   system("Solver.exe %s"%(s))
   
level = 1
while level <= 500:
   info = methodA(level)
   FVString = "FVterrainString=%s&FVinsMax=%i&FVinsMin=%i&FVboardX=%i&FVboardY=%i&FVlevel=%i"%(generate(info),info[2],info[1],info[0],info[0],level)
   useFVString(s)
   level += 1

while True:
   info = methodB(level-500)
   FVString = "FVterrainString=%s&FVinsMax=%i&FVinsMin=%i&FVboardX=%i&FVboardY=%i&FVlevel=%i"%(generate(info),info[2],info[1],info[0],info[0],level)
   useFVString(s)
   level += 1

All work and no play makes Ollie a dull boy.
Thu Feb 17, 2011 2:47 am View user's profile Send private message
trofi



Joined: 14 Oct 2013
Posts: 23

Post Re: Puzzle Level Limit Reply with quote
bok wrote:
At the moment, the server is not able to generate puzzle boards beyond level 513... so if your solver gets there, you're get a server error (500 Internal Server Error) when you try to post your solution to 513...
We might fix this in the future. For now, consider that you've "reached the end" if you get to 513


Is it still valid? Server returns 200 now, but a bit confusing error:
Code:

max level is 513
your solution sucked


No matter valid answer you post or not. It's not clear if it's solvable.
Thanks!
Sun Nov 17, 2013 8:17 am View user's profile Send private message
AMindForeverVoyaging
Forum Admin


Joined: 28 May 2011
Posts: 471
Location: Germany

Post Reply with quote
bok has run away long ago, so I don't think that asking him will yield an answer Wink

To the best of my knowledge, 513 is still the limit.
Sun Dec 01, 2013 10:23 am View user's profile Send private message
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Runaway Robot Puzzle All times are GMT
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.