Create robocode robots, using genetic programming.
The configuration of the simulation happens inside a .properties file. This file controls the current run of the simulation as well as the general configuration of the simulation project.
An extensive and documented configuration can be found under default.properties.
As of now there are three possibilities to run the application:
Run the simulation until the termination condition is met.
de.algoristic.evocode.EvocodeApplication
-m,--mode run
-p,--project /absolute/path/to/your/config.propertiesCompile a specific individual to its default target directory.
de.algoristic.evocode.EvocodeApplication
-m,--mode compile
-p,--project /absolute/path/to/your/config.properties
-g,--generation generation number
-i,--individual individual numberCompile and run the test for a specific individual. (Delete all generated resources afterwards.)
de.algoristic.evocode.EvocodeApplication
-m,--mode test
-p,--project /absolute/path/to/your/config.properties
-g,--generation generation number
-i,--individual individual number
-v,--visualize [optional] set flag to display the battleDownload robocode from sourceforge.net.
Install robocode to C:\robocode, using java -jar robocode-installer.x.y.z.jar.
In C:\robocode\robocode.bat adjust the lines depending on your Java version. Test run via robocode.bat or from start menu.
Follow the guide Create a project on robowiki.
-
Add
C:\robocode\libs\robocode.jaraccording to guide. -
Link javadoc according to guide.
Also add the robocode.api at correct version to pom.xml for your convenience.
In robocode under Options > Preferences > Development Options add your Eclipse project. In Eclipse follow the guide Running from Eclipse to make your robots runnable and debuggable from Eclipse.
Check, if this problem occurs: https://stackoverflow.com/a/70600427.
You may have wondered why there is no support for concurrency/multi-threading. Well, I have also tried around with this - in fact there is no way to run multiple instances of the robocode engine (API) in eclipse. You may instantiate multiple objects, but there will be always one underlying factory, performing all tasks, resulting in no improvement in performance…