EvolvingObjects
eoEasyEA< EOT > Class Template Reference

An easy-to-use evolutionary algorithm; you can use any chromosome, and any selection transformation, merging and evaluation algorithms; you can even change in runtime parameters of those sub-algorithms. More...

#include <eoEasyEA.h>

Inheritance diagram for eoEasyEA< EOT >:
eoAlgo< EOT > eoUF< eoPop< EOT > &, void > eoFunctorBase unary_function

List of all members.

Classes

class  eoDummyEval
class  eoDummySelect
class  eoDummyTransform

Public Member Functions

 eoEasyEA (eoContinue< EOT > &_continuator, eoEvalFunc< EOT > &_eval, eoBreed< EOT > &_breed, eoReplacement< EOT > &_replace)
 Ctor taking a breed and merge.
 eoEasyEA (eoContinue< EOT > &_continuator, eoEvalFunc< EOT > &_eval, eoBreed< EOT > &_breed, eoReplacement< EOT > &_replace, unsigned _offspringSize)
 Ctor taking a breed and merge, an overload of ctor to define an offspring size.
 eoEasyEA (eoContinue< EOT > &_continuator, eoEvalFunc< EOT > &_eval, eoPopEvalFunc< EOT > &_pop_eval, eoBreed< EOT > &_breed, eoReplacement< EOT > &_replace, unsigned _offspringSize)
 Ctor allowing to specify which pop eval function we're going to use.
 eoEasyEA (eoContinue< EOT > &_continuator, eoPopEvalFunc< EOT > &_eval, eoBreed< EOT > &_breed, eoReplacement< EOT > &_replace)
 NEW Ctor taking a breed and merge and an eoPopEval.
 eoEasyEA (eoContinue< EOT > &_continuator, eoPopEvalFunc< EOT > &_eval, eoSelect< EOT > &_select, eoTransform< EOT > &_transform, eoReplacement< EOT > &_replace)
 Ctor eoSelect, eoTransform, eoReplacement and an eoPopEval.
 eoEasyEA (eoContinue< EOT > &_continuator, eoEvalFunc< EOT > &_eval, eoBreed< EOT > &_breed, eoMerge< EOT > &_merge, eoReduce< EOT > &_reduce)
 Ctor eoBreed, eoMerge and eoReduce.
 eoEasyEA (eoContinue< EOT > &_continuator, eoEvalFunc< EOT > &_eval, eoSelect< EOT > &_select, eoTransform< EOT > &_transform, eoReplacement< EOT > &_replace)
 Ctor eoSelect, eoTransform, and eoReplacement.
 eoEasyEA (eoContinue< EOT > &_continuator, eoEvalFunc< EOT > &_eval, eoSelect< EOT > &_select, eoTransform< EOT > &_transform, eoMerge< EOT > &_merge, eoReduce< EOT > &_reduce)
 Ctor eoSelect, eoTransform, eoMerge and eoReduce.
virtual void operator() (eoPop< EOT > &_pop)
 Apply a few generation of evolution to the population.

Protected Attributes

eoEasyEA::eoDummySelect dummySelect
eoEasyEA::eoDummyTransform dummyTransform
eoEasyEA::eoDummyEval dummyEval
eoContinue< EOT > & continuator
eoEvalFunc< EOT > & eval
eoPopLoopEval< EOT > loopEval
eoPopEvalFunc< EOT > & popEval
eoSelectTransform< EOT > selectTransform
eoBreed< EOT > & breed
eoNoElitism< EOT > dummyMerge
eoTruncate< EOT > dummyReduce
eoMergeReduce< EOT > mergeReduce
eoReplacement< EOT > & replace
eoPop< EOT > offspring
bool isFirstCall

Friends

class eoIslandsEasyEA< EOT >
class eoDistEvalEasyEA< EOT >

Detailed Description

template<class EOT>
class eoEasyEA< EOT >

An easy-to-use evolutionary algorithm; you can use any chromosome, and any selection transformation, merging and evaluation algorithms; you can even change in runtime parameters of those sub-algorithms.

Change (MS, July 3. 2001): Replaced the eoEvalFunc by an eoPopEvalFunc: this immediately allows many useful constructs, such as co-evolution (e.g. game players), parisian approach (the solution to the problem is the whole population) or simple distribution of evaluations on a cluster. In case an eoEvalFunc is passed, it is embedded on an eoPopLoopEval This makes things a little uglier (required an additional "dummy" member

Note: it looks ugly only because we wanted to authorize many different constructors. Please only look at the operator() and there shall be light

Examples:
t-eoEasyEA.cpp, t-eoSSGA.cpp, and t-eoSymreg.cpp.

Definition at line 62 of file eoEasyEA.h.


Constructor & Destructor Documentation

template<class EOT>
eoEasyEA< EOT >::eoEasyEA ( eoContinue< EOT > &  _continuator,
eoEvalFunc< EOT > &  _eval,
eoPopEvalFunc< EOT > &  _pop_eval,
eoBreed< EOT > &  _breed,
eoReplacement< EOT > &  _replace,
unsigned  _offspringSize 
) [inline]

Ctor allowing to specify which pop eval function we're going to use.

Ctor taking a breed and merge, an overload of ctor to define an offspring size, and the pop eval function used. This allows to precise if we would like to use the parallel evaluation, for instance.

Definition at line 110 of file eoEasyEA.h.


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