- Set up the right flags for your system and torcs installation
- Run
python test_run.py --num_races=10
, which should print results of 10 (identical) races
Other flags for test_run.py
:
--log=INFO|DEBUG
--track_length=4
number of points for tracks--track_scale=10
range for generating points
TORCS_DIR = "/home/$USER/.torcs/"
TORCS_EXEC = "/usr/games/torcs"
RACE_CONFIG = "$PROJECT_DIR/templates/quickrace_template.xml"
RESULTS_DIR = "/home/$USER/.torcs/results/"
TRACKS_DIR = "/usr/local/share/games/torcs/tracks/evolution"
Ignore your changes to flags.py
, e.g. using git update-index --assume-unchanged flags.py
.
The directory torcs
contains modifications needed to collect some data, as well as fixes for bugs that prevent the original code from compiling.
- Download the "all-in-one" source package from the TORCS website
- Copy the contents of the
torcs
directory into the extracted source code - Follow the installation instructions
Before running the evolution:
- Set up
flags.py
- Prepare a JSON config file containing parameters for the evolution. Example files are provided in the
configs
directory.
Then you can run the script evolution.py
. You can call python evolution.py --help
for the list of available options.
Warning: be cautious of your disk space when the evolution is running, as some torcs processes fail to exit properly, which may lead to gathering large log files.