Skip to content

Generated program command line options

zeFresk edited this page Jun 26, 2023 · 7 revisions

All command line options follow the usual standards of such options. For boolean options (flags), if the default value is true, setting the flag will set the option to false and reciprocally. A value can be forced by specifying the boolean value which is expected by using the syntax --flag=true or --flag=1. Some options require a following argument of a certain type, these options should be used like this : --opt 15.0 or --opt=yes. If the program can’t parse the command line options provided it will display an error message.

The following options are available when running a generated program :

Help

  • --help : show all available options

Algorithm parameters

Main parameters

  • --popSize INT : set the population size to N individuals.

  • --nbOffspring REAL : set the offspring population size. If > 0 and < 1 it is a proportion of the parent population.

  • --nbGen INT : Maximum number of generations used in stopping criterion.

  • --seed INT : Random seed used for reproducibility[1].

  • --survivingParents FLOAT : Proportion of surviving parents.

  • --survivingOffspring FLOAT : Proportion of surviving children.

  • --elite INT : Number of best N individuals to use for elitism, see --eliteType below for more information on elitism.

  • --eliteType INT : Type of elitism[2] 1 for strong elitism, 0 for weak elitism.

  • --selectionOperator STRING : Selection operator [3] to be used for crossovers. Available operators are : Tournament, Random, Deterministic, Roulette.

  • --selectionPressure FLOAT : Parameter used for the selection operator [3] set with --selectionOperator.

Stopping criterions

  • --timeLimit INT : Maximum number of seconds to execute the program for in stopping criterion. 0 means unlimited.

Fine reduction control

  • --reduceParentsOperator STRING : Selection operator [3] used for reducing parent population. Available operators are the same as --selectionOperator.

  • --reduceOffspringOperator STRING : Selection operator [3] used for reducing offspring population. Available operators are the same as --selectionOperator.

  • --reduceFinalOperator STRING : Selection operator [3] used for reducing final population. Available operators are the same as --selectionOperator.

  • --reduceParentsPressure FLOAT : Parameter used for the selection operator [3] set with --reduceParentsOperator.

  • --reduceOffspringPressure FLOAT : Parameter used for the selection operator [3] set with --reduceOffspringOperator.

  • --reduceFinalPressure FLOAT : Parameter used for the selection operator [3] set with --reduceFinalOperator.

Stochastic evaluations

  • --alwaysEvaluate : Flag used for stochastic evaluations, do not use previously calculated fitness for identical individuals.

Miscellaneous

  • --optimiseIterations INT : Number of optimisations iterations to perform.

  • --baldwinism Flag to use the Baldwin effect. Mostly without effect as of now.

Island model

More informations on the island model are available on this dedicated page : Wiki: Island model.

  • --remoteIslandModel : Flag to use the island model.

  • --ipFile PATH : Path to a file containing the addresses (IP or hosts) of other islands.

  • --migrationProbability FLOAT : Probability to send an individual to another island after each generation.

  • --serverPort INT : UDP port this program will listen for sent individuals on.

  • --reevaluateImmigrants : Flag to set for forcing received individuals to be reevaluated.

Performance & Parallelism

  • --nbCPUThreads INT : Number of threads used. (Default: 1)

  • --fstgpu INT : ID of the first GPU to use for computation.

  • --lstgpu INT : ID of the first GPU NOT used for computation.

Report and logging

Note: Some of these options take an integer 0/1 as a parameter because they override .ez parameters.

  • --noLogFile : Flag to turn off .log file output.

  • --silentNetwork : Don’t print information on network related tasks.

  • --printInitialPopulation : Flag to Print all of the initial population.

  • --printFinalPopulation : Flag to print all of the final population.

  • --printStats : Flag to enable stats printing.

  • --plotStats : Flag to enable 2D live plot.

  • --generateCSVFile : Flag to enable export of stats export to a CSV file.

  • --generatePlotScript : Flag to enable .plot file export of stats.

  • --generateRScript : Flag to enable generation of .R file containing stats.

Save and load from save

Note: Some of these options take an integer 0/1 as a parameter because they override .ez parameters.

  • --savePopulation : Flag used to require saving of final population a file defined with --outputFile.

  • --startFromFile : Flag used to load start population from file defined with --inputFile.

  • --outputFile PATH : Path to the save file WITHOUT EXTENSION. (default: program)

  • --inputFile PATH : Path to the save file to load from WITH EXTENSION. (default: program.pop)

Communication with user defined functions

  • --uN STRING : with N = 1,2,3,4,5. Forward argument to user programfootnote::[These arguments are available using setVariable("uN", "default value if arguments wasn’t provided.").


1. Results are not perfectly reproducible if parallelism (2+ threads or GPU) is used
2. Strong elitism means that all N best parents will be kept. Weak elitism means that up to the N best parents better than the N best children will replace the worst children.
3. Selection operators are described here : Wiki: selection operators