Java AI – Robocode 2010

While in first year of college (2009) myself and another game development student Carl Lange entered into the Tipperary Games Fleadh RoboCode competition, which is where entrys use the RoboCode API to build robots in Java and then have them battle it out. With our robot which we developed in less then ten days before the competition, called Solomon. The source code is avaible on Google Code and its code design document is available at  Solomon design document

Artificial intelligence

Solomon was a simple state machine AI, which would learn over time by writing its learning outcomes to a file. It would select various different tactics from its tactic database. We tried to give it a good selectuion of aggressive tatatics, passtive avodiance tatics and all round general tatics. It would then learn which one was the best, based on its loss of health, enemy’s health, wins vs loses etc. It would then save the name of the robot to know that if it saw that robot again in battle to use tatic B straight away.  Unfortantly a day before the competition we where told that we couldn’t save info to a file between match’s, even though we previously been told we could. So our learning mechanise was limited to the knowledge it got while in battle, then its memory was rest after each match. Though we still managed to come joint 5th out of something like 17 colleges so we were happy enough.

Learning out comes

Well it was our first time using Java as in first year we used C#. Thought they are extremely similar so it was relatibitly easy. Our first expereicne working with AI and how to create a program that could learn from its expereicnes even if its a very basic type of learning. We had a great experiences at the event and we got a great seance of pride that we had finished something and it worked. One of our greatest learning out comes was working together in a team. This project was the first project myself and Carl worked on togtheier,  we worked well as a team and since we have gone on to work on various projects together most notebale the Flax Project and the Flax HTML5 Game Engine

Technologies & Skills used

  • Java
  • RobotCode API
  • OOP
  • AI ( Finaite state machine)
  • Source Code Management (SVN)


All content © Copyright 2024 by Ciarán McCann.