#include <shark/Algorithms/DirectSearch/CMSA.h>
Inheritance diagram for shark::CMSA:Public Member Functions | |
| CMSA () | |
| Default c'tor. More... | |
| std::string | name () const |
| From INameable: return the class name. More... | |
| template<typename Container , typename Extractor > | |
| RealVector | cog (const Container &container, const Extractor &e) |
| Calculates the center of gravity of the given population \( \in \mathbb{R}^d\). More... | |
| SHARK_EXPORT_SYMBOL void | read (InArchive &archive) |
| Read the component from the supplied archive. More... | |
| SHARK_EXPORT_SYMBOL void | write (OutArchive &archive) const |
| Write the component to the supplied archive. More... | |
| SHARK_EXPORT_SYMBOL void | init (ObjectiveFunctionType &function, SearchPointType const &p) |
| Initializes the algorithm for the supplied objective function. More... | |
| SHARK_EXPORT_SYMBOL void | step (ObjectiveFunctionType const &function) |
| Executes one iteration of the algorithm. More... | |
| std::size_t | mu () const |
| Accesses the size of the parent population. More... | |
| std::size_t & | mu () |
| Accesses the size of the parent population, allows for l-value semantics. More... | |
| std::size_t | lambda () const |
| Accesses the size of the offspring population. More... | |
| std::size_t & | lambda () |
| Accesses the size of the offspring population, allows for l-value semantics. More... | |
Public Member Functions inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| virtual void | init (ObjectiveFunctionType &function) |
| virtual const SolutionType & | solution () const |
| returns the current solution of the optimizer More... | |
Public Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| const Features & | features () const |
| virtual void | updateFeatures () |
| bool | requiresValue () const |
| bool | requiresFirstDerivative () const |
| bool | requiresSecondDerivative () const |
| bool | canSolveConstrained () const |
| bool | requiresClosestFeasible () const |
| virtual | ~AbstractOptimizer () |
| Empty virtual d'tor. More... | |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
Public Member Functions inherited from shark::ISerializable | |
| virtual | ~ISerializable () |
| Virtual d'tor. More... | |
| void | load (InArchive &archive, unsigned int version) |
| Versioned loading of components, calls read(...). More... | |
| void | save (OutArchive &archive, unsigned int version) const |
| Versioned storing of components, calls write(...). More... | |
| BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Protected Attributes | |
| std::size_t | m_numberOfVariables |
| Stores the dimensionality of the search space. More... | |
| std::size_t | m_mu |
| The size of the parent population. More... | |
| std::size_t | m_lambda |
| The size of the offspring population, needs to be larger than mu. More... | |
| double | m_sigma |
| The current step size. More... | |
| double | m_cSigma |
| double | m_cC |
| Constant for adapting the covariance matrix. More... | |
| RealVector | m_mean |
| The current cog of the population. More... | |
| shark::MultiVariateNormalDistribution | m_mutationDistribution |
| Multi-variate normal mutation distribution. More... | |
Protected Attributes inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| SolutionType | m_best |
| current solution of the optimizer More... | |
Protected Attributes inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| Features | m_features |
Additional Inherited Members | |
Public Types inherited from shark::AbstractSingleObjectiveOptimizer< RealVector > | |
| typedef base_type::SearchPointType | SearchPointType |
| typedef base_type::SolutionType | SolutionType |
| typedef base_type::ResultType | ResultType |
| typedef base_type::ObjectiveFunctionType | ObjectiveFunctionType |
Public Types inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| enum | Feature |
| Models features that the optimizer requires from the objective function. More... | |
| typedef RealVector | SearchPointType |
| typedef double | ResultType |
| typedef SingleObjectiveResultSet< RealVector > | SolutionType |
| typedef AbstractObjectiveFunction< RealVector, ResultType > | ObjectiveFunctionType |
| typedef TypedFlags< Feature > | Features |
| typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
Protected Member Functions inherited from shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > > | |
| void | checkFeatures (ObjectiveFunctionType const &objectiveFunction) |
| Convenience function that checks whether the features of the supplied objective function match with the required features of the optimizer. More... | |
Implements the CMSA.
The algorithm is described in
H. G. Beyer, B. Sendhoff (2008). Covariance Matrix Adaptation Revisited: The CMSA Evolution Strategy In Proceedings of the Tenth International Conference on Parallel Problem Solving from Nature (PPSN X), pp. 123-132, LNCS, Springer-Verlag
|
inline |
Default c'tor.
Definition at line 82 of file CMSA.h.
References shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >::m_features, and shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >::REQUIRES_VALUE.
|
inline |
Calculates the center of gravity of the given population \( \in \mathbb{R}^d\).
Definition at line 96 of file CMSA.h.
References init(), m_mu, m_numberOfVariables, read(), SHARK_EXPORT_SYMBOL, step(), and write().
|
virtual |
Initializes the algorithm for the supplied objective function.
Implements shark::AbstractSingleObjectiveOptimizer< RealVector >.
Referenced by cog().
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
|
virtual |
Read the component from the supplied archive.
| [in,out] | archive | The archive to read from. |
Reimplemented from shark::ISerializable.
Referenced by cog().
|
virtual |
Executes one iteration of the algorithm.
Implements shark::AbstractOptimizer< RealVector, double, SingleObjectiveResultSet< RealVector > >.
Referenced by cog().
|
virtual |
Write the component to the supplied archive.
| [in,out] | archive | The archive to write to. |
Reimplemented from shark::ISerializable.
Referenced by cog().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |