This repository aims to store studies about the Robocode game, which involves developing a robot in Java for battles against other robots.
The intention is to maintain this repository as a study and reference site for anyone who wants to learn about the game, from basic to advanced levels.
Any contribution is welcome!
This project serves as a comprehensive boilerplate and educational resource for students and enthusiasts looking to dive into Robocode. It provides a structured approach to learning various aspects of robot programming, from fundamental movement and targeting techniques to advanced AI implementations.
- Java Development Kit (JDK): Ensure you have a JDK installed (Java 8 or higher is typically required).
This project uses a Makefile to simplify the build process. The installation of Robocode and running battles is a manual process.
Step 1: Install Robocode Manually
- Run the
install.shscript to download and extract Robocode into arobocode_localdirectory.bash install.sh
Step 2: Build and Package Your Robot
- Use the
makecommand to compile your robot and package it into a JAR file.make package
Step 3: Install Your Robot
- This command copies your robot's JAR file into the Robocode
robotsdirectory.make install
After installing your robot, you must start and run battles from the Robocode GUI.
- Start Robocode: Run the
robocode.sh(on Linux/macOS) orrobocode.bat(on Windows) script from inside therobocode_localdirectory. - Create a New Battle: In the Robocode application, go to
Battle -> New. - Add Your Robot: Find
mega.Boilerplate 1.0in the list of robots and add it to the battle. You can add multiple instances or other sample robots to fight against. - Start Battle: Click the "Start Battle" button.
To get benchmark results, create a battle with 10 instances of mega.Boilerplate 1.0 for 100 rounds, run it, and manually record the final scores here.