Strategies
Standard CMA
- class Strategy(centroid, sigma, **kwargs)
The standard Covariance Matrix Adaptation evolution strategy.
- Parameters
Table of Kwargs
- offsprings - (int)
The number of children to produce at each generation.
Default:
int(4 + 3 * log(len(centroid)))
- survivors - (int)
The number of children to keep as parents for the next generation.
Default:
int(children / 2)
- weights - (str)
Evolution decrease speed. Can be ‘superlinear’, ‘linear’ or ‘equal’.
Default:
'superlinear'
- cm_init - (numpy.ndarray)
The initial covariance matrix of the distribution.
Default:
numpy.identity(len(centroid))
- cm_cum - (float)
Cumulation constant of the covariance matrix.
Default:
4 / (len(centroid) + 4)
- ss_cum - (float)
Cumulation constant of the step-size.
Default:
(mueff + 2) / (len(centroid) + mueff + 3)
- ss_dmp - (float)
Damping of the step-size.
Default:
1 + 2 * max(0, sqrt((mueff - 1) / (len(centroid) + 1)) - 1) + ss_cum
- rank_one - (float)
Learning rate for rank-one update.
Default:
2 / ((len(centroid) + 1.3) ** 2 + mueff)
- rank_mu - (float)
Learning rate for rank-mu update.
Default:
2 * (mueff - 2 + 1 / mueff) / ((len(centroid) + 2) ** 2 + mueff)
- compute_params(**kwargs)
Computes the parameters of the strategy based on the lambda parameter. This function is called automatically when this strategy is instantiated, but it needs to be called again with the updated kwargs if the lambda parameter changes during evolution.
- Parameters
kwargs (Optional) – One or more keyword arguments, optional.
- Returns
Nothing.
- Return type
None
- generate(ind_init)
Generates a population of lambda individuals of type ind_init from the current strategy.
Multi-Objective CMA
- class StrategyMultiObjective(population, sigma, **kwargs)
The multi-objective Covariance Matrix Adaptation evolution strategy.
- Parameters
Table of Kwargs
- offsprings - (int)
The number of children to produce at each generation.
Default:
1
- survivors - (int)
The number of children to keep as parents for the next generation.
Default:
len(population)
- ss_dmp - (float)
Damping of the step-size.
Default:
1.0 + len(population) / 2.0
- th_cum - (float)
Time horizon of the cumulative contribution.
Default:
2.0 / (len(population) + 2.0)
- tgt_sr - (float)
Target success rate.
Default:
1.0 / 5.5
- thresh_sr - (float)
Threshold success rate.
Default:
0.44
- ss_learn_rate - (float)
Learning rate of the step-size.
Default:
tgt_sr / (2.0 + tgt_sr)
- cm_learn_rate - (float)
Learning rate of the covariance matrix.
Default:
2.0 / (len(population) ** 2 + 6.0)
- mp_pool - (object)
Any multiprocessing Pool object, which has a
mapmethod.Default: None
One Plus Lambda CMA
- class StrategyOnePlusLambda(parent, sigma, **kwargs)
The one-plus-lambda Covariance Matrix Adaptation evolution strategy.
- Parameters
parent (Individual) – A mutable sequence that indicates where to start the evolution. The parent requires a fitness attribute.
sigma (float) – The initial standard deviation of the distribution.
kwargs (Optional) – One or more keyword arguments, optional.
Table of Kwargs
- offsprings - (int)
The number of children to produce at each generation.
Default:
1
- ss_dmp - (float)
Damping of the step-size.
Default:
1.0 + len(population) / 2.0 * lambda
- th_cum - (float)
Time horizon of the cumulative contribution.
Default:
2.0 / (len(population) + 2.0)
- tgt_sr - (float)
Target success rate.
Default:
1.0 / (5 + sqrt(lambda) / 2.0)
- thresh_sr - (float)
Threshold success rate.
Default:
0.44
- ss_learn_rate - (float)
Learning rate of the step-size.
Default:
tgt_sr * lambda / (2.0 + tgt_sr * lambda)
- cm_learn_rate - (float)
Learning rate of the covariance matrix.
Default:
2.0 / (len(population) ** 2 + 6.0)
- compute_params(**kwargs)
Computes the parameters of the strategy based on the lambda parameter. This function is called automatically when this strategy is instantiated, but it needs to be called again with the updated kwargs if the lambda parameter changes during evolution.
- Parameters
kwargs (Optional) – One or more keyword arguments, optional.
- Returns
Nothing.
- Return type
None
- generate(ind_init)
Generates a population of lambda individuals of type ind_init from the current strategy.