Page 1 of 1
Starting Automation
Posted: Tue Apr 29, 2008 8:58 pm
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
Posted: Sat May 03, 2008 1:42 am
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
Posted: Sat May 03, 2008 3:31 am
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)
Posted: Sun May 04, 2008 4:41 am
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
Posted: Sun May 25, 2008 11:03 am
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.
Posted: Mon May 10, 2010 5:28 am
by mardeu19
Hy, i have the same error but i dont understand what to do to fix it.............
Posted: Thu Oct 21, 2010 4:52 pm
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