BedMaker

Jump to navigation Jump to search

You should be able to just put it in quotes. I have a di.sh with a commands like: java -cp bin:hsqldb.jar roboResearch.CLI -S -t 6 -c "voidious.Diamond 1.7.56.x1" di1.cfg

Voidious04:21, 18 July 2012

Quotes didn't work because quotes get a bit mangled when passing from one bash script to another. I just went ahead and called java directly. Now I have a terminal window running the RoboResearch server, and three windows each chugging away on bots. (rev108 and two changes to surf wave timing and MEA predict timing. Probably veeeery small changes there. Oh well.)

It's going though. Woot!

Tkiesel04:40, 18 July 2012
 

Is it bad to run two of these simultaneously out of the same directory. The CLI is needing lots of babysitting because of stuff like

Thead 1: Unrecognized output from robocode, "Got an error with alex.Diabolo5: java.lang.ClassNotFoundException: alex.Diabolo5". Killing battle.

followed with lots of java.io.IOException stuff.

Tkiesel20:57, 18 July 2012
 

I'm not sure, I always run one challenge at a time with the max threads I'm willing to use ("-t 6" for 6 threads). That error does sound like they might be stepping on each other's toes.

Voidious20:59, 18 July 2012

Oddly enough, using the -t tag for more threads causes problems for me...

(Running using server) Result for robot named "tjk.deBroglie rev0115 (2)". Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1949) at roboResearch.engine.Result.<init>(Result.java:31) at roboResearch.engine.BattleResults.load(BattleResults.java:42) at roboResearch.engine.BattleResults.load(BattleResults.java:24) at roboResearch.engine.BattleRunner.run(BattleRunner.java:107) at roboResearch.CLI.run(CLI.java:94) at roboResearch.CLI.<init>(CLI.java:69) at roboResearch.CLI.main(CLI.java:38)

Tkiesel21:28, 18 July 2012
 

Hmm, weird. Well, I don't know if this is the issue, but the instructions say when you use -t, you should also start the SQL DB separately and pass -S. The command to start the DB is:

java -Xmx1024M -cp hsqldb.jar org.hsqldb.Server -database.0 file:roboresearch -dbname.0 roboresearch

So I do that, then run with "-S -t 6" and it works. That "tjk.deBroglie rev0115 (2)" almost seems like you have two of that bot/version in a battle against itself, though - is that the case? Not sure if I've tried that or if it would cause issues.

Voidious22:39, 18 July 2012

Yeah, I've got the -S flag in there and have the server running in a separate terminal. Here's the whole thing:

tom@gecko ~/RoboResearch $ java -Xmx512M -cp bin:hsqldb.jar roboResearch.CLI -S -t 3 -C challenges/debroglie1.rrc -c "tjk.deBroglie rev0116" -r 35 -s 14

Challenge Specifications:

Challenge: deBroglierev108 150-57-95

Bot: tjk.deBroglie rev0116

Alias: null

Rounds: 35

Threads: 3

Type: null

Seasons: 14


(Running using server)

Result for robot named "tjk.deBroglie rev0116 (2)".

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1

at java.lang.String.substring(String.java:1949)

at roboResearch.engine.Result.<init>(Result.java:31)

at roboResearch.engine.BattleResults.load(BattleResults.java:42)

at roboResearch.engine.BattleResults.load(BattleResults.java:24)

at roboResearch.engine.BattleRunner.run(BattleRunner.java:107)

at roboResearch.CLI.run(CLI.java:94)

at roboResearch.CLI.<init>(CLI.java:69)

at roboResearch.CLI.main(CLI.java:38)

Strange. I've been using the prepackaged one linked at the wiki here. Maybe I'll get the latest one via SVN and work around the build instructions that refer to nonexistent files.

Tkiesel23:11, 18 July 2012
 

And single threaded works, or the GUI? That's so odd. I know the code base a little and it seems like that path should execute the same across all of them. Or did you figure it out?

Voidious15:52, 19 July 2012
 

Single threaded works great.. same command line with the "-t 3" omitted.

Maybe having to do with the fact that I'm using OpenJDK? Do you use the Sun/Oracle JRE/JDK ?

Tkiesel20:10, 19 July 2012
 

I'm also using OpenJDK, on Ubuntu 12.04. (And previously the Apple JVM on a Mac.) The line that's failing is trying to parse the bot name from a line that, I think, would look like "1: tkiesel.deBroglie rev0116". If you want to hack on the RoboResearch source, you may be able to get a better picture. I would wonder if it's something about the Robocode version, except that it's working in those other configurations...

Voidious20:36, 19 July 2012

Yeah.. OpenJDK on Linux Mint 13 here, which is based on Ubuntu 12.04. Much the same running environment.

Tkiesel23:11, 19 July 2012
 

It looks like you have an extra space in the bot name, the " (2)". Could that be the issue?

Skilgannon21:49, 19 July 2012

Feel free to inspect the actual command I entered; I pasted it up above.

java -Xmx512M -cp bin:hsqldb.jar roboResearch.CLI -S -t 3 -C challenges/debroglie1.rrc -c "tjk.deBroglie rev0116" -r 35 -s 14

has problems while

java -Xmx512M -cp bin:hsqldb.jar roboResearch.CLI -S -C challenges/debroglie1.rrc -c "tjk.deBroglie rev0116" -r 35 -s 14

does not.

What's odd is that the lines that declare what config will be running (before the actual battles start) seem to indicate that the bot name was read correctly. Again, as I pasted above:

Challenge: deBroglierev108 150-57-95

Bot: tjk.deBroglie rev0116

Alias: null

Rounds: 35

Threads: 3

Type: null

Seasons: 14

But then, a moment later, RoboResearch has " (2)" appended to the end of the bot name. Very odd.

Tkiesel23:08, 19 July 2012
 

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:User talk:Tkiesel/BedMaker/reply (25).

 

Sounds like a fun project! I'm no pro developer, just a physics guy who got into programming in college, but I'd love to contribute however I could to a project like that.

Tkiesel03:51, 20 July 2012