hacker.org Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Starting Automation

 
Reply to topic    hacker.org Forum Index » Mortal Coil View previous topic
View next topic
Starting Automation
Author Message
T3h_Muffinator



Joined: 29 Mar 2008
Posts: 2

Post Starting Automation Reply with quote
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
Tue Apr 29, 2008 8:58 pm View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 390

Post Reply with quote
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
Sat May 03, 2008 1:42 am View user's profile Send private message Visit poster's website
T3h_Muffinator



Joined: 29 Mar 2008
Posts: 2

Post Reply with quote
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:

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)

Sat May 03, 2008 3:31 am View user's profile Send private message
adum



Joined: 19 Apr 2007
Posts: 390

Post Reply with quote
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
Sun May 04, 2008 4:41 am View user's profile Send private message Visit poster's website
Hephaestus



Joined: 17 May 2008
Posts: 5

Post Reply with quote
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.
Sun May 25, 2008 11:03 am View user's profile Send private message
mardeu19



Joined: 26 Apr 2010
Posts: 1

Post Reply with quote
Hy, i have the same error but i dont understand what to do to fix it.............
Mon May 10, 2010 5:28 am View user's profile Send private message
stabat



Joined: 10 Oct 2009
Posts: 5
Location: Denmark

Post Reply with quote
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 Wink

hope I helped Wink

edit: oups, it's 3 tabs/spaces, not 4 :p
Thu Oct 21, 2010 4:52 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    hacker.org Forum Index » Mortal Coil All times are GMT
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.