Consts – constants module

Pyevolve have defaults in all genetic operators, settings and etc, this is an issue to helps the user in the API use and minimize the source code needed to make simple things. In the module Consts, you will find those defaults settings. You are encouraged to see the constants, but not to change directly on the module, there are methods for this.

General constants

Consts.CDefPythonRequire
The mininum version required to run Pyevolve.
Consts.CDefLogFile
The default log filename.
Consts.CDefLogLevel
Default log level.
Consts.sortType

Sort type, raw or scaled.

Example:
>>> sort_type = Consts.sortType["raw"]
>>> sort_type = Consts.sortType["scaled"]
Consts.minimaxType

The Min/Max type, maximize or minimize the evaluation function.

Example:
>>> minmax = Consts.minimaxType["minimize"]
>>> minmax = Consts.minimaxType["maximize]
Consts.CDefESCKey
The ESC key ASCII code. Used to start Interactive Mode.
Consts.CDefRangeMin
Minimum range. This constant is used as integer and real max/min.
Consts.CDefRangeMax
Maximum range. This constant is used as integer and real max/min.

Selection methods constants (Selectors)

Consts.CDefTournamentPoolSize
The default pool size for the Tournament Selector (Selectors.GTournamentSelector).

Scaling scheme constants (Scaling)

Consts.CDefScaleLinearMultiplier
The multiplier of the Linear (Scaling.LinearScaling) scaling scheme.
Consts.CDefScaleSigmaTruncMultiplier
The default Sigma Truncation (Scaling.SigmaTruncScaling) scaling scheme.
Consts.CDefScalePowerLawFactor
The default Power Law (Scaling.PowerLawScaling) scaling scheme factor.

Population constants (GPopulation.GPopulation)

Consts.CDefPopSortType
Default sort type parameter.
Consts.CDefPopMinimax
Default min/max parameter.
Consts.CDefPopScale
Default scaling scheme.

1D Binary String Defaults (G1DBinaryString.G1DBinaryString)

Consts.CDefG1DBinaryStringMutator
The default mutator for the 1D Binary String (G1DBinaryString.G1DBinaryString) chromosome.
Consts.CDefG1DBinaryStringCrossover
The default crossover method for the 1D Binary String (G1DBinaryString.G1DBinaryString) chromosome.
Consts.CDefG1DBinaryStringInit
The default initializator for the 1D Binary String (G1DBinaryString.G1DBinaryString) chromosome.
Consts.CDefG1DBinaryStringUniformProb
The default uniform probability used for some uniform genetic operators for the 1D Binary String (G1DBinaryString.G1DBinaryString) chromosome.

1D List chromosome constants (G1DList.G1DList)

Consts.CDefG1DListMutIntMU
Default mu value of the 1D List Gaussian Integer Mutator (Mutators.G1DListMutatorIntegerGaussian), the mu represents the mean of the distribution.
Consts.CDefG1DListMutIntSIGMA
Default sigma value of the 1D List Gaussian Integer Mutator (Mutators.G1DListMutatorIntegerGaussian), the sigma represents the standard deviation of the distribution.
Consts.CDefG1DListMutRealMU
Default mu value of the 1D List Gaussian Real Mutator (Mutators.G1DListMutatorRealGaussian), the mu represents the mean of the distribution.
Consts.CDefG1DListMutRealSIGMA
Default sigma value of the 1D List Gaussian Real Mutator (Mutators.G1DListMutatorRealGaussian), the sigma represents the mean of the distribution.

2D List chromosome constants (G2DList.G2DList)

Consts.CDefG2DListMutRealMU
Default mu value of the 2D List Gaussian Real Mutator (Mutators.G2DListMutatorRealGaussian), the mu represents the mean of the distribution.
Consts.CDefG2DListMutRealSIGMA
Default sigma value of the 2D List Gaussian Real Mutator (Mutators.G2DListMutatorRealGaussian), the sigma represents the mean of the distribution.
Consts.CDefG2DListMutIntMU
Default mu value of the 2D List Gaussian Integer Mutator (Mutators.G2DListMutatorIntegerGaussian), the mu represents the mean of the distribution.
Consts.CDefG2DListMutIntSIGMA
Default sigma value of the 2D List Gaussian Integer Mutator (Mutators.G2DListMutatorIntegerGaussian), the sigma represents the mean of the distribution.
Consts.CDefG2DListMutator
Default mutator for the 2D List chromosome.
Consts.CDefG2DListCrossover
Default crossover method for the 2D List chromosome.
Consts.CDefG2DListInit
Default initializator for the 2D List chromosome.
Consts.CDefG2DListCrossUniformProb
Default uniform probability for the 2D List Uniform Crossover method (Crossovers.G2DListCrossoverUniform).

GA Engine constants (GSimpleGA.GSimpleGA)

Consts.CDefGAGenerations
Default number of generations.
Consts.CDefGAMutationRate
Default mutation rate.
Consts.CDefGACrossoverRate
Default crossover rate.
Consts.CDefGAPopulationSize
Default population size.
Consts.CDefGASelector
Default selector method.

DB Adapters constants (DBAdapters)

Constants for the DB Adapters

SQLite3 DB Adapter Constants (DBAdapters.DBSQLite)

Consts.CDefSQLiteDBName
Default database filename.
Consts.CDefSQLiteDBTable
Default statistical table name.
Consts.CDefSQLiteDBTablePop
Default population statistical table name.
Consts.CDefSQLiteStatsGenFreq
Default generational frequency for dump statistics.
Consts.CDefSQLiteStatsCommitFreq
Default commit frequency.

URL Post DB Adapter Constants (DBAdapters.DBURLPost)

Consts.CDefURLPostStatsGenFreq
Default generational frequency for dump statistics.

CSV File DB Adapter Constants (DBAdapters.DBFileCSV)

Consts.CDefCSVFileName
The default CSV filename to dump statistics.
Consts.CDefCSVFileStatsGenFreq
Default generational frequency for dump statistics.