algorithm in Java

This forum is for discussions related to the Runaway Robot puzzle
Post Reply
irgangla
Posts: 3
Joined: Fri Sep 11, 2009 7:19 pm

algorithm in Java

Post by irgangla »

Hi,
has someone of you solved the puzzle with a Java programm? I have problems with downloading the levels higher than 500 at once and it seems if I resume the download with the range header I get unsolveable levels. Had someone the same problem and was able to solve it?

Greetings,
irgangla
User avatar
m!nus
Posts: 202
Joined: Sat Jul 28, 2007 6:49 pm
Location: Germany

Post by m!nus »

To anyone who comes across this problem: The webserver doesn't deliver the whole response, thus you get an incomplete board. I had this problem with my Python implementation too. You have to accept gzipped content, then it works just fine

Code: Select all

request = Request(url)
request.add_header('Accept-encoding', 'gzip')
res = self.opener.open(request)
ret = res.read()
if res.getheader("Content-Encoding") == "gzip":
	ret = gzip.decompress(ret)
Post Reply