I believe that this is so because Walls stays on the outside, away from danger, where enemies only have 180 degrees of space in which to aim at Walls. I had anticipated that Walls would be a difficult opponent. My best guess as to what happened is that DeaconBlues was stuck in a corner at some point where Tracker should shoot at DeaconBlues while DeaconBlues was too focused on escaping to fight back. Losing to Tracker was a bit of a surprise. Since DeaconBlues moves along the walls, if SpinBot is also near a wall that DeaconBlues must pass by there will inevitably be some shots exchanged. The same problem exists for Crazy, but SpinBot has a more regular pattern. SpinBot is difficult to fight against largely because of the circular motion, which makes aiming difficult.
Nonetheless, DeaconBlues has an excellent record against the sample robots, with single defeats only to SpinBot, Tracker, and Walls. The results provided here may be slightly optimistic about the performance of DeaconBlues, as usually the scores are much closer.
As a result, DeaconBlues is aiming for the edge, not the center of the enemy, and thus from difficult angles misses are much more common for DeaconBlues.ĭeaconBlues can reliably beat any of the sample robots provided with Robocode. This is because DeaconBlues fires as soon as its radar detects the target, which is in the moment when the radar touches the edge of the enemy. Aside from quite possibly missing a moving target, this makes it difficult to hit even stationary targets at times. As mentioned in the Targeting section, DeaconBlues fires as soon as it sees its target. However, DeaconBlues does have a formula to determine the strength of its shots, accounting for factors such as enemy velocity, heading, bearing, and distance. The one aspect of targeting that DeaconBlues is reasonably competent in is remembering the characteristics of its targets the downside is that DeaconBlues must thus focus wholly on a single target or else invalidate all that information.ĭeaconBlues is somewhat weak in terms of firing, for the same reasons as its weakness in targeting. DeaconBlues also falls a bit short in selecting targets, though this is not as great a problem if DeaconBlues only has to deal with a single opponent at a time.
Without the working targeting system that I was hoping to develop, DeaconBlues must simply fire upon seeing an enemy and hope that it is still there when the bullet arrives. Unfortunately, targeting is one of the weak points in DeaconBlues. The hope is that doing so will result in a situation such as that in the picture below. However, when DeaconBlues detects an enemy that appears to be using a Walls strategy, it determines whether the enemy is moving clockwise or counterclockwise around the field and then goes in the opposite direction. When fighting against robots that are not Walls, DeaconBlues and Walls are virtually identical in their movement. This robot is described below.ĭeaconBlues moves in a pattern very similar to that of Walls in that it circles around the outer edge of the field. It also did not work, which was a significant problem.įortunately, I also had a backup plan for a robot that focused primarily on defeating Walls. It was fast, reasonably efficient, and only required knowledge of basic trigonometry to understand. I actually did manage to implement my system a few days before this writing. Of course, being able to track an enemy is useful for any target, not just against Walls. However, I spent most of the time from when I finished the Robocode katas until the present on developing a targeting system that would have been extremely valuable in any competitive robot. My objective in this project was to create a robot that could reliably defeat the sample Walls robot my understanding from my initial observations of Robocode was that Walls would be the most difficult to fight against. However, this robot does have the potential to succeed so long as circumstances are not too adverse. I use “competitive” in the loosest possible sense, of course this particular robot has difficulty even in defeating some of the sample robots. In continuation of my work on the Robocode and Ant katas, I have produced a competitive robot called “DeaconBlues” (though represented as “deaconblues” in Robocode itself) for use in the Robocode system.