Robocode is a free educational game[?] provided by IBM. It is designed to help people learn to program in Java and enjoy the experience. It is very easy to start - you can have your own bot within minutes—but it may take you months to perfect it.
The idea is that you write the software that controls a little tank which shoots at other tanks on the screen. The rules are very simple: you move, you shoot, you scan, you hit the walls if you aren't careful.
To get started download Robocode from:
http://robocode.alphaworks.ibm.com/installer/index.html
For more information look at the RoboWiki, a WikiWiki dedicated to Robocode:
http://robowiki.dyndns.org/
As a beginner you might want to start with:
http://robowiki.dyndns.org/?BeginnersFAQ
External links