Evolution client settings

Refer to examples/evolConf.txt to see the syntax.

Parameter Type/Options Default value Description
Simulator Configuration
simulatorConfFile path string n/a Specify the simulation configuration file (see Simulator settings) to be used. Note that this file and its dependencies (e.g. obstacle file, start position file) must be present at the specified path.  Required.
Basic Evolution Parameters
evolutionMode string: ‘full’ or ‘brain’ n/a Specify whether you want to do brain/body co-evolution (full) or evolve only the brain.  Required.
mu positive integer n/a Specify mu (μ) = number of parents.  [ (μ+/,λ) evolution strategy terminology ].  Required.

This is the number of individuals selected at each step of the evolution.

lambda positive integer n/a Specify lambda (λ) = number of offspring.  [ (μ+/,λ) evolution strategy terminology ].  Required

This is the number of new individuals generated from the parents at each step of the evolution. Lambda should be larger than or equal to mu. See ‘replacement’ below.

replacement string: ‘plus’ or ‘comma’ n/a Pick a replacement strategy.  Required.

In the case of “plus” replacement, the mu parents and lambda children are grouped together and ranked according to their measured fitness values, the top mu individuals are copied to the new population (elitism). This allows evolution to make sure that good solutions are not lost because of mutation or crossover. On the other hand, in the case of “comma” replacement, the mu parents are discarded, the lambda children are ranked, and the top mu of these are copied to the new population (lambda>=mu). This replacement strategy favors exploration.

numGenerations positive integer n/a Number of generations to evolve for.  Required.
selection string: ‘deterministic-tournament’  ‘deterministic-tournament’ Pick a selection strategy (‘deterministic-tournament’ is currently the only option).

Tournament selection consists of organizing a tournament among a small subset of individuals in the population for every offspring to be generated. The procedure starts by randomly picking k individuals from the population, where k is the tournament size. The individual with the best fitness among the individuals is selected, then all k individuals are put back into the population, and can take part in further tournaments. A new tournament is organized for each individual to be selected. This approach achieves a good compromise in maintaining both selection pressure and genetic diversity in the population.

Cited from Floreano, Dario, and Claudio Mattiussi. Bio-inspired artificial intelligence: theories, methods, and technologies. MIT press, 2008.
tournamentSize positive integer 2 Pick the tournament size for deterministic tournament selection.

This parameter determines the size of the tournament pools for selection of individuals. See ‘selection’ above. Setting the tournament size equal to lambda (in case of “comma” replacement) or mu+lambda (in case of “plus” replacement) gives a selection equivalent to truncated rank-based selection.

Evolving from an Existing Robot
referenceRobotFile path string n/a Specify an existing robot to evolve from. This is required for brain-only evolution and may optionally be provided for full evolution.
For brain only evolution just the body specified in this file will be considered unless useBrainSeed is set to true (see below), in which case the new population will be seeded with the brain of the reference robot. For full evolution, the population will be seeded with the body of the reference robot and again useBrainSeed must be set true to also seed the brains of the population.
useBrainSeed boolean false Set true to continue evolving from the provided brain instead of re-initialising. N.B. This only works with the basic EA, not with HyperNEAT.
NEAT Stuff
evolutionaryAlgorithm string: ‘Basic’ or ‘HyperNEAT’ ‘Basic’ Specify which evolutionary algorithm to use for brain evolution (HyperNEAT only works for brain evolution at the moment).
neatParamsFile path string n/a If using HyperNEAT you can set the HyperNEAT params in a separate file, otherwise default values will be used.  See https://github.com/peter-ch/MultiNEAT
Brain Variation Probabilities and Magnitudes
pBrainMutate real value in [0.0, 1.0] n/a Specify the mutation probability for each brain parameter. Required.
brainSigma positive real value n/a Sigma of Gaussian distribution used for brain parameter mutations.  Must specify either brainSigma or (weightSigma and biasSigma) (and sigmas for other brain params).
brainBounds real value range min:max n/a Bounds of brain parameters.  Must specify either brainBounds or (weightBounds and biasBounds) (and sigmas for other brain params).
weightSigma positive real value n/a Sigma of Gaussian distribution used for weight mutations (can specify this and biasSigma instead of using brainSigma)
weightsBounds real value range min:max n/a Bounds of brain weights (can specify this and biasBounds instead of using brainBounds)
biasSigma positive real value n/a Sigma of Gaussian distribution used for bias mutations (can specify this and weightSigma instead of using brainSigma)
biasBounds real value range min:max n/a Bounds of brain biases (can specify this and weightBounds instead of using brainBounds)
tauSigma positive real value 0.1 Sigma of Gaussian distribution used for tau mutations (if using CTRNNs, N.B. CTRNNs are currently an experimental feature and are not included in the distributed versions of RoboGen)
tauBounds real value range min:max 0.1:0.5 Bounds of brain taus (if using CTRNNs, N.B. CTRNNs are currently an experimental feature and are not included in the distributed versions of RoboGen)
periodSigma positive real value 0.2 Sigma of Gaussian distribution used for period mutations (for oscillators).  Defined in terms of seconds.
periodBounds real value range min:max 0.0:2.0 Bounds of oscillator periods.  Defined in terms of seconds.
phaseOffsetSigma positive real value 0.4 Sigma of Gaussian distribution used for phase offset mutations (for oscillators).  Defined in terms of # periods.
phaseOffsetBounds real value range min:max -1.0:1.0 Bounds of oscillator phase offsets. Defined in terms of # periods.
amplitudeSigma positive real value 0.2 Sigma of Gaussian distribution used for amplitude mutations (for oscillators). Relative to [0,1]
amplitudeBounds real value range min:max 0.0:1.0 Bounds of oscillator amplitudes.  Must be a sub-interval of [0,1]
pBrainCrossover real value in [0.0, 1.0] 0.0 Probability of 1-point-crossover.  N.B.  Currently crossover is not supported when either doing full body evolution or when pAddHiddenNeuron > 0
pAddHiddenNeuron real value in [0.0, 1.0] 0.0 Probability of adding a hidden neuron (will be added to the core component).  N.B.  Cannot have pBrainCrossover > 0 && pAddHiddenNeuron > 0
pOscillatorNeuron real value in [0.0, 1.0] 0.0 Probability of new hidden or motor neuron being an oscillator.
Body Variation Parameters
numInitialParts int range min:max 2:10 Number of initial body parts (not including core component) for full evolution.
addBodyPart string or character representing body part n/a Add parts to be used in body evolution, can add many parts on separate lines, or ‘All’ to use all parts. For individual parts you can either use the single-character part codes or the full name in CamelCase (see Guidelines for writing a robot text file).  If doing body evolution it is required to define at least one allowed body part to add.
maxBodyParts positive integer 100000 Maximum number of body parts allowed.  Defaults to 100000, an unreasonably large value.
maxBodyMutationAttempts positive integer 100 Max number of body mutation attempts before giving up.
bodyParamSigma positive real value 0.1 Sigma of Gaussian mutation used for body param mutation (all params scaled to be in [0,1]).
pSubtreeRemove real value in [0.0, 1.0] 0.0 Probability of removing a sub-tree from the body representation tree.
pSubtreeDuplicate real value in [0.0, 1.0] 0.0 Probability of duplicating a sub-tree in the body representation tree.
pSubtreeSwap real value in [0.0, 1.0] 0.0 Probability of swapping two sub-trees in the body representation tree.
pNodeInsert real value in [0.0, 1.0] 0.0 Probability of add a node (part) to the body representation tree.
pNodeRemove real value in [0.0, 1.0] 0.0 Probability of removing a node (part) from the body representation tree.
pParameterModify real value in [0.0, 1.0] 0.0 Probability of modifying a parameter of a parametric part.
Server Locations (for Desktop Version)
socket IP:port n/a socket at which the evolution engine can communicate with already running server processes. This parameter can be specified multiple times for parallelization. Only applicable for the desktop version.  See below.

Parallelization of evaluations

Parallelizing evaluations will reduce evolution processing time proportional to the degree of parallelization! You can easily parallelize evaluations by specifying multiple sockets and launch simulator processes on those sockets before launching evolution. The optimal number of processes depends on the number of cores on your CPU. You can determine that amount by…

  • Windows: Opening the task manager
  • Mac and Linux: Opening the system monitor

Choose one process per core. It might also be good to have one process less, depending on what else you’re running on your computer at the same time.

RoboGen Online:

To parallelize evaluations on your own computer simply click on the “Computation Tasks” tab, and move the slider bar to be the number of parallel processes you want to use. If you would like to parallelize across machines, you should decide on a group name, click “Join”, and then choose this group as the one to publish experiments to.  Then on other computers you can join the same group, which will pool their computational resources.

Additionally, you can join the “public” group to benefit from other users and cloud compute nodes!

Desktop version:

If you have multiple computers on a local network, you can parallelize over the network (EPFL WiFi qualifies!). To figure out the local IP address of a computer, type into your command line:

  • ifconfig on Windows
  • ipconfig on Mac and Linux

The first IP address (except what resembles 255.255.*.*) should be the local IP address of your computer. The following configuration file lines correspond to a combined local and network parallelization:

socket=127.0.0.1:8001
socket=127.0.0.1:8002
socket=192.168.1.103:8001
socket=192.168.1.103:8002

Note: 127.0.0.1 is the self-referring IP address. 192.168.1.* is an IP address typical for home networks.

Simulator settings

The simulator settings are subdivided into 4 files: A main configuration file (required), and optionally an obstacle configuration file, a starting position configuration file, and a light source file. Only the former is handed to the simulator as it specifies the other three files.

Main configuration file

This file is to be filled out in the same format as the configuration file of the evolution engine.  N.B.  Some of these options are new, so if you are using an older version of RoboGen the options may be different.  It is recommended that you upgrade.

Parameter Type/Options Default value Description
Scenario
scenario string: ‘racing’, ‘chasing’, or the path of a JavaScript file defining a custom scenario n/a Chooses the scenario. See http://robogen.org/docs/robogen-software-suite/#Target_scenarios for more information about scenarios.  Required.
Time
timeStep positive real value  n/a Time step of the simulation in seconds. The smaller it is, the less error prone the simulation, but the longer it takes to simulate the same amount of time. Required.
nTimeSteps positive integer n/a Number of time steps executed by the simulator in order to evaluate fitness.  One of nTimeSteps or simulationTime must be specified.
simulationTime positive real value n/a Total length of simulation in seconds. Must be a multiple of timeStep One of nTimeSteps or simulationTime must be specified.
actuationFrequency positive integer See description Actuation frequency of the controller in Hz.  Inverse of actuationFrequency must be a multiple of timeStep.  If not provided then will actuate every time step (N.B. this is unrealistic for the real hardware).
Terrain
terrainType string: ’empty’, ‘flat’, or ‘rugged’ n/a Type of terrain.  ’empty’ implies an empty terrain (no ground), ‘flat’ implies an infinite plane, and ‘rugged’ allows defining a terrain with a height field (N.B.  using rugged terrains is an experimental feature, which has been disabled in the web version of roboGen).  Required.
terrainHeightField path string n/a Path of a bitmap file defining the height field for rugged terrains.  Required if terrainType=rugged.
terrainHeight positive real value n/a Height of highest point of rugged terrain.  Required if terrainType=rugged.
terrainLength positive real value n/a Terrain length in meters.  If terrainType=rugged, the defined height field is scaled to this length.  If terrainType=flat currently only influences the length of the rendered ground as flat terrains are simulated as an infinite plane).  Required.
terrainWidth positive real value n/a Terrain width in meters.  If terrainType=rugged, the defined height field is scaled to this width.  If terrainType=flat currently only influences the width of the rendered ground as flat terrains are simulated as an infinite plane).  Required.
terrainFriction positive real value n/a Friction coeffecient between the ground/obstacles and the robot.  Required.
Physics
gravity real value -or- three comma separated real values 0,0,-9.81 Gravity: either a single z-value for g=(0,0,z) or x,y,z (comma separated) for full g vector. Specified in m/(s^2).  Defaults to (0,0,-9.81)
Obstacles and Light Sources
obstaclesConfigFile path string n/a Path to the obstacles configuration file (if obstacles should be added to the simulation).  See Obstacles configuration file.
lightSourcesConfigFile path string n/a Path to the light sources configuration file (if light sources should be added to the simulation).  See Light sources configuration file.
Start Positions / Multiple Evaluations
startPositionConfigFile path string See description Path to the start position configuration file.  See Starting position configuration file.  If not provided will use a single evaluation with the robot starting at the origin, and having 0 azimuth.
Noise
sensorNoiseLevel positive real value 0 Sensor noise level: Gaussian with std dev of sensorNoiseLevel * actualSensorValue.
i.e. value given to Neural Network is N(a, a * s) where a is the actual sensor value and s is the  sensorNoiseLevel
motorNoiseLevel positive real value 0 Motor noise level: uniform in range +/- (motorNoiseLevel * actualMotorValue)
Constraint Handling
capAcceleration boolean false Flag to enforce acceleration cap. Useful for preventing unrealistic behaviors / simulator exploits
maxLinearAcceleration positive real value 15.0 Maximum magnitude of linear acceleration (if capAcceleration is true).
maxAngularAcceleration positive real value 25.0 Maximum magnitude of angular acceleration (if capAcceleration is true).
maxDirectionShiftsPerSecond integer See description Maximum number of directions shifts per second for testing motor burnout. If not set (or set to -1) then there is no cap.
disallowObstacleCollisions boolean false Flag to enforce no obstacle collisions.  If true then any obstacle collision will be considered a constraint violation.
obstacleOverlapPolicy string: ‘removeObstacles’, ‘constraintViolation’, or ‘elevateRobot’ ‘removeObstacles’ Defines the policy for handling obstacles enclosed in the robot’s initial axis aligned bounding box (AABB).  Options are

  • ‘removeObstacles’ — obstacles will be removed, and the simulation will proceed (default).
  • ‘constraintViolation’ — the simulation will be terminated with a constrain violation.
  • ‘elevateRobot’ — the robot will be elevated to be above all obstacles before the simulation begins.


Obstacles configuration file

Use this file to specify obstacles in Robogen. For every obstacle, write a line that contains six space-separated values:

x-position y-position x-length y-length z-length density 

The specified position will be the position of the center of the obstacle. The density will determine obstacle mass. If 0, the obstacle will be fixed to the environment and can’t be moved by the robot.

Obstacles can also be defined using two alternative formats.

You can have a line that contains seven space-separated values:

x-position y-position z-position x-length y-length z-length density

This will allow you to create obstacles that are not necessarily touching the ground.

You can also have a line containing eleven space-separated values:

x-position y-position z-position x-length y-length z-length density x-rotation y-rotation z-rotation rotation-angle

This allows you to have obstacles that are rotated (not necessary axis-aligned). Rotations are specified using an Axis-angle representation [1], where x-rotation, y-rotation, z-rotation define a unit vector about which the box is rotated by rotation-angle (specified in radians).

Starting position configuration file

Use this file to define one or several robot starting positions. If you specify several, each one will be evaluated (which will increase your evolution runtime linearly!). However, it is often important to define at least a couple of different starting positions to avoid evolution for a specific starting position.

For each starting position, write a line containing three space-separated values:

x-position y-position azimuth

where the azimuth is specified in degrees [0,360].

If no starting position configuration file is provided then the robot will start at the origin with an azimuth of 0 degrees.

Light sources configuration file

Use this file to define light sources.  For every light source, write a line that contains either three or four space separated values

x-position y-position z-position [intensity]

defining the position of the light source and optionally it’s intensity.  If intensity is not specified it will default to 1.0.