EvolvingObjects
|
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>
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 |
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.
eoOneFifthMutation< EOT >::eoOneFifthMutation | ( | eoEvalFunc< EOT > & | _eval, |
double & | _sigmaInit, | ||
unsigned | _windowSize = 10 , |
||
double | _updateFactor = 0.83 , |
||
double | _threshold = 0.2 |
||
) | [inline] |
(Default) Constructor.
_eval | the evaluation function, needed to recompute the fitmess |
_sigmaInit | the initial value for uniform mutation |
_windowSize | the size of the window for statistics |
_updateFactor | multiplicative update factor for sigma |
_threshold | the threshold (the 1/5 - 0.2) |
Definition at line 201 of file eoNormalMutation.h.
bool eoOneFifthMutation< EOT >::operator() | ( | EOT & | _eo | ) | [inline, virtual] |
Do it! calls the standard mutation, then checks for success and updates stats.
_eo | The chromosome undergoing the mutation |
Reimplemented from eoNormalMutation< EOT >.
Definition at line 222 of file eoNormalMutation.h.