ROBOT REGISTRATION (MAX 4)
TOURNAMENT PROTOCOLS
ROBOT PROGRAMMING INTERFACE
DOCUMENTATION & COORDINATE SPECS
ARENA COORDINATE SYSTEM
The battle arena dimensions are 1000 x 1000 units.
- Origin (0, 0): Bottom-Left corner.
- Upper Limits (1000, 1000): Top-Right corner.
- Angles run 0 to 359 degrees counter-clockwise:
- 0° = East (Right)
- 90° = North (Up)
- 180° = West (Left)
- 270° = South (Down)
ROBOT CLASS DEFINITION
Your Python script must declare a class named RobotAI containing a tick(self, robot) method executed once per frame.
class RobotAI:
def __init__(self):
# Optional: Initialize custom persistent variables
self.target_heading = 90
def tick(self, robot):
# Commands executed once per simulator frame
robot.drive(self.target_heading, 80)
PROPERTIES
CONTROL METHODS
Sets target heading (0-359°) and speed (0-100%). Hulls rotate at 4°/tick. Accelerates at 1.5%/tick²; decelerates at 3.0%/tick².
Rotates turret towards specified heading (0-359°). Turrets turn at 10°/tick independently from the hull.
Fires a shell exploding at the given range (50-700 units). Returns True if fired, or False if weapon is reloading. Reload takes 30 ticks.
Sweeps radar in a slice of resolution degrees (max 20) around angle. Returns distance to closest bot in that sector, or None.
Prints a message to the debugging console at the bottom, colored in the robot's color.
ENVIRONMENT EVENT HANDLERS
Define these optional methods in your RobotAI class to make your robot dynamically react to external environment events:
Triggered when your robot collides with any of the perimeter walls. Wall strikes deal 2 damage and reset speed to 0.
Triggered when your robot collides with another combat robot. Collisions deal 5 damage to both robots and reset speeds to 0.
Triggered when your robot takes splash damage from an exploding shell. It receives the damage amount (int) and the name of the attacker (string) who fired the shell.
LICENSE
This project is open-source software, released under the terms of the GNU General Public License version 3 (GPLv3).
You can view the full license terms here: View LICENSE File.