Thread history

From Talk:RoboRunner
Viewing a history listing
Jump to navigation Jump to search
Time User Activity Comment
22:17, 23 August 2012 Voidious (talk | contribs) New reply created (Reply to Possible bug report)
10:47, 23 August 2012 Wompi (talk | contribs) New reply created (Reply to Possible bug report)
05:08, 23 August 2012 Voidious (talk | contribs) New reply created (Reply to Possible bug report)
00:04, 23 August 2012 Voidious (talk | contribs) Comment text edited (one more thing)
00:03, 23 August 2012 Voidious (talk | contribs) New reply created (Reply to Possible bug report)
16:18, 22 August 2012 Wompi (talk | contribs) New reply created (Reply to Possible bug report)
15:42, 22 August 2012 Wompi (talk | contribs) New reply created (Reply to Possible bug report)
15:18, 22 August 2012 Voidious (talk | contribs) New reply created (Reply to Possible bug report)
14:59, 22 August 2012 Wompi (talk | contribs) New reply created (Reply to Possible bug report)
14:32, 22 August 2012 Voidious (talk | contribs) New reply created (Reply to Possible bug report)
12:40, 22 August 2012 Wompi (talk | contribs) Comment text edited (forgot to post the whole exception)
10:26, 22 August 2012 Wompi (talk | contribs) New reply created (Reply to Possible bug report)
21:20, 26 July 2012 Voidious (talk | contribs) Comment text edited (data)
21:20, 26 July 2012 Voidious (talk | contribs) New reply created (Reply to Possible bug report)
17:33, 26 July 2012 Voidious (talk | contribs) New reply created (Reply to Possible bug report)
17:22, 26 July 2012 Voidious (talk | contribs) New reply created (Reply to Possible bug report)
17:13, 26 July 2012 Tkiesel (talk | contribs) New thread created  

Possible bug report

Heya Voidious,

I think I may have found a bug.

I finished a run of deBroglie rev0130 last night on the test bed you made for me. Score was in the lower 80s.

Just now, I manually made a .rrc testbed with some high performing bots. Started running it, and here's the output. Looks like RoboRunner is carrying over the score from the other challenge file?

~/roborunner $ ./rr.sh -bot tjk.deBroglie rev0130 -c debroglie_mega.rrc -seasons 20

Copying missing bots... 0 JAR copies done!

Initializing engine: ./robocodes/r1... done!

Initializing engine: ./robocodes/r3... done!

Initializing engine: ./robocodes/r2... done!

Challenger: tjk.deBroglie rev0130

Challenge: deBroglie Megabot test

Seasons: 20

Threads: 3

 tjk.deBroglie rev0130 vs lxx.Tomcat 3.67c: 39.79, took 57.6s, avg: 39.79

Overall score: 81.16, 170.42 seasons

 tjk.deBroglie rev0130 vs voidious.Diamond 1.8.1: 31.91, took 72.3s, avg: 31.91

Overall score: 80.83, 170.5 seasons

 tjk.deBroglie rev0130 vs jk.mega.DrussGT 2.7.3: 37.2, took 82.0s, avg: 37.2

Overall score: 80.54, 170.58 seasons

Tkiesel17:13, 26 July 2012

Yep, it seems I'm printing the overall score for every bot you've faced, not just the ones in the current challenge file that's loaded. I'll see about fixing that later today. You can just delete (or rename for now) the file from the data directory if you want to start fresh. Thanks!

Voidious17:22, 26 July 2012
 

Or you could keep/copy just the lines for those bots in the data file, if you feel like mucking with it.

Voidious17:33, 26 July 2012
 

Ok, posted the fix in 1.0.1: [1] Only things to update are the RoboRunner JAR and rr.sh which points to it. It was just a problem with the output, so things should work fine with your old data file, if you still have it.

Voidious21:20, 26 July 2012
 

Hi mate. I got a little Exception :)

java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.ArithmeticException: / by zero
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
	at java.util.concurrent.FutureTask.get(FutureTask.java:83)
	at robowiki.runner.BattleRunner.getAllFutures(BattleRunner.java:95)
	at robowiki.runner.BattleRunner.runBattles(BattleRunner.java:80)
	at robowiki.runner.RoboRunner.runBattles(RoboRunner.java:338)
	at robowiki.runner.RoboRunner.main(RoboRunner.java:89)
        ...
Caused by: java.lang.ArithmeticException: / by zero
	at robowiki.runner.RoboRunner.printOverallScores(RoboRunner.java:485)
	at robowiki.runner.RoboRunner.access$4(RoboRunner.java:466)
	at robowiki.runner.RoboRunner$3.processResults(RoboRunner.java:734)
	at robowiki.runner.BattleRunner$BattleCallable$2.run(BattleRunner.java:197)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

One question. If i fork RoboRunner to my GitHub repositories and make changes, does it mean i have a new project or is it more like a separate branch and we could merge some changes i made?

Take care

edit: stupid me, i posted just the head

Wompi10:26, 22 August 2012
 

Seems like this would only happen when printing the overall score for 0 battles? Is it possible that was the situation? If so I'm not as worried about it being a bug, but we should check for it and print something nicer. If it shouldn't have had 0 total battles, then it's a deeper problem with the score tallying I guess.

This is my first experience with GitHub, so I don't know for sure, but I'm pretty sure the main idea behind forking is for you to make changes and then I can pull them back in. I think you issue a "pull request" once you've made your changes. I also think it can function fine as a new project if you don't ever intend to merge back.

Voidious14:32, 22 August 2012
 

Yep the problem is deeper. It looks like, if i had no battles before everything is fine (not 100% sure). Then, if i restart the test run this Exception comes up. I run it with 20 seasons (melee).

I made just a quick fix for me, so i can still use it. The only thing i lost was the 'Overall' score output - but i'm fine with the 'Average' output.

I have forked your repository and made a new brunch from the main branch, not sure if you can see it on your side to. The only thing i changed so far is the output of the melee score (just formatting). Yes, i guess i will use it mainly as new project and tweak it to my needs, but i thought for little bug fixes it would be easier to just merge the branches.

Wompi14:59, 22 August 2012
 

So you can see the latest and average score for each battle, but overall score throws that exception? How strange. Could you post your data file somewhere so I can try to reproduce? That would be super helpful. (roborunner/data/package.BotName version.xml.gz)

I'd certainly like to pull back any bug fixes or awesome new features. =) What's your melee score output look like? I've used it for Melee a little but mostly 1v1, and even for Melee I tend to focus on overall score, so I'm open to suggestion. I've also considered a -verbose option (or something) for printing extra scoring details, like survival/bullet damage even when you specify APS as the scoring style.

Voidious15:18, 22 August 2012
 

Yep give me a second i rollback the fix and give you the output file ....

Wompi15:42, 22 August 2012
 

Ok there it is RoboRunner-bugtrace.zip. Looks like i was wrong it happens straight from the start. I deleted all xml files and the output of the first run is shown in the zip file. Maybe it helps :). Let me know if you need more. i broke the run after the second season with 'CTRL-C'.

Well, i just made the melee output a little more 'eye' friendly :) but i guess i will enhance the output to something that i use in my other outputs in the next days (nothing serious just a little more info on bullet hit ratio of all bots,some movement stats, sorted output of APS and a table of all bot score to each other). Based on an early RoboRunner version i rewrote it to a console like application. So basically you start the program and use console commands to configure,run.output some stuff. Unfortunately does it not use multiple threads and i'm now back to the latest RoboRunner and maybe i can merge the two somehow.

I think if you look in GitHub at Network you should see the forks that go of of your main branch.

Wompi16:18, 22 August 2012
 

Great, thanks! I was able to duplicate it here and figured out the problem. RoboRunner gets confused by having 2 of the same bot in a battle (mld.DustBunny 3.8 in this case). It looks like BattleListener eats the result right away when it builds a map of scores by bot name/version. (Edit: So RoboRunner has zero scores for the actual bot list when it tries to calculate overall score.) I have to head out in a few minutes, but I'll try to get a fix out later tonight or tomorrow.

Voidious00:03, 23 August 2012
 

Ok, I think it's all set. Tested it with the challenge you provided, dropped it into my currently running melee test a half hour ago and that still looks right, and did my usual round of manual setup and tests. The fix was mostly pretty easy thanks to Guava's Multimap stuff, but it also led to some minor refactoring so that nothing is based on looking up a score only by bot name, besides the challenger bot. I think it should work fine even if the challenger is also a reference bot, even though that seems silly - the first score for that bot in each battle would be considered the challenger score.

Hopefully it won't be too painful of a merge for you. ;)

Voidious05:08, 23 August 2012
 

Yep works fine. Thanks. It wasn't supposed to have two of the same bots within the challenge :) - i realized that i just took an old challenge file while switching to the new RoboRunner version. But i guess in this case it was luck to detect the bug.

I tried yesterday to make the challenger a development bot. I changed the copy bot function to let bot names with ..* through but somewhere it lost the name. Can you give me a hint where the bot name comes back from the process? The RobocodeEngine can work with development bots if the properties contain the right path. What it does, if you give it, lets say wompi.Wallaby* , it changes it to wompi.Wallaby* 4.7 for the result output (this works so far). Now i thought i just change the name back to my original (wompi.Wallaby*) within the BattleResultHandler (i guess this is where the results are coming back from the process) and could work with development bots. It was just a quick try and i will try it today more seriously, but maybe you have a quick solution. I guess you are more used to your code and could say where it stores references between name and score. The sad thing is even if i'm giving it the complete name (wompi.Wallaby* 4.7) it doesn't work :(. I guess somewhere the "*" is a limiter or gets lost. Please don't put any time in this, it just would be nice if you have a quick hint.

I have to admit that this GitHub stuff is very neat. It's so easy to work with - thanks for pointing me at this by releasing RoboRunner over GitHub. I'm a little more used to it now and figured out how the forking works.

It's basically: fork your origin -> my origin clone to local (optional) make branches add your origin as remote (this keeps me up with changes at your side) merge remote -> my branch push my branch -> my origin (optional) make a pull request to you

It's pretty straight forward and with GitX you have a nice graphic view about the branches to :)

Take Care

Wompi10:47, 23 August 2012
 

I don't think the name should be interpreted as a regex anywhere or anything like that. I think that whatever comes back from robotResults.getRobot().getNameAndVersion() in BattleListener should be handled by the rest of the code OK. The other points of concern that come to mind are:

  • Copying the dev bot into the Robocode install directories means copying your package dir and classes into the robots dirs of each Robocode install, which is not as simple as copying one file. (Unless you have them all configured to look at some other directory?)
  • Assuming Robocode can find it, checking whether the dev bot you specify is actually running in the battles.

For the second point, you could try:

  • Modifying BattleProcess to do _engine.setVisible(true), so you could see the battles that get run.
  • Run robowiki.runner.BattleProcess (with -path to Robocode, -rounds, -width, -height) and try running battles with your dev bot. BattleProcess is a command line application where you can type in a comma delimited list of bots (like "jam.mini.Raiko 0.43,voidious.Diamond 1.8.1") and it runs the battle and spits out the result.

And yeah, I'm liking GitHub too! I know PEZ is a big fan, though he's not doing Robocode stuff. I didn't know about GitX, I'll have to give that a shot. Maybe it will encourage me to make better use of branches. ;)

Voidious22:17, 23 August 2012