From 17484feeef9a25163b267871511af36691a84216 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 2 May 2001 10:47:56 +0000 Subject: [PATCH] Forgotten ES files + start of tutorial Lesson4 (about make_XXX) --- eo/src/es/make_op_es.h | 186 +++++++++++++++++++++++ eo/src/es/make_op_real.h | 257 ++++++++++++++++++++++++++++++++ eo/tutorial/html/eoLesson3.html | 8 +- eo/tutorial/html/eoLesson4.html | 237 +++++++++++++++++++++++++++++ eo/tutorial/html/eoTopDown.html | 23 ++- 5 files changed, 700 insertions(+), 11 deletions(-) create mode 100644 eo/src/es/make_op_es.h create mode 100644 eo/src/es/make_op_real.h create mode 100644 eo/tutorial/html/eoLesson4.html diff --git a/eo/src/es/make_op_es.h b/eo/src/es/make_op_es.h new file mode 100644 index 00000000..74f4e6cc --- /dev/null +++ b/eo/src/es/make_op_es.h @@ -0,0 +1,186 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op.h - the real-valued version +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_h +#define _make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized Real stuff +#include +#include +#include +#include +#include +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This function builds the operators that will be applied to the eoReal + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded& _init) +{ + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables (unbounded if absent)", 'B', "Variation Operators"); + + // get vector size + unsigned vecSize = _init.size(); + + // the bounds pointer + eoRealVectorBounds * ptBounds; + if (_parser.isItThere(boundsParam)) // otherwise, no bounds + { + /////Warning: this code should probably be replaced by creating + ///// some eoValueParam with specific implementation + //// in eoParser.cpp. At the moment, it is there (cf also make_genotype + eoParamParamType & ppBounds = boundsParam.value(); // pair > + // transform into a vector + vector v; + vector::iterator it; + for (it=ppBounds.second.begin(); itc_str()); + double r; + is >> r; + v.push_back(r); + } + // now create the eoRealVectorBounds object + if (v.size() == 2) // a min and a max for all variables + ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); + else // no time now + throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); + // we need to give ownership of this pointer to somebody + /////////// end of temporary code + } + else // no param for bounds was given + ptBounds = new eoRealVectorNoBounds(vecSize); // DON'T USE eoDummyVectorNoBounds + // as it does not have any dimension + + // now we read Pcross and Pmut, + eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); + + if (operatorParam.value() != string("SGA")) + throw runtime_error("Sorry, only SGA-like operator available right now\n"); + + // now we read Pcross and Pmut, + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam = _parser.createParam(1.0, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(1.0, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + + // crossover + ///////////// + // ES crossover + eoValueParam& crossTypeParam = _parser.createParam(string("Global"), "crossType", "Type of ES recombination (gloabl or local)", 'C', "Variation Operators"); + + eoValueParam& crossObjParam = _parser.createParam(string("Discrete"), "crossObj", "Recombination of object variables (Discrete or Intermediate)", 'O', "Variation Operators"); + eoValueParam& crossStdevParam = _parser.createParam(string("Intermediate"), "crossStdev", "Recombination of mutation strategy parameters (Intermediate or Discrete)", 'S', "Variation Operators"); + + // The pointers: first the atom Xover + eoBinOp *ptObjAtomCross = NULL; + eoBinOp *ptStdevAtomCross = NULL; + // then the global one + eoGenOp *ptCross; + + // check for the atom Xovers + if (crossObjParam.value() == string("Discrete")) + ptObjAtomCross = new eoRealAtomExchange; + else if (crossObjParam.value() == string("Intermediate")) + ptObjAtomCross = new eoRealAtomExchange; + else throw runtime_error("Invalid Object variable crossover type"); + + if (crossStdevParam.value() == string("Discrete")) + ptStdevAtomCross = new eoRealAtomExchange; + else if (crossStdevParam.value() == string("Intermediate")) + ptStdevAtomCross = new eoRealAtomExchange; + else throw runtime_error("Invalid mutation strategy parameter crossover type"); + + // and build the indi Xover + if (crossTypeParam.value() == string("Global")) + ptCross = new eoEsGlobalXover(*ptObjAtomCross, *ptStdevAtomCross); + else if (crossTypeParam.value() == string("Local")) + ptCross = new eoEsLocalXover(*ptObjAtomCross, *ptStdevAtomCross); + else throw runtime_error("Invalide Object variable crossover type"); + + // now that everything is OK, DON'T FORGET TO STORE MEMORY + _state.storeFunctor(ptObjAtomCross); + _state.storeFunctor(ptStdevAtomCross); + _state.storeFunctor(ptCross); + + // mutation + ///////////// + + // Ok, time to set up the self-adaptive mutation + // Proxy for the mutation parameters + eoEsMutationInit mutateInit(_parser, "Variation Operators"); + + eoEsMutate * ptMon = new eoEsMutate(mutateInit, *ptBounds); + _state.storeFunctor(ptMon); + + // encapsulate into an eoGenop + eoMonGenOp * op = new eoMonGenOp(*ptMon); + _state.storeFunctor(op); + + // that's it! + return *op; +} +#endif diff --git a/eo/src/es/make_op_real.h b/eo/src/es/make_op_real.h new file mode 100644 index 00000000..315c839f --- /dev/null +++ b/eo/src/es/make_op_real.h @@ -0,0 +1,257 @@ +// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- + +//----------------------------------------------------------------------------- +// make_op.h - the real-valued version +// (c) Maarten Keijzer, Marc Schoenauer and GeNeura Team, 2001 +/* + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Contact: todos@geneura.ugr.es, http://geneura.ugr.es + Marc.Schoenauer@polytechnique.fr + mkeijzer@dhi.dk + */ +//----------------------------------------------------------------------------- + +#ifndef _make_op_h +#define _make_op_h + +// the operators +#include +#include +#include +#include +// combinations of simple eoOps (eoMonOp and eoQuadOp) +#include + +// the specialized Real stuff +#include +#include +#include +#include + // also need the parser and param includes +#include +#include + + +/* + * This function builds the operators that will be applied to the eoReal + * + * It uses a parser (to get user parameters) and a state (to store the memory) + * the last argument is an individual, needed for 2 reasons + * it disambiguates the call after instanciations + * some operator might need some private information about the indis + * + * This is why the template is the complete EOT even though only the fitness + * is actually templatized here: the following only applies to bitstrings + * + * Note : the last parameter is an eoInit: if some operator needs some info + * about the gneotypes, the init has it all (e.g. bounds, ...) + * Simply do + * EOT myEO; + * _init(myEO); + * and myEO is then an ACTUAL object +*/ + +template +eoGenOp & do_make_op(eoParameterLoader& _parser, eoState& _state, eoRealInitBounded& _init) +{ + // First, decide whether the objective variables are bounded + eoValueParam& boundsParam = _parser.createParam(eoParamParamType("(0,1)"), "objectBounds", "Bounds for variables (unbounded if absent)", 'B', "Variation Operators"); + + // get vector size + unsigned vecSize = _init.size(); + + // the bounds pointer + eoRealVectorBounds * ptBounds; + if (_parser.isItThere(boundsParam)) // otherwise, no bounds + { + /////Warning: this code should probably be replaced by creating + ///// some eoValueParam with specific implementation + //// in eoParser.cpp. At the moemnt, it is there (cf also make_genotype + eoParamParamType & ppBounds = boundsParam.value(); // pair > + // transform into a vector + vector v; + vector::iterator it; + for (it=ppBounds.second.begin(); itc_str()); + double r; + is >> r; + v.push_back(r); + } + // now create the eoRealVectorBounds object + if (v.size() == 2) // a min and a max for all variables + ptBounds = new eoRealVectorBounds(vecSize, v[0], v[1]); + else // no time now + throw runtime_error("Sorry, only unique bounds for all variables implemented at the moment. Come back later"); + // we need to give ownership of this pointer to somebody + /////////// end of temporary code + } + else // no param for bounds was given + ptBounds = new eoRealVectorNoBounds(vecSize); // DON'T USE eoDummyVectorNoBounds + // as it does not have any dimension + + // this is a temporary version(!), + // while Maarten codes the full tree-structured general operator input + // BTW we must leave that simple version available somehow, as it is the one + // that 90% people use! + eoValueParam& operatorParam = _parser.createParam(string("SGA"), "operator", "Description of the operator (SGA only now)", 'o', "Variation Operators"); + + if (operatorParam.value() != string("SGA")) + throw runtime_error("Sorry, only SGA-like operator available right now\n"); + + // now we read Pcross and Pmut, + // the relative weights for all crossovers -> proportional choice + // the relative weights for all mutations -> proportional choice + // and create the eoGenOp that is exactly + // crossover with pcross + mutation with pmut + + eoValueParam& pCrossParam = _parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ); + // minimum check + if ( (pCrossParam.value() < 0) || (pCrossParam.value() > 1) ) + throw runtime_error("Invalid pCross"); + + eoValueParam& pMutParam = _parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ); + // minimum check + if ( (pMutParam.value() < 0) || (pMutParam.value() > 1) ) + throw runtime_error("Invalid pMut"); + + // the crossovers + ///////////////// + // the parameters + eoValueParam& segmentRateParam = _parser.createParam(double(1.0), "segmentRate", "Relative rate for segment crossover", 's', "Variation Operators" ); + // minimum check + if ( (segmentRateParam.value() < 0) ) + throw runtime_error("Invalid segmentRate"); + + eoValueParam& arithmeticRateParam = _parser.createParam(double(2.0), "arithmeticRate", "Relative rate for arithmetic crossover", 'A', "Variation Operators" ); + // minimum check + if ( (arithmeticRateParam.value() < 0) ) + throw runtime_error("Invalid arithmeticRate"); + + // minimum check + bool bCross = true; + if (segmentRateParam.value()+arithmeticRateParam.value()==0) + { + cerr << "Warning: no crossover" << endl; + bCross = false; + } + + // Create the CombinedQuadOp + eoPropCombinedQuadOp *ptCombinedQuadOp = NULL; + eoQuadOp *ptQuad = NULL; + + if (bCross) + { + // segment crossover for bitstring - pass it the bounds + ptQuad = new eoSegmentCrossover(*ptBounds); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp = new eoPropCombinedQuadOp(*ptQuad, segmentRateParam.value()); + + // arithmetic crossover + ptQuad = new eoArithmeticCrossover(*ptBounds); + _state.storeFunctor(ptQuad); + ptCombinedQuadOp->add(*ptQuad, arithmeticRateParam.value()); + + // don't forget to store the CombinedQuadOp + _state.storeFunctor(ptCombinedQuadOp); + } + + // the mutations + ///////////////// + // the parameters + eoValueParam & epsilonParam = _parser.createParam(0.01, "epsilon", "Half-size of interval for Uniform Mutation", 'e', "Variation Operators" ); + // minimum check + if ( (epsilonParam.value() < 0) ) + throw runtime_error("Invalid epsilon"); + + eoValueParam & uniformMutRateParam = _parser.createParam(1.0, "uniformMutRate", "Relative rate for uniform mutation", 'u', "Variation Operators" ); + // minimum check + if ( (uniformMutRateParam.value() < 0) ) + throw runtime_error("Invalid uniformMutRate"); + + eoValueParam & detMutRateParam = _parser.createParam(1.0, "detMutRate", "Relative rate for deterministic uniform mutation", 'd', "Variation Operators" ); + // minimum check + if ( (detMutRateParam.value() < 0) ) + throw runtime_error("Invalid detMutRate"); + + eoValueParam & normalMutRateParam = _parser.createParam(1.0, "normalMutRate", "Relative rate for Gaussian mutation", 'd', "Variation Operators" ); + // minimum check + if ( (normalMutRateParam.value() < 0) ) + throw runtime_error("Invalid normalMutRate"); + + eoValueParam & sigmaParam = _parser.createParam(0.3, "sigma", "Sigma (fixed) for Gaussian mutation", 's', "Variation Operators" ); + + // minimum check + bool bMut = true; + if (uniformMutRateParam.value()+detMutRateParam.value()+normalMutRateParam.value()==0) + { + cerr << "Warning: no mutation" << endl; + bMut = false; + } + if (!bCross && !bMut) + throw runtime_error("No operator called in SGA operator definition!!!"); + + // Create the CombinedMonOp + eoPropCombinedMonOp *ptCombinedMonOp = NULL; + eoMonOp *ptMon = NULL; + + if (bMut) + { + // uniform mutation on all components: + // offspring(i) uniformly chosen in [parent(i)-epsilon, parent(i)+epsilon] + ptMon = new eoUniformMutation(*ptBounds, epsilonParam.value()); + _state.storeFunctor(ptMon); + // create the CombinedMonOp + ptCombinedMonOp = new eoPropCombinedMonOp(*ptMon, uniformMutRateParam.value()); + + // mutate exactly 1 component (uniformly) per individual + ptMon = new eoDetUniformMutation(*ptBounds, epsilonParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, detMutRateParam.value()); + + // mutate all component using Gaussian mutation + ptMon = new eoNormalMutation(*ptBounds, sigmaParam.value()); + _state.storeFunctor(ptMon); + ptCombinedMonOp->add(*ptMon, normalMutRateParam.value()); + _state.storeFunctor(ptCombinedMonOp); + } + + // now build the eoGenOp: + // to simulate SGA (crossover with proba pCross + mutation with proba pMut + // we must construct + // a sequential combination of + // with proba 1, a proportional combination of + // a QuadCopy and our crossover + // with proba pMut, our mutation + + // the crossover - with probability pCross + eoProportionalOp * cross = new eoProportionalOp ; + _state.storeFunctor(cross); + ptQuad = new eoQuadCloneOp; + _state.storeFunctor(ptQuad); + cross->add(*ptCombinedQuadOp, pCrossParam.value()); // user crossover + cross->add(*ptQuad, 1-pCrossParam.value()); // clone operator + + // now the sequential + eoSequentialOp *op = new eoSequentialOp; + _state.storeFunctor(op); + op->add(*cross, 1.0); // always crossover (but clone with prob 1-pCross + op->add(*ptCombinedMonOp, pMutParam.value()); + + // that's it! + return *op; +} +#endif diff --git a/eo/tutorial/html/eoLesson3.html b/eo/tutorial/html/eoLesson3.html index ef4c3f87..46e2e89f 100644 --- a/eo/tutorial/html/eoLesson3.html +++ b/eo/tutorial/html/eoLesson3.html @@ -142,7 +142,7 @@ See the parameter section of the Component-Based tutorial, or wait until class, whose only purpose is the input of parameters. -
eoParser: +
eoParser: Modifying parameter values at run-time:
Using an eoParser object, the parameter values are read, by order of priority @@ -154,7 +154,7 @@ are read, by order of priority
from a text file
  • -from the environment
  • +from the environment (forthcoming, if somebody insists)
  • from default values
  • @@ -174,8 +174,8 @@ the command-line or in a text file)
                   --longKeyword=value     -or     -c=value    -if 'c' is the short keyword +or     -cvalue    +if 'c' is the short keyword (though -c=value also works)
     
  • so, after compiling the executable for Lesson 3 (make diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html new file mode 100644 index 00000000..627cb24c --- /dev/null +++ b/eo/tutorial/html/eoLesson4.html @@ -0,0 +1,237 @@ + + + + + + Tutorial: Lesson 3 + + +Lesson 3 - +Lesson +5 - +Main page - +Algorithm-Based +- Component-Based - Hints +- EO +documentation +
    +
    +
    +

    +Tutorial Lesson 4: fully operational EA

    +In this lesson, you will still use the same Evolutionary Algorithm. But +this time you will have full control of all components +from the command-line or a parameter file. +You can even use the algorithm decribed here without any other knowledge +of EO, just by writing your fitness function as a plain C++ function. This +is why this lesson starts with a user's guide, +most of it being representation-independent, with some parts that are specific +of respectively the binary and the real +algorithms. +
    However, the ultimate purpose of this tutorial is to be able to do +your own experiments - and these these will likely fall outside the scope +of these two programs. This is why you should also read the programmer's +guides, as the structure and memory managements are here radically different +that in the 3 previous lessons - though relying of course on the same objects. +
      +

    +


    +
    User's +guide +
    As already said, the behavior of the algorithms +will be exactly the same as the previous one as far as optimization is +concerned. Only now you will be able to tune every component of the algorithms +- except the type of genotype - using run-time parameters. +
    Also, as in previous lessons, most of the code +is representation-independent, i.e. is the same for both the binary genotypes +and the real-valued genotypes. This small user's guide reflects that, but +you can go directly to the binary or the real +parts if you wish. Parameters input The way to input parameters has already +be described in Lesson 3. To get +a list of parameters, type the command with option --help (or -h): with +both testBit and testReal this will result in +
      +
    • +Printing the list of keywords on the standard output
    • + +
    • +Creating (or overwriting) a file name testBit.status +or testReal.status that contains the list of all recognized parameters +and has the format of an input parameter file.
    • +
    +User's guide: +The status file +
    This file will always contain the list of the +parameters that have been actually used by the last run of the program, +however thay have been entered (try testBit +-G1 and take a look a the +status file). The parameters that are commented out (a # character comments +out the rest of the line) in the file were not specified by the user. +

    User's guide: +Representation-independent parameters +
    The parameters are organized in sections. +
    The first section only contains the random seed. +

    ###### General ###### +
    # --help=0 # -h : Prints +this message +
    Whether or not help was requested is handled +through a boolean parameter +
    # --seed=988700289 # -S +: Random number seed +
    The seed for the Random +Number Generator +

    ###### Output ###### +
    This section contains parameters related to output +(to screen, to files, graphical, ...). +
    # --useEval=1 # Use nb of +eval. as counter (vs nb of gen.) +
    Boolean parameter, whether or not you want the +nb of evluations to be displayed and used as counter in plots +
    # --printBestStat=1 # Print +Best/avg/stdev every gen. +
    Boolean parameter, toggles screen output of indicated +statistics +
    # --plotBestStat=0 # Plot +Best/avg Stat +
    Boolean parameter, toggles gnuplot output of +best and average plots (Linux only at the moment) +
    # --BestFileName=best.xg +# Name of file for Best/avg/stdev +
    String parameter, if present, the statistics +are stored in that file (no default) +
    # --printPop=0 # Print sorted +pop. every gen. +
    Boolean parameter, adds a dump of the whole population +to the screen every generation +
    # --printFDC=1 # Print FDC +coeff. every gen. +
    Boolean parameter, adds Fitness Distance Correlation +to output every generation +
    # --plotFDCStat=0 # Plot +FDC scatter plot +
    Boolean parameter, toggles the Fitness Distance +Correlation plot (Fitness vs distance to best) +
    # --plotHisto=0 # Plot histogram +of fitnesses +
    Boolean parameter: if on, gnuplot is used to +plot the sorted population (fitness vs rank). Gives a graphical idea of +the diversity. +

    ###### Persistence ###### +
    This section contains parameters handling job +restart +
    # --Load= # -L : A save +file to restart from +
    String parameter: if present, the initial population +(and the RNG status) is read from indicated file. That file must +come from a previous save (or must be in same format!), i.e. must contain +a popualtion, the RNG and all parameters. If no other parameter is modified, +using a previously saved population and RNG will give exactly the same +results than having run that previous run longer. And a way to be sure +to re-use the same parameters is to ... use that very save file as parameter +file, as it contains all actual parameters in the right format. +
    Note that if not enough individuals are read, +the remaining are randomly initialized. No default value. +
    # --recomputeFitness=0 # +-r : Recompute the fitness after re-loading the pop.? +
    Boolean parameter: in case some individuals are +read from a file, their fitness is read too. If this one is true, it is +nevertheless recomputed. +
    # --saveFrequency=0 # Save +every F generation (0 = only final state, absent = never) +
    Integer parameter: interval between two dump +to disk of the whole population (+RNG + parameters) to disk, in a file +named genNN.sav, where NN is the generation number. If this prameter +is present (even with 0 or negative value), the final population will always +be saved, whatever the reason for stopping. Hence the only way to avoid +all saves is to omit the parameter (there is no default value). +
    # --saveTimeInterval=0 # +Save every T seconds (0 or absent = never) +
    Integer parameter: time interval between two +population (+RNG + parameters) dumps to disks. Files are names timeNN.sav. +See pervious parameter description for ore details. No default value. +
    # --status=t-eoGA.status +# Status file +
    String parameter: name of the status file (that +contains all parameters in the input format). There is no way to avoid +creating that file except recompiling ... or giving the name /dev/null +(Unix). +

    ###### Stopping criterion +###### +
    This section allows to decide when the algorithm +will stop. +
    # --maxGen=100 # -G : Maximum +number of generations (0 = none) +
    Integer parameter: maximum number of generations. +Default is 0 which is equivalent to infinity. +
    # --steadyGen=100 # -s : +Number of generations with no improvement +
    Integer parameter: stops whenever that number +of generations is passed without any improvement of the best fitness in +the population, provided the following minimum number of generations has +been done. No default value. +
    # --minGen=0 # -g : Minimum +number of generations +
    Integer parameter: the above steadyGen parameter +starts its job only after that minimum nuber of generations is passed. +No default value. +
    # --maxEval=0 # -E : Maximum +number of evaluations (0 = none) +
    Integer parameter: maximum number of generations. +No default value. +
    # --targetFitness=0 # -T +: Stop when fitness reaches +
    Real-valued parameter: the algorithm stops whenever +the best fitness reaches that target. No default value. +
    # --CtrlC=0 # -C : Terminate +current generation upon Ctrl C +
    Boolean parameter: if true, Ctrl C only stops +after the current generation as completed (eventually dumping population +to a file if some saver is active). +

    ###### engine ###### +
    In this section, one chooses all components of +the Evolution Engine (selection, replacemenet and the like). +
    # --selection=DetTour(2) +# -S : Selection: Roulette, DetTour(T), StochTour(t) or Sequential(ordered/unordered) +
    String parameter: Name of selection procedure. +Availabable are the roulette wheel +(name Roulette, +fitness scaling coming soon), deterministic +tournament (name DetTour +with size - integer > 2 - in parentheses right after the name, use double +quotes on the command line),  stochastic tournament (name StochTour +with probability - float in [0.5, 1] - in parentheses), sequential (name +Sequential, +all individuals in turn), either from best to worst (option ordered +in parentheses), or in random ordered (option unordered) +or finally repeated independent uniform choices  (name Random). +
    # --offspringRate=100% # +-O : Nb of offspring (percentage or absolute) +

    # --replacement=Comma # -R +: Replacement: Comma, Plus or EPTour(T) +
    String parameter: Name of replacement procedure. +Availabable are +
    # --weakElitism=0 # -w : +Old best parent replaces new worst offspring *if necessary* +
      +

    +


    +
    Programmer's +guide +
    Lesson +3 - +Lesson 5 - +Main +page - +Algorithm-Based - Component-Based +- Hints - EO +documentation +
    +
    +
    +Marc +Schoenauer
    + +
    Last +modified: None of your business! + + diff --git a/eo/tutorial/html/eoTopDown.html b/eo/tutorial/html/eoTopDown.html index 9ae7e34a..d69a71b7 100644 --- a/eo/tutorial/html/eoTopDown.html +++ b/eo/tutorial/html/eoTopDown.html @@ -47,24 +47,33 @@ populations, restart stopped runs, ...).
  • -


    Current version (Jan. 5, 2001) stops here, but ... +

  • +Lesson 4 - The same algorithms - again! - but now fully operational: +every component of the algorithm can be defined +on the command-line, except the type of genotype; +moreover, you now have a full library, i.e. everything except your fitness function is +already compiled. +
  • + +


    Current version (May. 5, 2001) stops here, but ...

    From there on, you don't need to follow the lesson order any more: you can go directly to any lesson and experiment. Of course, you will need to bring together the different pieces to write exactly what you want - but only because we had no idea of what you exactly want :-)
      +

  • -Lesson 4 - More about checkpointing: +Lesson 4 - More general operators: +e.g. binary, n-ary, or even specific mate selection (your brain and my +beauty)! Add your own to the basic algorithm using the template files.
  • + +
  • +Lesson 5 - More about checkpointing: write your first adaptive mechanism, and find out how easy it is to update and monitor dynamic parameters
  • -
  • -Lesson 5 - More general operators: -e.g. binary, n-ary, or even specific mate selection (your brain and my -beauty)!
  • -
  • Lesson 6 - Why not go parallel? From the simple asynchronous SSGA to the more sophisticated island model (no