[Home]MapleValley

Robo Home | Changes | Preferences | AllPages

Showing revision 6
Introduction (22-04-2004): Hi. I'm a software engineer who is having a look at this robot programming as a fun way to get into a bit of java programming. I'm new to this very interesting wiki concept, and also totally new to robot programming. So far, my accomplishments are to install the robocode, watch various sample bots fight each other, and then compile a robot of my own that doesn't do anything, except skip turns and print some stuff to std.out on run() and on some events. Be afraid, be very afraid. ;-)

After having browsed through a good part of this site, some of the robocode documentation, and some source code for various robots, I have a couple of questions.

Looking at battles with visible scan arcs, and from the discussions on this site, it seems that the radar has a scan arc with a variable width. Even though I tried looking through the source code of a couple of bots (like VeriLeach?) which I think adjusts the width of the radar scan arc, I can't see how it is done. Either I'm dense, or just confused.

Assuming that the scan arc can be adjusted: On a successful scan of a robot, the scan event returns a lot of information on the target. See the ScannedRobotEvent in the documentation. Among this info we get the bearing and distance to the target, as well as the heading and velocity of the target. Given this information, we have effectively pinpointed the target 100% accurately, which means we have to re-scan the target each turn to update the information, but we don't need to narrow the scan arc to pinpoint it, so why would anyone ever want to use a scan arc which is narrower than the maximum possible scan arc width?

I have probably mis-understood some of this radar scan stuff, so if anyone can explain it to me, that would be great.

People do it because it looks cool. Personally, I find that double-scanning an enemy really messes me up, depending on my scanner implementation. Therefore, I'm stuck using the suckier implementation rather than the cooler one (imo). --Goofy

The width of the scan arc is the angular difference between the last tick's radar direction and the current one. It can be anything between 0 (most of the sample bots never move the radar) and 45 degrees (or more if you also turn the gun/robot). The only thing you need to make sure is that the enemy can't "escape" your scan arc, the width is irrelevant. Most narrow scanning bots do so because of codesize restrictions, mostly mini/micro/nano bots, or even taste. -- ABC

I agree. The goal is to make a scanner that is as stable at delivering one scan per tick as possible. To me the scanner of Aristocles and most other of my bots deliver this. It's the infinite radar with carefully tuned parameters. (I found it in one of Kuuran's nanos and tweaked it and the result was the most stable radar I have yet succeeded in creating.) The scan arc width of this radar varies a lot. Which together with the performance proves ABC's statement that the width is irrelevant. -- PEZ

Thanks a lot! I was thinking of the scanner as having a cone shape, but in reality it is more like a real radar where a line sweeps clockwise or counterclockwise, and the arc we see is just the area covered from turning the radar in the last tick. Things make a lot more sense now. -- MapleValley


Robo Home | Changes | Preferences | AllPages
Edit revision 6 of this page | View other revisions | View current revision
Edited April 22, 2004 22:39 EST by MapleValley (diff)
Search: