Evolution client settings
Refer to examples/evolConf.txt to see the syntax.
|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.|
This is the number of individuals selected at each step of the evolution.
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 k 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.
||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
|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
|brainBounds||real value range min:max||n/a||Bounds of brain parameters. Must specify either
|weightSigma||positive real value||n/a||Sigma of Gaussian distribution used for weight mutations (can specify this and
|weightsBounds||real value range min:max||n/a||Bounds of brain weights (can specify this and
|biasSigma||positive real value||n/a||Sigma of Gaussian distribution used for bias mutations (can specify this and
|biasBounds||real value range min:max||n/a||Bounds of brain biases (can specify this and
|tauSigma||positive real value||
||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||
||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||
||Sigma of Gaussian distribution used for period mutations (for oscillators). Defined in terms of seconds.|
|periodBounds||real value range min:max||
||Bounds of oscillator periods. Defined in terms of seconds.|
|phaseOffsetSigma||positive real value||
||Sigma of Gaussian distribution used for phase offset mutations (for oscillators). Defined in terms of # periods.|
|phaseOffsetBounds||real value range min:max||
||Bounds of oscillator phase offsets. Defined in terms of # periods.|
|amplitudeSigma||positive real value||
||Sigma of Gaussian distribution used for amplitude mutations (for oscillators). Relative to [0,1]|
|amplitudeBounds||real value range min:max||
||Bounds of oscillator amplitudes. Must be a sub-interval of [0,1]|
|pBrainCrossover||real value in [0.0, 1.0]||
||Probability of 1-point-crossover. N.B. Currently crossover is not supported when either doing full body evolution or when
|pAddHiddenNeuron||real value in [0.0, 1.0]||
||Probability of adding a hidden neuron (will be added to the core component). N.B. Cannot have
|pOscillatorNeuron||real value in [0.0, 1.0]||
||Probability of new hidden or motor neuron being an oscillator.|
|Body Variation Parameters|
|numInitialParts||int range min:max||
||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.|
||Maximum number of body parts allowed. Defaults to 100000, an unreasonably large value.|
||Max number of body mutation attempts before giving up.|
|bodyParamSigma||positive real value||
||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]||
||Probability of removing a sub-tree from the body representation tree.|
|pSubtreeDuplicate||real value in [0.0, 1.0]||
||Probability of duplicating a sub-tree in the body representation tree.|
|pSubtreeSwap||real value in [0.0, 1.0]||
||Probability of swapping two sub-trees in the body representation tree.|
|pNodeInsert||real value in [0.0, 1.0]||
||Probability of add a node (part) to the body representation tree.|
|pNodeRemove||real value in [0.0, 1.0]||
||Probability of removing a node (part) from the body representation tree.|
|pParameterModify||real value in [0.0, 1.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.
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!
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.
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.
|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
|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
|terrainHeight||positive real value||n/a||Height of highest point of rugged terrain. Required if
|terrainLength||positive real value||n/a||Terrain length in meters. If
|terrainWidth||positive real value||n/a||Terrain width in meters. If
|terrainFriction||positive real value||n/a||Friction coeffecient between the ground/obstacles and the robot. Required.|
|gravity||real value -or- three comma separated real values||
||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.|
|sensorNoiseLevel||positive real value||
||Sensor noise level: Gaussian with std dev of
i.e. value given to Neural Network is N(a, a * s) where a is the actual sensor value and s is the
|motorNoiseLevel||positive real value||
||Motor noise level: uniform in range +/- (
||Flag to enforce acceleration cap. Useful for preventing unrealistic behaviors / simulator exploits|
|maxLinearAcceleration||positive real value||
||Maximum magnitude of linear acceleration (if
|maxAngularAcceleration||positive real value||
||Maximum magnitude of angular acceleration (if
|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.|
||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
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 , 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.