Class CmaEsStrategyModel
java.lang.Object
com.knezevic.edaf.v3.models.continuous.CmaEsStrategyModel
- All Implemented Interfaces:
Model<RealVector>
CMA-ES strategy model with evolution paths, rank-1/rank-mu covariance updates,
cumulative step-size adaptation, and IPOP-like internal restarts.
This model assumes selected individuals are already ranked best-first by the
outer selection policy (truncation/tournament winner list).
-
Constructor Summary
ConstructorsConstructorDescriptionCmaEsStrategyModel(double minSigma, double maxSigma, double jitter, double initialSigma) CmaEsStrategyModel(double minSigma, double maxSigma, double jitter, double initialSigma, boolean restartEnabled, int restartPatience, double restartSigmaMultiplier, double restartConditionThreshold, double restartImprovementEpsilon) -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns best observed fitness tracked by model-level restart logic.double[][]Returns deep copy of current covariance matrix for checkpoint persistence.Exposes diagnostics (entropy, covariance condition number, etc.).voidfit(List<Individual<RealVector>> selected, Representation<RealVector> representation, RngStream rng) Fits model parameters from selected individuals.intReturns current generation counter for checkpoint persistence.double[]mean()Returns copy of current mean vector for checkpoint persistence.name()Model identifier used in configuration and listing commands.double[]Returns copy of covariance-path vector for checkpoint persistence.double[]Returns copy of sigma-path vector for checkpoint persistence.intReturns number of internal CMA restarts.voidrestore(double[] mean, double sigma, double[][] covariance, double[] pathSigma, double[] pathCovariance, int generation) Restores full CMA-ES state from checkpoint payload.voidrestore(double[] mean, double sigma, double[][] covariance, double[] pathSigma, double[] pathCovariance, int generation, int restartCount, int stagnationIterations, double bestFitnessSeen) Restores full CMA-ES state including restart counters.sample(int count, Representation<RealVector> representation, Problem<RealVector> problem, ConstraintHandling<RealVector> constraintHandling, RngStream rng) Samples new genotypes from model.doublesigma()Returns current global step size.intReturns current stagnation counter.
-
Constructor Details
-
CmaEsStrategyModel
public CmaEsStrategyModel() -
CmaEsStrategyModel
public CmaEsStrategyModel(double minSigma, double maxSigma, double jitter, double initialSigma) -
CmaEsStrategyModel
public CmaEsStrategyModel(double minSigma, double maxSigma, double jitter, double initialSigma, boolean restartEnabled, int restartPatience, double restartSigmaMultiplier, double restartConditionThreshold, double restartImprovementEpsilon)
-
-
Method Details
-
name
Description copied from interface:ModelModel identifier used in configuration and listing commands.- Specified by:
namein interfaceModel<RealVector>
-
fit
public void fit(List<Individual<RealVector>> selected, Representation<RealVector> representation, RngStream rng) Description copied from interface:ModelFits model parameters from selected individuals.- Specified by:
fitin interfaceModel<RealVector>
-
sample
public List<RealVector> sample(int count, Representation<RealVector> representation, Problem<RealVector> problem, ConstraintHandling<RealVector> constraintHandling, RngStream rng) Description copied from interface:ModelSamples new genotypes from model.- Specified by:
samplein interfaceModel<RealVector>
-
diagnostics
Description copied from interface:ModelExposes diagnostics (entropy, covariance condition number, etc.).- Specified by:
diagnosticsin interfaceModel<RealVector>
-
mean
public double[] mean()Returns copy of current mean vector for checkpoint persistence. -
sigma
public double sigma()Returns current global step size. -
covariance
public double[][] covariance()Returns deep copy of current covariance matrix for checkpoint persistence. -
pathSigma
public double[] pathSigma()Returns copy of sigma-path vector for checkpoint persistence. -
pathCovariance
public double[] pathCovariance()Returns copy of covariance-path vector for checkpoint persistence. -
generation
public int generation()Returns current generation counter for checkpoint persistence. -
restartCount
public int restartCount()Returns number of internal CMA restarts. -
stagnationIterations
public int stagnationIterations()Returns current stagnation counter. -
bestFitnessSeen
public double bestFitnessSeen()Returns best observed fitness tracked by model-level restart logic. -
restore
public void restore(double[] mean, double sigma, double[][] covariance, double[] pathSigma, double[] pathCovariance, int generation) Restores full CMA-ES state from checkpoint payload. -
restore
public void restore(double[] mean, double sigma, double[][] covariance, double[] pathSigma, double[] pathCovariance, int generation, int restartCount, int stagnationIterations, double bestFitnessSeen) Restores full CMA-ES state including restart counters.
-