The source code for the competition is written in Java, and one format for competition entries will be Java classes. However, we welcome submissions in any programming language
as long as you do the work of interfacing your code to ours, and provide us with a simple, self-contained way of running your code. What follows below is a description of the most important interfaces in the package "simplerace" in the source code
The interface you will extend when you write your own java controller is Controller
. Its method public int control (SensorModel inputs)
is called every timestep, supplying the controller with fresh information and expecting a, integer control command in return. The values of the control command are specified in Constants
What's being passed to the controller is an object implementing the interface SensorModel
. This provides a number of methods giving information on your car, the opponent car and the waypoints. The methods are divided into methods giving ego-centric / first-person information, and Newtonian / third-person information, and there is a lot of redundancy between the methods. Your controller can access as many or as few of these methods as you deem necessary.
If you want to evolve a controller from your own representation, you might want to implement the Evolvable
interface. The two important methods here are mutate
, which should change something in your controller, and copy
, which should return a complete deep copy of your controller.
Thanks to Pete Burrow and Aravind Gowrisankar for helping in testing the code for bugs, and for useful suggestions.