Changes in docs and added stuff to eoEvalSteadyFitness to reset after using it
This commit is contained in:
parent
55a118517c
commit
669f41a315
7 changed files with 33 additions and 20 deletions
|
|
@ -38,8 +38,13 @@
|
|||
#include <eoMergeReduce.h>
|
||||
#include <eoReplacement.h>
|
||||
|
||||
/** eoEasyEA:
|
||||
An easy-to-use evolutionary algorithm; you can use any chromosome,
|
||||
|
||||
|
||||
template <class EOT> class eoIslandsEasyEA ;
|
||||
|
||||
template <class EOT> class eoDistEvalEasyEA ;
|
||||
|
||||
/** 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
|
||||
|
|
@ -55,14 +60,8 @@ Change (MS, July 3. 2001):
|
|||
Note: it looks ugly only because we wanted to authorize many different
|
||||
constructors. Please only look at the operator() and there shall be light
|
||||
*/
|
||||
|
||||
template <class EOT> class eoIslandsEasyEA ;
|
||||
|
||||
template <class EOT> class eoDistEvalEasyEA ;
|
||||
|
||||
template<class EOT> class eoEasyEA: public eoAlgo<EOT>
|
||||
{
|
||||
public:
|
||||
template<class EOT> class eoEasyEA: public eoAlgo<EOT> {
|
||||
public:
|
||||
|
||||
/** Ctor taking a breed and merge */
|
||||
eoEasyEA(
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ thanks to the friend class eoPopulator
|
|||
@version 0.0
|
||||
*/
|
||||
|
||||
//@{
|
||||
|
||||
/** The base class for General Operators
|
||||
Subclass this operator is you want to define an operator that falls
|
||||
|
|
@ -220,3 +221,4 @@ class eoQuadGenOp : public eoGenOp<EOT>
|
|||
|
||||
#endif
|
||||
|
||||
//@}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
CVS Info: $Date: 2003-02-27 19:25:56 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.28 2003-02-27 19:25:56 okoenig Exp $ $Author: okoenig $
|
||||
CVS Info: $Date: 2004-08-10 17:19:46 $ $Header: /home/nojhan/dev/eodev/eodev_cvs/eo/src/eoOp.h,v 1.29 2004-08-10 17:19:46 jmerelo Exp $ $Author: jmerelo $
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -54,6 +54,7 @@ how to build them from a description in a file.
|
|||
@see eoGenOp.h eoOpFactory
|
||||
*/
|
||||
|
||||
//@{
|
||||
|
||||
/** Abstract data types for EO operators.
|
||||
Genetic operators act on chromosomes, changing them.
|
||||
|
|
@ -166,3 +167,4 @@ private:
|
|||
|
||||
#endif
|
||||
|
||||
//@}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#include <eoOp.h>
|
||||
#include <utils/eoRNG.h>
|
||||
/**
|
||||
\defgroup PropCombined operators
|
||||
\defgroup PropCombinedOperators
|
||||
Combination of same-type Genetic Operators - Proportional choice
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,12 @@ MS 12/12/2000
|
|||
eoGenerationalReplacement, as it says ...
|
||||
eoWeakElitistReplacement a wrapper to add elitism
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
//@{
|
||||
|
||||
///
|
||||
template<class EOT>
|
||||
class eoReplacement : public eoBF<eoPop<EOT>&, eoPop<EOT>&, void>
|
||||
{};
|
||||
|
|
@ -118,4 +123,6 @@ private:
|
|||
eoReplacement<EOT> & replace;
|
||||
};
|
||||
|
||||
//@}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -37,12 +37,11 @@
|
|||
#include <utils/eoRNG.h>
|
||||
#include <eoTransform.h>
|
||||
|
||||
/** ***************************************************************************
|
||||
* eoSGATransform: transforms a population using genetic operators.
|
||||
/** eoSGATransform: transforms a population using genetic operators.
|
||||
* It does it exactly as class eoSGA, i.e. only accepts
|
||||
* quadratic crossover and unary mutation
|
||||
* It is here mainly for tutorial reasons
|
||||
*****************************************************************************/
|
||||
*/
|
||||
template<class EOT> class eoSGATransform : public eoTransform<EOT>
|
||||
{
|
||||
public:
|
||||
|
|
@ -90,8 +89,7 @@ template<class EOT> class eoSGATransform : public eoTransform<EOT>
|
|||
double mutationProba;
|
||||
};
|
||||
|
||||
/** ***************************************************************************
|
||||
* eoDynSGATransform: transforms a population using genetic operators.
|
||||
/** eoDynSGATransform: transforms a population using genetic operators.
|
||||
* It is the Dynamic version of the above eoSGATransform
|
||||
* i.e. the operators probabilities can be passed as an eoValueParam,
|
||||
* and hence can be modified from outside
|
||||
|
|
|
|||
|
|
@ -84,10 +84,15 @@ public:
|
|||
virtual void totalGenerations( unsigned long _mg, unsigned long _sg ) {
|
||||
repMinGenerations = _mg;
|
||||
repSteadyGenerations = _sg;
|
||||
thisGeneration = 0;
|
||||
steadyState = false;
|
||||
reset();
|
||||
};
|
||||
|
||||
/// Resets the state after it's been reached
|
||||
virtual void reset () {
|
||||
steadyState=false;
|
||||
thisGeneration = 0;
|
||||
}
|
||||
|
||||
/** accessors*/
|
||||
virtual unsigned long minGenerations( )
|
||||
{ return repMinGenerations; };
|
||||
|
|
|
|||
Reference in a new issue