Starting Automation

Post Reply
T3h_Muffinator
Posts: 2
Joined: Sat Mar 29, 2008 4:04 pm

Starting Automation

Post by T3h_Muffinator »

Hi, I'm new and wondering if anyone would be willing to explain to me how I can automate the acquisition and submission of the data (board) and solution. I read the sticky on automation, so I know the format of submitting a solution, I just don't know how to code it. I'd prefer to code in c++, but I suppose java would be okay, too.

Thanks,
-Muffinator
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

hi muffinator -- i suggest checking out the sample solver i posted to this forum. learning from a working example like that is probably the easiest way, even if it's in Java.

cheers,
adum
T3h_Muffinator
Posts: 2
Joined: Sat Mar 29, 2008 4:04 pm

Post by T3h_Muffinator »

Okay, thanks!

Also, I tried compiling your sample script in bluej, and it's giving me this error "n must be positive" in the line that calls the randomizer function (line 63). I figured that somehow you were passing a negative number in, so I put Math.abs(boardX) and the same for boardY, but that still didn't work. Any clue as to what's up?

Code: Select all

java.lang.IllegalArgumentException: n must be positive
	at java.util.Random.nextInt(Random.java:250)
	at MortalCoilSolver.findSolutionPath(MortalCoilSolver.java:63)
	at MortalCoilSolver.solve(MortalCoilSolver.java:48)
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

hmmn, that probably means it failed to parse the board size correctly. i'm not sure why that would be the case; it shouldn't have changed formats. i'll try to take a look sometime.

adum
Hephaestus
Posts: 5
Joined: Sat May 17, 2008 9:38 pm

Post by Hephaestus »

Yeah I got the same problem. It turned out that when reading the line that starts with <param name=\"FlashVars\"" the sample code has 4 spaces but the source code when I checked has 3 tabs. Changed that & it worked fine.
mardeu19
Posts: 1
Joined: Mon Apr 26, 2010 11:41 pm

Post by mardeu19 »

Hy, i have the same error but i dont understand what to do to fix it.............
stabat
Posts: 5
Joined: Sat Oct 10, 2009 2:55 am
Location: Denmark

Post by stabat »

I had the same problem when I looked at this puzzle, but solved the problem really quickly.
The trick that for some reason , the spaces in the website, have replaced by tabs.
So to make it work, you should replace the string " <param name..." with "\t\t\t<param name..."
but this is easy to find if you know from programming ;)

hope I helped ;)

edit: oups, it's 3 tabs/spaces, not 4 :p
Post Reply