A collection of hints, tips, and advice from the Robocode masters
Factored wall avoidance
It's difficult to come up with an algorithm that keeps your bot out of the walls without getting it trapped in a corner or deviating too much from the desired movement direction. A simple solution is factored wall avoidance. In this tip, David McCoy shows you how to implement this handy technique.
Anti-gravity movement, in its many modified forms, is the movement type of choice for most expert Robocoders. With it you can define points on the map to avoid, easily create movement patterns, and dodge enemy bullets. Alisdair Owens shows you how to implement this helpful technique.
All successful targeting and shooting of enemy robots requires an alrogithm to fire bullets at the place where you predict that an opponent will be at a future point in time. In this tip, Simon Parker describes an algorithm that can be used for linear, circular, and oscillating predictive targeting.
Tracking your opponents' movement
Every targeting algorithm has limitations because there will always be some movement pattern that it has difficulty predicting. Learn how to make your bot select the best movement algorithm for each opponent.
Circular targeting is the next step after you've mastered linear targeting. Using slightly more advanced mathematics, this system allows you to hit robots that travel in circles with perfect accuracy, all the while retaining effectiveness against those that travel in straight lines. Alisdair Owens shows you how to implement this technique and provides an example bot to take out for a test drive.
To make a winning Robocode robot, you must be able to hit your opponent more than your opponent hits you. Making your robot target your opponent is a fine art, but what if your opponent couldn't target you? Using a simple trick and some guesswork, DodgeBot, listed here, shows you how to dodge bullets.
In this tip, learn how to make the most efficient use of your robot's radar, to get the most up-to-date information on your opponents' location.
Are you interested in setting up your own league for Robocode players? This article will tell you how Christian Schnell did it with his Roboleague.
Polymorphic enemy cache
Successful robots maintain a store of information, accessible at any time for making crucial decisions while in battle. This is useful for a variety of reasons, from enemy movement pattern analysis to determining whom to attack based on proximity and strength. This tip explains how you can implement an effective, fast enemy cache while having the convenience of an always up-to-date object using polymorphism.
Ray Vermette describes how he breaks up his Robocode robot up into modular, reusable pieces, each managing a different aspect of the robot's behavior.
This guide to Robocode strategies reveals the genesis of the Gladiatorial League and discusses the different strategy levels of movement, shooting, and gathering information.
Using the best aiming technique for each opponent requires obtaining accurate stats on which techniques work and which don't. In this tip, Ray Vermette shows you how to implement a BulletTracker class to do just that.
- See IBM Bluemix in action: In this demo, David Barnes shows you how to develop, create, and deploy an application in the cloud.