Talk:Robocode
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)
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)
- [View source↑]
- [History↑]
You cannot post new threads to this discussion page because it has been protected from new threads, or you do not currently have permission to edit.
Contents
Thread title | Replies | Last modified |
---|---|---|
Keeping AdvancedRobot instance in static field | 5 | 03:36, 21 August 2018 |
Will onRobotDeath event miss due to skipped turns? | 10 | 13:44, 6 January 2018 |
1.9.3.0 related bugs | 0 | 05:08, 31 December 2017 |
Robocode Wikipedia Article | 0 | 14:44, 2 October 2014 |
1.9.0.0 | 0 | 21:12, 27 February 2014 |
When keeping AdvancedRobot instance in static field, robot will show warning:
Static references to robots can cause unwanted behaviour with the robot using these.
However I've been using this pattern (the way robocode can't detect, and I cannot avoid as well) since the first day I write robocode. However, robocode did not mention what's wrong with this pattern. Do anyone know what's the exact meaning of this warning?
I think the risk is that the static robot reference is not guaranteed to be valid after a given round, so if you don’t update the reference things may not work as expected.
Yes, that's also what I guess, and since I'm updating the reference every round, I guess it would not be a problem. However, since robocode did not say what unwanted behavior it is, I'm worrying about more problems: race condition (since each round you have a new thread), GC problem (no longer a problem since robocode cleans static field each battle) and more
Since you're updating it every round, why do you need it to be static?
because I’m simply making everything under a static variable, just like lazy singleton. The field itself is not static at all, but the field containing the field is static and has to be static. Diamond uses this style as well afak However the problem of static reference should happen to this style as well, since two approaches are fundamentally equivalent
onRobotDeath is crucial when dealing with multiple enemies. If this event were able to lost, it will be hard to guess that information back.
- If I understood correctly skipped turns happen when the bots passes the time limit. I think, after this event no actions are made(setAhead( ), setFire( etc.) and no events are called after it. I am 99 percent sure that if you call onRobotDeath first no skipped turns will harm it.
- Even if it stopped everything you did by not updating the robot, static variables wouldn't change.
I think all events (except the skip turn event) are lost when robocode punishes for long CPU use. I have no source confirmation for it. But I quite sure that event of enemy death can be lost. I recall adding a special check of enemy not being scanned for something like 10 tics to put it into the dead enemy category because, because I was occasionally missing the death event during the run. I also think you might even miss your own death event. I have a code which suppose to print some stats at such event, and I see that sometimes the output is not produced.
Yes, that's true. I did a quick experiment and found that onRobotDeath event do lost when experiencing heavy skipped turns.
So just add if (Math.random() < 0.7) { return; }
in onRobotDeath and see whether your bot totally breaks.
Anyway, I see some alive bot not getting scanned for 10+ ticks (when you skip turns, that could be easy to happen), are you handling this case correctly?
It should no be a problem if a "robot" reappear on scan, it is added back to the alive pool.
Hm, I could not find the code which is in charge of it. I vividly remember programming it several years ago. This might explain some quirks which I saw in melee, when my bot fires into a dead bot last seen location. I.e. if I miss robot death event, I still count enemy alive for quite a bit and keep firing at the "gost" till some timer expires.
well, firing at some "ghost" when missing onRobotDeath is unavoidable. Anyway we could set different timer for radar & gun. e.g. for radar, choose 8k ticks, where k is large enough to avoid marking alive bots as dead. And for guns, use a small k, e.g. 1, to avoid shooting at targets that we don't have new information.
I actually meant, if you call onDeath first and do not skip any turns in it it won't be lost. I am pretty sure that there can't be any skipped turns in onDeath.
It is still possible that you miss the turn the onDeath is created for by skipping from a previous turn.
While we are still not officially switching to 1.9.3.0, I found some new bugs introduced in 1.9.3.0 (comparing to 1.9.2.6).
My system: macOS 10.12 My robocode version: 1.9.3.0
UI bug:
- current robot score shown in right sidebar (the blue line) is incorrect
- radar scan arc is not shown correctly when it doesn't turn sometimes (it should be shown as a line, but is actually shown as it were a few ticks ago, when the radar was still turning).
Game logic related bug:
- when execute() is called before onDeath() is fired, this event will be missed and "SYSTEM: *** has dead" message will never be shown.
As FNL pointed out a good 7 years ago, we should rewrite the wikipedia article about robocode. Currently it is a very poorly designed and messy article. If anyone feels the same way, I suggest we set a few ground rules in regard to it.
First we should avoid mentioning specific authors or robots unless they are historically relevant. Having a ranking of the "best bots" is a terrible idea, since the article goes so long between being updated. We should especially try and avoid mentioning certain authors of certain techniques. Wikipedia readers likely don't care who made the first painting robot or who came up with wave surfing. At least as one offs.
We can of course include these in a history of robot design and techniques. But only so long as it is part of an actual article and not one liners of "Shadow (made by ABC) introduced wave surfing to the game." No one likely cares, especially since no one knows what the heck "wave surfing" even is. So such a thing needs to be explained in detail as part of the history if it is added at all.
Unfortunately I only know what has happened in Robocode since around mid 2006, so I can't easily write the early history.