Class CmaEsStrategyModel

java.lang.Object
com.knezevic.edaf.v3.models.continuous.CmaEsStrategyModel
All Implemented Interfaces:
Model<RealVector>

public final class CmaEsStrategyModel extends Object implements 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

    Constructors
    Constructor
    Description
     
    CmaEsStrategyModel(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 Type
    Method
    Description
    double
    Returns 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.).
    void
    fit(List<Individual<RealVector>> selected, Representation<RealVector> representation, RngStream rng)
    Fits model parameters from selected individuals.
    int
    Returns current generation counter for checkpoint persistence.
    double[]
    Returns copy of current mean vector for checkpoint persistence.
    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.
    int
    Returns number of internal CMA restarts.
    void
    restore(double[] mean, double sigma, double[][] covariance, double[] pathSigma, double[] pathCovariance, int generation)
    Restores full CMA-ES state from checkpoint payload.
    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.
    sample(int count, Representation<RealVector> representation, Problem<RealVector> problem, ConstraintHandling<RealVector> constraintHandling, RngStream rng)
    Samples new genotypes from model.
    double
    Returns current global step size.
    int
    Returns current stagnation counter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.knezevic.edaf.v3.core.api.Model

    update
  • 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

      public String name()
      Description copied from interface: Model
      Model identifier used in configuration and listing commands.
      Specified by:
      name in interface Model<RealVector>
    • fit

      public void fit(List<Individual<RealVector>> selected, Representation<RealVector> representation, RngStream rng)
      Description copied from interface: Model
      Fits model parameters from selected individuals.
      Specified by:
      fit in interface Model<RealVector>
    • sample

      public List<RealVector> sample(int count, Representation<RealVector> representation, Problem<RealVector> problem, ConstraintHandling<RealVector> constraintHandling, RngStream rng)
      Description copied from interface: Model
      Samples new genotypes from model.
      Specified by:
      sample in interface Model<RealVector>
    • diagnostics

      public ModelDiagnostics diagnostics()
      Description copied from interface: Model
      Exposes diagnostics (entropy, covariance condition number, etc.).
      Specified by:
      diagnostics in interface Model<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.