CMAESSearchState
Models & Types · AiDotNet.Optimizers
The complete state of a CMA-ES search between generations: the distribution’s mean, step size and covariance, the two evolution paths, and the generation count.
For Beginners
CMA-ES keeps a “cloud” of where good solutions probably are: its centre (the mean), its size (sigma) and its shape (the covariance). This object is that cloud plus a little memory of where it has been moving, so the search can be paused after any round and continued exactly where it stopped.
How It Works
Created by CreateSearchState and advanced one generation at a
time by Ask and
Tell. Everything the next generation depends on is held here as
plain numbers, so a caller can keep a search running across calls, copy it, or serialize it and resume it later.
The recombination weights and learning rates are not stored: they are fixed functions of
Dimension and PopulationSize (Hansen 2016, Table 1) and are recomputed.
Constructors
| Constructor | Summary |
|---|---|
CMAESSearchState() |
Properties
| Property | Summary |
|---|---|
bool IsDegenerate { get; } |
Whether the step size is still a usable positive, finite number. |
double Sigma { get; set; } |
Gets or sets the global step size, sigma. |
double[] Mean { get; set; } |
Gets or sets the mean of the sampling distribution, m. |
double[] PathC { get; set; } |
Gets or sets the evolution path p_c that drives the rank-one covariance update. |
double[] PathSigma { get; set; } |
Gets or sets the conjugate evolution path p_sigma that controls the step size. |
double[][] Covariance { get; set; } |
Gets or sets the covariance matrix C, stored as rows. |
int Dimension { get; set; } |
Gets or sets the number of parameters being searched over, n. |
int Generation { get; set; } |
Gets or sets the number of generations completed so far. |
int PopulationSize { get; set; } |
Gets or sets the number of candidates sampled per generation, lambda. |
Methods
| Method | Summary |
|---|---|
CMAESSearchState Clone() |
Returns an independent deep copy of this state. |