Difference between revisions of "Talk:Robocode"

From Robowiki
Jump to navigation Jump to search
(bug?)
(→‎Bug?: normalizing angles)
Line 48: Line 48:
 
== Bug? ==
 
== Bug? ==
 
I have reproduced this numerous times already. Basically, when onScannedRobot is called my bot sets heading=(int)e.getHeading() . At the end of the onScannedRobot(), prevHeading=heading (for a pattern matcher). I put it in a battle with Walls. Most of the time, heading-prevHeading+10 is a normal amount. For some reason, every time Walls reaches the bottom left corner, the last two ticks of its turn say heading-prevHeading+10 is -339. --[[User:Starrynte|Starrynte]] 04:18, 16 September 2009 (UTC)
 
I have reproduced this numerous times already. Basically, when onScannedRobot is called my bot sets heading=(int)e.getHeading() . At the end of the onScannedRobot(), prevHeading=heading (for a pattern matcher). I put it in a battle with Walls. Most of the time, heading-prevHeading+10 is a normal amount. For some reason, every time Walls reaches the bottom left corner, the last two ticks of its turn say heading-prevHeading+10 is -339. --[[User:Starrynte|Starrynte]] 04:18, 16 September 2009 (UTC)
 +
 +
Sounds like just a normalization issue: getHeading() goes up to 360 before looping back around to zero. robocode.util.Utils.normalAbsoluteAngle(d) will normalize from 0 to 2 pi, and normalRelativeAngle from -pi to +pi (which is probably what you want). That's radians, though, so you'd have to convert back and forth, or write your own versions for degrees. --[[User:Voidious|Voidious]] 04:27, 16 September 2009 (UTC)

Revision as of 05:27, 16 September 2009

The following 2 comments are from the "Robocode/Welcome" talk page, before moving it to "Robocode".

This article should be merged with Robocode Basics. --AaronR 23:19, 12 November 2007 (UTC)

  • I agree, and thank you for doing the merge job. :-) I have just started putting stuff into this new Wiki, so I will continue extending the Robocode part of the Wiki with the old one provided here Robocode Online Help, but in a total updated version of course. My intension is that all the stuff I put in this new Wiki will contain all information about Robocode in the future, and then I will redirect the old web page to point on this new one, when it is finished. ;-) --FlemmingLarsen

The Wikipedia entry for Robocode

Somebody should update the http://en.wikipedia.org/wiki/Robocode page for Robocode some day. :-) --Flemming N. Larsen 23:31, 13 November 2007 (UTC)

1.7.1.2

I've been doing a bit of local testing, both with new and 'know problem' archaic bots (SandboxDT, SilverSurfer), and all the results seem to match 1.5.4. Also, it seems to run a LOT faster. I've been testing the rumble with UPLOAD=NOT and it also seems to match everything within what I would think is the margin of error. Can we have a consensus that 1.7.1.2 is safe for the rumble and challenges? --Skilgannon 19:15, 14 May 2009 (UTC)

I bet even 1.7.1.1 are ready for RoboRumble. I've been asked Darkcanuck about newer version and he said we should wait. One thing that change is survival score, 1.6.1.4 and earlier use 1st as survival score but 1.7.x use either survival or survival bonus score instead. » Nat | Talk » 23:32, 14 May 2009 (UTC)

Whoah, did the survival scoring really change? Man, I don't like that at all. I wouldn't support any scoring change being allowed into the RoboRumble. Where is there info about this?--Voidious 02:40, 15 May 2009 (UTC)
Indeed, the result doesn't change. (because it a percent) It just switch from 1st to survival bonus, which is the same for 1v1 battle (but not for melee rumble) Here are some result from my result file (1.7.1.1alpha)
roborumble,35,800x600,Nat_1711,1239165160631,SERVER
stelo.UnfoolableNano 1.0,2748,1475,900
robar.nano.BlackWidow 1.3,2685,1479,850
roborumble,35,800x600,Nat_1711,1239165163655,SERVER
robar.nano.BlackWidow 1.3,4848,2290,1750
sul.Pinkbot 1.1,640,640,0

The older version look like:

roborumble,35,800x600,Nat,1242355746718,SERVER
zyx.mega.YersiniaPestis 1.6.2.4,3746,1707,29
ak.Fermat 2.0,1529,1102,6
roborumble,35,800x600,Nat,1242355781553,SERVER
darkcanuck.Gaff 1.34,3559,1612,28
apv.AspidReloaded 0.6,2159,1638,7

Score in format total score, bullet damage, survival » Nat | Talk » 02:53, 15 May 2009 (UTC)

Ah, cool, thanks for that info. So it's just the representation that changed. I'll chill out now. =) --Voidious 03:08, 15 May 2009 (UTC)

He he, just found that 1.7.1.2 beta isn't ready yet, see http://robocode.svn.sourceforge.net/viewvc/robocode?view=rev&revision=2983 for more detail. Be should wait for final release before make it a rumble client. And, as I wrote this many times already, 1.7 is a LOT faster for sure. I've once run it with UPLOAD=NOT and I ran 60 battle/minute! » Nat | Talk » 23:41, 14 May 2009 (UTC)

Thanks for pointing out the scoring change, I didn't know about that. Do you know why it was done? I'd still consider this to be a bug, since it does change functionality without apparent cause. If we want the survival bonus it should be reported as a separate value.

1.7.1.1 wasn't ready because there were known bugs (e.g. melee rumble broken). Some of the movement gurus out might want to take a close look at 1.7.1.2 because the movement formulas were changed slightly to fix the quirks that Simonton had pointed out. Happily this new version does fix a problem with the rumble client that could cause mass removals and also adds smart battles for melee. --Darkcanuck 03:46, 15 May 2009 (UTC)

Oh! I am wrong, it is actually survival, not survival bonus. But we still can't use current beta for the bug that fixed in r2983. It's is your server now, you don't want the new way so it is a bug. I've a patch now, see if you want. » Nat | Talk » 04:41, 15 May 2009 (UTC)

Bug?

I have reproduced this numerous times already. Basically, when onScannedRobot is called my bot sets heading=(int)e.getHeading() . At the end of the onScannedRobot(), prevHeading=heading (for a pattern matcher). I put it in a battle with Walls. Most of the time, heading-prevHeading+10 is a normal amount. For some reason, every time Walls reaches the bottom left corner, the last two ticks of its turn say heading-prevHeading+10 is -339. --Starrynte 04:18, 16 September 2009 (UTC)

Sounds like just a normalization issue: getHeading() goes up to 360 before looping back around to zero. robocode.util.Utils.normalAbsoluteAngle(d) will normalize from 0 to 2 pi, and normalRelativeAngle from -pi to +pi (which is probably what you want). That's radians, though, so you'd have to convert back and forth, or write your own versions for degrees. --Voidious 04:27, 16 September 2009 (UTC)