diff --git a/eo/tutorial/html/eoLesson4.html b/eo/tutorial/html/eoLesson4.html
index 8699cb0ad..541c23058 100644
--- a/eo/tutorial/html/eoLesson4.html
+++ b/eo/tutorial/html/eoLesson4.html
@@ -15,13 +15,19 @@
- EO
documentation
+
User's guide:
-Parameter input The way to input parameters
+ User's guide:Parameter
+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
@@ -67,8 +74,8 @@ has already be described in Lesson
or testReal.status that contains the list of all recognized parameters
and has the format of an input parameter 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
@@ -80,8 +87,8 @@ by the user.
in sections. Note, however, that this format is not mandatory in the param
file, as only the keywords
are processed.
-
User's guide:Representation-independent -parameters +
User's guide:Representation-independent
+parameters
In what follows, the fixed font colored text
is directly taken from the status file and is commented between the lines.
The presentation follows the status file format - only two sections are
@@ -352,13 +359,13 @@ default value.
current generation upon Ctrl C
User's guide: -Bistring specific parameters +
User's guide:Bistring
+specific parameters
The following describes the specific parameters that are available
in program BitEA to evolve genotypes that are bitstrings.
The two representation-dependent sections are concerned repectively
@@ -453,13 +460,13 @@ operators).
User's guide: -Real-valued specific parameters +
User's guide:Real-valued
+specific parameters
The following describes the specific parameters that are available
in programs RealEA
and ESEA
to evolve genotypes that are vector<double>.
-
RealEA
+
RealEA
implements what can be called a "real-coded GA", where everything is identical
to the bitstring case above (except initialization and operators that are
specific to vector<double> of course) and ESEA
@@ -626,8 +633,8 @@ The value of standard deviation for Gaussian mutation - fixed along evolution
(see the Evolution Strategy program below for self-adaptive mutations).
User's guide: -ES-real-valued specific parameters +
User's guide:ES
+with self-adative mutation specific parameters
The following describes the specific parameters for program ESEA,
that implements the full Evolution-Strategy self-adaptive mutation mechanism
- together with specific ES crossover operators. The initialization section
@@ -724,7 +731,7 @@ The factor for the mutation of the rotation angles in the case of the full
correlated mutation. Default is 0.0873
(following Schwefel).
-
At the moment, you will have to browse in the source (colored!) code @@ -736,8 +743,8 @@ code of Lesson3, except for the memory management, performed through an eoState object (notice that all make_xxx calls have an eoState as second parameter). -
Programmer's guide: The -make_xxx files +
Programmer's guide: The +make_xxx files
Interface: all make_xxx
files have as first two parameters an eoParser
and an eoState.
@@ -798,7 +805,7 @@ management that this imposes.
Programmer's
-guide: Memory management
+guide: Memory management
As already said, all functions have an eoState
as second argument - and that object is used to store the functor objects
that were simply declared as variables of the main function up to now :
@@ -807,8 +814,8 @@ detailed explanations and take a look at the code of Programmer's
-guide: Memory management of eoParam
-objects
+guide: Memory management
+of eoParam objects
It has been seen in Lesson 3 that parameters could be read from command-line and/or a parameter file using an eoParser object. However, the memory mangement problem also concerns EO parameter @@ -837,13 +844,15 @@ to an eoParam object that is hold by the eoParser - and deleted whith it. between the arguments of the constructor of an eoParam object and the method createParam of an eoParser object: first, you need to provide the additional section parameter (used only when outputting the eoParser); second you -must make sure that the first argument -is of the correct type otherwise the compiler will complain. +must +make sure that the first argument is of the correct type otherwise the +compiler will complain.
Note that if you don't later need the eoParam, but simply its value, you can even diretly write
unsigned maxGen = _parser.createParam(unsigned(100), -"maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion").value(); -
Getting parameter values in different functions: +"maxGen", "Maximum number of generations () = none)",'G',"Stopping criterion").value(); +
Getting parameter values in different +functions:
It is often useful (though probably very bad
programming style :-))) to be able to get the value of a user-defined
parameter in two different places of the code without passing it around
@@ -852,7 +861,31 @@ with exactly the same syntax than cre
unsigned theSize =
+_parser.getORcreateParam(unsigned(10), "chromSize", "The length of the
+bitstrings", 'n',"Problem").value();
+ If you want to define that size earlier, you should write somewhere
+before
+ unsigned requiredSize
+= ... ;
+ Of course, if that size is mandatory, you should NOT modify it at run-time
+by entering anther value !
+
Be careful that the link between both parameters is made through their
longmanes (second argument), and that you must so hard-code
that name in two different places with of course exactly the same spelling!!!
+
Examples can be found for instance
+in the make_genotype_xxx files, for the sizes of the genotypes: it is often
+the case that the definition of the optimization problem requires (or computes)
+such size. The idea is then that you either read or compute that size,
+then create a (dummy) parameter with the name that is used later in the
+make_genotype file. For instance, for bitstrings, the make_genotype_ga.h
+contains the following line defining the size of the bitstring
+
+
_parser.createParam(requiredSize,
+"chromSize", "The length of the bitstrings", 'n',"Problem");
+
User's guide: General
+- Bitstring - Real - ES
+- Programmer's guide: General
+- Memory management - Parameters
+
Lesson
3 -
Lesson 5 -
@@ -864,8 +897,7 @@ documentation