Stuck at level 91? (Server fault?)

paulw1128
Posts: 4
Joined: Fri Dec 17, 2010 9:52 am

Stuck at level 91? (Server fault?)

Post by paulw1128 »

My new solver was just running through Crossflip and has gotten stuck at level 91.

I have a solution (529 characters long), but when I submit it, instead of getting back the page for level 92, I get level 91 again :(

If I try to warp to level 92 it tells me I can't, which suggests that my solution has been rejected either because it's wrong, or because of a problem server side.

My impression is that the server-side stuff is failing, because both these cases fail:
- a solution of all ones doesn't get the 'You can't click at (x,y)!' message
- a solution of all zeroes doesn't get the 'You didn't turn on the light at (x,y)!' message.

However the length check on the solution is working fine.

Has anyone else seen this problem?

Thanks,
Paul
helly0d
Posts: 29
Joined: Fri Feb 13, 2009 2:10 am
Location: Iasi Romania

Post by helly0d »

Nope my algorithm is still running, slow for the 390's but still running
paulw1128
Posts: 4
Joined: Fri Dec 17, 2010 9:52 am

Post by paulw1128 »

Ok, thanks. I guess it's time to write an answer checker, and try to work out how it got this one wrong!
paulw1128
Posts: 4
Joined: Fri Dec 17, 2010 9:52 am

Post by paulw1128 »

Update: Made an answer validation routine - it said my answer was correct.

So, to check that I wasn't going mad, I entered it by hand. Thankfully level 91 is only 23x23 so it didn't take too long!

Anyway, having submitted my answer manually, i've now moved on to level 92. This is doing the same thing, so I think I'll update my solver to use HTTP POST instead of GET, to see if that solves the problem. I'm using spw, so the URL for level 91 was >600 characters. Hopefully this is the cause of the problem.

UPDATED: POST works fine. I guess there's some problem with long GET args.
helly0d
Posts: 29
Joined: Fri Feb 13, 2009 2:10 am
Location: Iasi Romania

Post by helly0d »

I didin't had problems with long gets untill level 223 but that's good you made the change form the beggining.

What method are you using to solve the puzzle ?
paulw1128
Posts: 4
Joined: Fri Dec 17, 2010 9:52 am

Post by paulw1128 »

I'm using a Gauss-Jordan style elimination in python, with NumPy arrays of bool types. It's not very quick :P

I'll probably move over to C soon, and then look into cache-friendly blocking stuff for the elimination, although the way this is scaling I don't expect that to be enough to get through to the top.
jagd
Posts: 1
Joined: Wed May 11, 2011 6:06 pm

Post by jagd »

stopped at level 91 too, it was because a '\n' (0x0A) on the end of sol=
Tenebrar
Posts: 18
Joined: Sun Jan 13, 2008 1:38 pm

Post by Tenebrar »

I'm stuck at level 92, with the same thing apparently (no messages of error, except for too small). I'm trying to send in my solution using java, but when I try using an InputStream it basically just reloads the page, instead of submitting a solution.

If I try submitting using a POST request using a socket, I get:
<p>The requested URL /cross was not found on this server.</p>

Could someone tell me of a way I can make this work in java?
Tenebrar
Posts: 18
Joined: Sun Jan 13, 2008 1:38 pm

Post by Tenebrar »

I got it to work with:

String host = "www.hacker.org";
int port = 80;
String path = "/cross/index.php";

String data = "name=" + $name + "&password=" + $password + "&sol=" + sol;

InetAddress addr = InetAddress.getByName(host);
Socket socket = new Socket(addr, port);
BufferedWriter wr = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream(), "UTF8"));

wr.write("POST " + path + " HTTP/1.1\r\n");
wr.write("Host: " + host + "\r\n");
wr.write("Content-Length: " + data.length() + "\r\n");
wr.write("Content-Type: application/x-www-form-urlencoded\r\n");
wr.write("\r\n");
wr.write(data);
wr.flush();

// Get response
BufferedReader rd = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
// Process line...
System.out.println(line);
}

wr.close();
rd.close();
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Post by laz0r »

Sorry for a stupid question (and to break the page!), but I just can't get beyond level 106 even though the solution is definitely correct. Is this CURL usage right? I think it is, but it's not being accepted...

Code: Select all

curl --request POST -d "name=laz0r&password=abcde&lvl=106&sol=000111..." "http://www.hacker.org/cross/index.php"
Last edited by laz0r on Wed Jul 06, 2011 6:57 am, edited 1 time in total.
There is no spoon.
uws8505
Posts: 32
Joined: Sun Jan 23, 2011 8:57 pm

Post by uws8505 »

I don't know anything about CURL, but the page will be better to read if you delete the solution part :)
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Post by laz0r »

uws8505 wrote:I don't know anything about CURL, but the page will be better to read if you delete the solution part :)
Your wish is my command... :)
There is no spoon.
Zeta
Posts: 62
Joined: Thu Apr 16, 2009 3:37 pm

Post by Zeta »

@laz0r: This should work. Analyze the server response.
User avatar
laz0r
Posts: 290
Joined: Thu Feb 04, 2010 4:18 pm
Location: Within the depths of Unix

Post by laz0r »

Zeta wrote:@laz0r: This should work. Analyze the server response.
Bizarrely, it works fine for level 105, but for 106, I get "The answer is too long. It should be 4 characters long."
When I submit something four characters long as the sol parameter, I get 'The answer is too short. It should be 1024 characters long."
Specifying where to store cookies has not done anything.
There is no spoon.
User avatar
MyNameIsAlreadyTaken
Posts: 31
Joined: Sun Oct 17, 2010 10:21 am
Location: Germany

Post by MyNameIsAlreadyTaken »

I tried your command and it worked for me .


Maybe it works with my script:

Code: Select all

#!/bin/bash

for lvl in {1..643}
do
    echo -n "Receiving sourcecode for lvl "${lvl}"... "
    code=`lynx -source "http://www.hacker.org/cross/index.php?gotolevel="${lvl}"&go=Go+To+Level&name=[your_name]&spw=[your_spw]" | grep var\ boardinit`

    echo "Done"
    
    numbers=`echo ${code} | sed s/level\ =\ [0-9]*// | sed s/[^0-9,]//g`
    if [ -z ${numbers} ]
    then
        echo "No correct Levelcode received"
        notify-send Crossflip "Error occured"
        exit 1
    fi
    
    
    echo -n "Calculating Solution... "
    solution=`./crossflip ${numbers}`
    echo "Done"
    
    
    echo "Solution is "${solution}
    
    echo -n "Submiting solution... "
    curl http://www.hacker.org/cross/ -s -d "lvl="${lvl}"&sol="${solution}"&name=[your_name]&spw=[your_spw]" -o ret.txt
    echo "Done"
    echo
    
done
notify-send Crossflip "Done :)"
Post Reply