eoOneFifthMutation(3)

NAME
eoOneFifthMutation - 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 !)

SYNOPSIS

#include <eoNormalMutation.h>

Inherits eoNormalMutation< EOT >< EOT >, and eoUpdatable.

  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, virtual]

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(), EO< F >::invalidate(), and eoNormalMutation< EOT >::operator()().

Author

Generated automatically by Doxygen for EO from the source code.