On Robocode & Strategy

Days ago I’ve stumpled upon a programming game called Robocode while I was reading up AI.   Basically it is a platform for programming intelligent tanks that fight with each other. 

http://robocode.sourceforge.net/

After playing with it for a while, I discover the following to be true for heads-up battles:

1. It is always better to move around, this avoids targets.

2. It is always better to predict the movement of the enemy and shoot accordingly.

3. It is always better to travel at unpredictable angles and speeds so your enemy cannot predict your future position.

Having this in mind, I started designing my robot to avoid bullets and predict targets.

As it turns out, my robot comes out to be pretty intelligent.

Through implementing my robocode, I realize the following:

1. Each action has a strategic value, which is:

(My Benefit – My Cost) – (Opponent Benefit – Opponent Cost).

Although looks simple, this equation entails the impacts on future actions.

2. Some actions have higher strategic values than other actions.

3. Given the rules of the game, some actions would always have higher strategic value than other actions.

4. A working strategy comprises of a sequence of high-value actions.

5. Theories are important in finding out what needs to be done. (In robocode’s case, I have used trigonometry extensively).

6. Good execution skills are important to carry out what needs to be done. (In robocode’s case, good execution is good programming in Java).

These six points can be applied to any strategic settings, be it chess or business.   Of course, the games can be much more complex than robocode.  But the principles of strategy are the same.

One thought on “On Robocode & Strategy”

  1. Dog says:

    Hey Robocode guy! Up for a battle. I made some small modifications to the Walls sample robot and IT WORKS AMAZING! I’ll try to implement some of your suggestions into it too :-)

    Have you tried battling fenrir and Shadow??? They r some pretty advanced bots. I beat them 3 times I think (and they beat me like 9 times!!!)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>