Skip to main content

Secrets from the Robocode masters: A collection of hints, tips, and advice from the Robocode masters

IBM developerWorks, IBM developerWorks, IBM
This article was created by the IBM developerWorks editorial staff.

Summary:  In this series of tips, the Robocode experts share their secrets of successful bot battle.

Date:  15 Jul 2002
Level:  Introductory
Activity:  8585 views

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
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.

Predictive targeting
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
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.

Dodge bullets
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.

Radar sweeps
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.

Roboleague
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.

Extensible/reusable robots
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.

Robocode strategies
This guide to Robocode strategies reveals the genesis of the Gladiatorial League and discusses the different strategy levels of movement, shooting, and gathering information.

Tracking bullets
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.


Resources

  • developerWorks: Hundreds of articles about every aspect of Java programming.

About the author

This article was created by the IBM developerWorks editorial staff.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Java technology
ArticleID=194663
ArticleTitle=Secrets from the Robocode masters: A collection of hints, tips, and advice from the Robocode masters
publish-date=07152002
author1-email=
author1-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers