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< EOType > eoOp< EOType > eoUF< EOType &, bool > eoFunctorBase

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 177 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:
eval the evaluation function, needed to recompute the fitmess
_sigmaInit the initial value for uniform mutation
_windowSize the size of the window for statistics
_threshold the threshold (the 1/5 - 0.2)
_updateFactor multiplicative update factor for sigma

Definition at line 195 of file eoNormalMutation.h.


Member Function Documentation

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

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

Parameters:
_eo The chromosome undergoing the mutation

Reimplemented from eoNormalMutation< EOT >.

Definition at line 216 of file eoNormalMutation.h.

References EO< F >::fitness(), EO< F >::invalid(), and EO< F >::invalidate().


The documentation for this class was generated from the following file:

Generated on Thu Jan 1 23:19:48 2009 for EvolvingObjects by  doxygen 1.5.5