EvolvingObjects
eoOneFifthMutation< EOT > Class Template Reference

the dynamic version: just say it is updatable - and write the update() method! here the 1 fifth rule: count the proportion of successful mutations, and increase sigma if more than threshold (1/5 !) More...

#include <eoNormalMutation.h>

Inheritance diagram for eoOneFifthMutation< EOT >:
eoNormalMutation< EOT > eoUpdatable eoMonOp< EOT > eoOp< EOT > eoUF< EOT &, bool > eoFunctorBase unary_function

List of all members.

Public Types

typedef EOT::Fitness Fitness

Public Member Functions

 eoOneFifthMutation (eoEvalFunc< EOT > &_eval, double &_sigmaInit, unsigned _windowSize=10, double _updateFactor=0.83, double _threshold=0.2)
 (Default) Constructor.
virtual std::string className () const
 The class name.
bool operator() (EOT &_eo)
 Do it! calls the standard mutation, then checks for success and updates stats.
void update ()
 the method that will be called every generation if the object is added to the checkpoint

Private Attributes

eoEvalFunc< EOT > & eval
double threshold
double updateFactor
std::vector< unsigned > nbMut
std::vector< unsigned > nbSuccess
unsigned genIndex

Detailed Description

template<class EOT>
class eoOneFifthMutation< EOT >

the dynamic version: just say it is updatable - and write the update() method! here the 1 fifth rule: count the proportion of successful mutations, and increase sigma if more than threshold (1/5 !)

Definition at line 183 of file eoNormalMutation.h.


Constructor & Destructor Documentation

template<class EOT >
eoOneFifthMutation< EOT >::eoOneFifthMutation ( eoEvalFunc< EOT > &  _eval,
double &  _sigmaInit,
unsigned  _windowSize = 10,
double  _updateFactor = 0.83,
double  _threshold = 0.2 
) [inline]

(Default) Constructor.

Parameters:
_evalthe evaluation function, needed to recompute the fitmess
_sigmaInitthe initial value for uniform mutation
_windowSizethe size of the window for statistics
_updateFactormultiplicative update factor for sigma
_thresholdthe threshold (the 1/5 - 0.2)

Definition at line 201 of file eoNormalMutation.h.


Member Function Documentation

template<class EOT >
bool eoOneFifthMutation< EOT >::operator() ( EOT &  _eo) [inline, virtual]

Do it! calls the standard mutation, then checks for success and updates stats.

Parameters:
_eoThe chromosome undergoing the mutation

Reimplemented from eoNormalMutation< EOT >.

Definition at line 222 of file eoNormalMutation.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends