Puzzle Level Limit
Puzzle Level Limit
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
We might fix this in the future. For now, consider that you've "reached the end" if you get to 513
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 )
...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...?
(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 )
...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...?
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: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.
Code: Select all
*tile = ( (float)rand()/(float)RAND_MAX ) >= density ? '.' : 'X'
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.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: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):
All work and no play makes Ollie a dull boy.
Code: Select all
# 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)
The following code generates a random matrix then clears a path through it:
Code: Select all
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])
Code: Select all
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
Re: Puzzle Level Limit
Is it still valid? Server returns 200 now, but a bit confusing error: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
Code: Select all
max level is 513
your solution sucked
Thanks!
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany