MOEA Framework 2.12
API Specification

org.moeaframework.algorithm
Class CMAES

java.lang.Object
  extended by org.moeaframework.algorithm.AbstractAlgorithm
      extended by org.moeaframework.algorithm.CMAES
All Implemented Interfaces:
Algorithm

public class CMAES
extends AbstractAlgorithm

The Covariance Matrix Adaption Evolution Strategy (CMA-ES) algorithm for single and multi-objective problems. For multi-objective problems, individuals are compared using Pareto ranking and crowding distance to break ties. An optional fitnessEvaluator parameter can be specified to replace the crowding distance calculation with, for example, the hypervolume indicator.

This file is based on the Java implementation of CMA-ES by Nikolaus Hansen available at https://www.lri.fr/~hansen/cmaes_inmatlab.html#java, originally licensed under the GNU LGPLv3.

References:

  1. Hansen and Kern (2004). Evaluating the CMA Evolution Strategy on Multimodal Test Functions. In Proceedings of the Eighth International Conference on Parallel Problem Solving from Nature PPSN VIII, pp. 282-291, Berlin: Springer.
  2. Hansen, N. (2011). The CMA Evolution Strategy: A Tutorial. Available at https://www.lri.fr/~hansen/cmatutorial.pdf.
  3. Igel, C., N. Hansen, and S. Roth (2007). Covariance Matrix Adaptation for Multi-objective Optimization. Evolutionary Computation, 15(1):1-28.


Field Summary
 
Fields inherited from class org.moeaframework.algorithm.AbstractAlgorithm
initialized, numberOfEvaluations, problem, terminated
 
Constructor Summary
CMAES(Problem problem, int lambda)
          Constructs a new CMA-ES instance using default parameters.
CMAES(Problem problem, int lambda, FitnessEvaluator fitnessEvaluator, NondominatedPopulation archive)
          Constructs a new CMA-ES instance using default parameters.
CMAES(Problem problem, int lambda, FitnessEvaluator fitnessEvaluator, NondominatedPopulation archive, double[] initialSearchPoint, boolean checkConsistency, double cc, double cs, double damps, double ccov, double ccovsep, double sigma, int diagonalIterations)
          Constructs a new CMA-ES instance with the given parameters.
 
Method Summary
 NondominatedPopulation getResult()
          Returns the current best-known result.
 Serializable getState()
          Returns a Serializable object representing the internal state of this algorithm.
 void initialize()
          Performs any initialization that is required by this algorithm.
protected  void iterate()
          Performs one iteration of the algorithm.
 void setState(Object objState)
          Sets the internal state of of this algorithm.
 void step()
          This method first checks if the algorithm is initialized.
static void tql2(int n, double[] d, double[] e, double[][] V)
          Symmetric tridiagonal QL algorithm, taken from JAMA package.
static void tred2(int n, double[][] V, double[] d, double[] e)
          Symmetric Householder reduction to tridiagonal form, taken from JAMA package.
 
Methods inherited from class org.moeaframework.algorithm.AbstractAlgorithm
evaluate, evaluateAll, evaluateAll, finalize, getNumberOfEvaluations, getProblem, isInitialized, isTerminated, terminate
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMAES

public CMAES(Problem problem,
             int lambda)
Constructs a new CMA-ES instance using default parameters.

Parameters:
problem - the problem to optimize
lambda - the offspring population size

CMAES

public CMAES(Problem problem,
             int lambda,
             FitnessEvaluator fitnessEvaluator,
             NondominatedPopulation archive)
Constructs a new CMA-ES instance using default parameters.

Parameters:
problem - the problem to optimize
lambda - the offspring population size
fitnessEvaluator - secondary comparison criteria for comparing population individuals with the same rank, or null to use the default crowding distance metric
archive - the nondominated archive for storing the elite individuals

CMAES

public CMAES(Problem problem,
             int lambda,
             FitnessEvaluator fitnessEvaluator,
             NondominatedPopulation archive,
             double[] initialSearchPoint,
             boolean checkConsistency,
             double cc,
             double cs,
             double damps,
             double ccov,
             double ccovsep,
             double sigma,
             int diagonalIterations)
Constructs a new CMA-ES instance with the given parameters.

If the parameters cc, cs, damps, ccov, ccovsep, sigma, and diagonalIterations are set to any negative number, then the default parameter will be used.

Parameters:
problem - the problem to optimize
lambda - the offspring population size
fitnessEvaluator - secondary comparison criteria for comparing population individuals with the same rank, or null to use the default crowding distance metric
archive - the nondominated archive for storing the elite individuals
initialSearchPoint - an initial search point, or null if no initial search point is specified
checkConsistency - if true, performs checks to ensure CMA-ES remains numerically stable
cc - the cumulation parameter
cs - the step size of the cumulation parameter
damps - the damping factor for the step size
ccov - the learning rate
ccovsep - the learning rate when in diagonal-only mode
sigma - the initial standard deviation
diagonalIterations - the number of iterations in which only the covariance diagonal is used
Method Detail

initialize

public void initialize()
Description copied from class: AbstractAlgorithm
Performs any initialization that is required by this algorithm. This method is called automatically by the first invocation of AbstractAlgorithm.step(), but may also be called manually prior to any invocations of step. Implementations should always invoke super.initialize() to ensure the hierarchy is initialized correctly.

Overrides:
initialize in class AbstractAlgorithm

iterate

protected void iterate()
Description copied from class: AbstractAlgorithm
Performs one iteration of the algorithm. This method should be overridden by implementations to perform each logical iteration of the algorithm.

Specified by:
iterate in class AbstractAlgorithm

step

public void step()
Description copied from class: AbstractAlgorithm
This method first checks if the algorithm is initialized. If not, the AbstractAlgorithm.initialize() method is invoked. If initialized, all calls to step invoke AbstractAlgorithm.iterate(). Implementations should override the initialize and iterate methods in preference to modifying this method.

Specified by:
step in interface Algorithm
Overrides:
step in class AbstractAlgorithm

getResult

public NondominatedPopulation getResult()
Description copied from interface: Algorithm
Returns the current best-known result.

Returns:
the current best-known result

tred2

public static void tred2(int n,
                         double[][] V,
                         double[] d,
                         double[] e)
Symmetric Householder reduction to tridiagonal form, taken from JAMA package. This is derived from the Algol procedures tred2 by Bowdler, Martin, Reinsch, and Wilkinson, Handbook for Auto. Comp., Vol.ii-Linear Algebra, and the corresponding Fortran subroutine in EISPACK.


tql2

public static void tql2(int n,
                        double[] d,
                        double[] e,
                        double[][] V)
Symmetric tridiagonal QL algorithm, taken from JAMA package. This is derived from the Algol procedures tql2, by Bowdler, Martin, Reinsch, and Wilkinson, Handbook for Auto. Comp., Vol.ii-Linear Algebra, and the corresponding Fortran subroutine in EISPACK.


getState

public Serializable getState()
                      throws NotSerializableException
Description copied from interface: Algorithm
Returns a Serializable object representing the internal state of this algorithm.

Specified by:
getState in interface Algorithm
Overrides:
getState in class AbstractAlgorithm
Returns:
a Serializable object representing the internal state of this algorithm
Throws:
NotSerializableException - if this algorithm does not support serialization

setState

public void setState(Object objState)
              throws NotSerializableException
Description copied from interface: Algorithm
Sets the internal state of of this algorithm.

Specified by:
setState in interface Algorithm
Overrides:
setState in class AbstractAlgorithm
Parameters:
objState - the internal state of this algorithm
Throws:
NotSerializableException - if this algorithm does not support serialization

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!