Used spell-checker!!!
This commit is contained in:
parent
142c7d779c
commit
c1dd2dd127
6 changed files with 50 additions and 50 deletions
|
|
@ -86,13 +86,13 @@ below, or go directly to the <a href="#exercise1">exercises</a>.
|
||||||
<b><font color="#993300">General includes:</font></b><font color="#000000">Like
|
<b><font color="#993300">General includes:</font></b><font color="#000000">Like
|
||||||
all C-like code, the file starts with include directives (<a href="FirstBitGA.html#start">Bit</a>
|
all C-like code, the file starts with include directives (<a href="FirstBitGA.html#start">Bit</a>
|
||||||
- <a href="FirstRealGA.html#start">Real</a>). Apart from standard includes,
|
- <a href="FirstRealGA.html#start">Real</a>). Apart from standard includes,
|
||||||
the spedific file to include is </font><b><font color="#FF6600">eo</font></b><font color="#000000">:
|
the specific file to include is </font><b><font color="#FF6600">eo</font></b><font color="#000000">:
|
||||||
this is a file that contains the list of the most important EO files.</font></li>
|
this is a file that contains the list of the most important EO files.</font></li>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<li>
|
<li>
|
||||||
<b><font color="#999900">Representation</font></b><font color="#000000">:
|
<b><font color="#999900">Representation</font></b><font color="#000000">:
|
||||||
you then have to delclare the type of individuals you will be handling.
|
you then have to declare the type of individuals you will be handling.
|
||||||
All evolution-related objects you will need are templatized w.r.t. the
|
All evolution-related objects you will need are templatized w.r.t. the
|
||||||
type of individuals.</font></li>
|
type of individuals.</font></li>
|
||||||
|
|
||||||
|
|
@ -147,7 +147,7 @@ Random Number Generator</font><font color="#000000"> is called </font><b><tt><fo
|
||||||
and should be used everywhere you need a realization of a random variable
|
and should be used everywhere you need a realization of a random variable
|
||||||
of known law. Moreover, this RNG requires a </font><b><tt><font color="#660000"><font size=+1>seed</font></font></tt></b><font color="#000000">,
|
of known law. Moreover, this RNG requires a </font><b><tt><font color="#660000"><font size=+1>seed</font></font></tt></b><font color="#000000">,
|
||||||
which is set here (<a href="FirstBitGA.html#random">Bit</a> - <a href="FirstRealGA.html#random">Real</a>):
|
which is set here (<a href="FirstBitGA.html#random">Bit</a> - <a href="FirstRealGA.html#random">Real</a>):
|
||||||
everytime you run the algorithm with the </font><font color="#FF6600">same
|
every time you run the algorithm with the </font><font color="#FF6600">same
|
||||||
seed</font><font color="#000000">, you will get the </font><font color="#FF6600">same
|
seed</font><font color="#000000">, you will get the </font><font color="#FF6600">same
|
||||||
result</font><font color="#000000">. Hence, to test the robustness of your
|
result</font><font color="#000000">. Hence, to test the robustness of your
|
||||||
algorithm, you should run it with different seeds. This is rather time
|
algorithm, you should run it with different seeds. This is rather time
|
||||||
|
|
@ -245,7 +245,7 @@ is the standard <font color="#CC33CC">arithmetic crossover</font> for real-value
|
||||||
vectors, that chooses a point randomly on the segment between both parents
|
vectors, that chooses a point randomly on the segment between both parents
|
||||||
(also termed <font color="#CC33CC">BLX-0</font>). <b><font face="Arial,Helvetica"><font size=+1><a href="doc/html/class_eouniformmutation.html">eoUniformMutation</a></font></font></b>
|
(also termed <font color="#CC33CC">BLX-0</font>). <b><font face="Arial,Helvetica"><font size=+1><a href="doc/html/class_eouniformmutation.html">eoUniformMutation</a></font></font></b>
|
||||||
is the <font color="#CC33CC">uniform mutation</font> for real-valued vectors
|
is the <font color="#CC33CC">uniform mutation</font> for real-valued vectors
|
||||||
that choses a new value for each variable uniformly on an interval centered
|
that chooses a new value for each variable uniformly on an interval centered
|
||||||
on the parent value. The width of the interval is an <font color="#FF6600">internal
|
on the parent value. The width of the interval is an <font color="#FF6600">internal
|
||||||
parameter</font> of the object, here called <b><tt>EPSILON</tt></b>.</li>
|
parameter</font> of the object, here called <b><tt>EPSILON</tt></b>.</li>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ object that is a sub-class of the corresponding STL vector class.</font></li>
|
||||||
<p><b><font color="#FF0000">Note:</font></b> <font color="#000000">Also,
|
<p><b><font color="#FF0000">Note:</font></b> <font color="#000000">Also,
|
||||||
a non-templatized fitness can be </font><b><font color="#FF6600">compiled
|
a non-templatized fitness can be </font><b><font color="#FF6600">compiled
|
||||||
separately</font></b><font color="#000000"> (not done here) into an object
|
separately</font></b><font color="#000000"> (not done here) into an object
|
||||||
file once and forall (<a href="eoProgramming.html#templates">remember</a>
|
file once and for all (<a href="eoProgramming.html#templates">remember</a>
|
||||||
that templates forbid that).</font>
|
that templates forbid that).</font>
|
||||||
<br>
|
<br>
|
||||||
<li>
|
<li>
|
||||||
|
|
@ -134,12 +134,12 @@ sum up to 1, all rates are scaled anyway.
|
||||||
<p><b><font color="#FF0000">Note:</font></b> The operators have to be encapsulated
|
<p><b><font color="#FF0000">Note:</font></b> The operators have to be encapsulated
|
||||||
into an <b><tt><font color="#CC33CC">eoTransform</font></tt></b> object
|
into an <b><tt><font color="#CC33CC">eoTransform</font></tt></b> object
|
||||||
(<a href="FirstBitEA.html#transform">Bit</a> - <a href="FirstRealEA.html#transform">Real</a>)
|
(<a href="FirstBitEA.html#transform">Bit</a> - <a href="FirstRealEA.html#transform">Real</a>)
|
||||||
to be passed to the <b><tt><font color="#FF6666">eoEasyEA </font></tt></b>algorihtm.
|
to be passed to the <b><tt><font color="#FF6666">eoEasyEA </font></tt></b>algorithm.
|
||||||
The <b><tt><font color="#CC33CC">eoSGATransform</font></tt></b> is a simple
|
The <b><tt><font color="#CC33CC">eoSGATransform</font></tt></b> is a simple
|
||||||
<b><tt><font color="#CC33CC">eoTransform</font></tt></b>
|
<b><tt><font color="#CC33CC">eoTransform</font></tt></b>
|
||||||
that does exactly the same thing than <b><tt><font color="#FF6666">eoSGA</font></tt></b>:
|
that does exactly the same thing than <b><tt><font color="#FF6666">eoSGA</font></tt></b>:
|
||||||
each pair from the selected parents undergoes the <font color="#CC33CC">crossover
|
each pair from the selected parents undergoes the <font color="#CC33CC">crossover
|
||||||
operator with given probablity</font>, and all individuals (after crossover
|
operator with given probability</font>, and all individuals (after crossover
|
||||||
eventually) undergo <font color="#CC33CC">mutation with given probability</font>.
|
eventually) undergo <font color="#CC33CC">mutation with given probability</font>.
|
||||||
The arguments to the <b><tt><font color="#CC33CC">eoSGATransform</font></tt></b>
|
The arguments to the <b><tt><font color="#CC33CC">eoSGATransform</font></tt></b>
|
||||||
are an <b><tt><font color="#CC33CC">eoQuadOp</font></tt></b> with its probability
|
are an <b><tt><font color="#CC33CC">eoQuadOp</font></tt></b> with its probability
|
||||||
|
|
@ -182,7 +182,7 @@ a population (his <b><tt><font color="#660000">operator()</font></tt></b>
|
||||||
returns a population). This was done internally in the <a href="doc/html/class_eosga.html#a0">constructor
|
returns a population). This was done internally in the <a href="doc/html/class_eosga.html#a0">constructor
|
||||||
of eoSGA</a> - see lesson1.</ul>
|
of eoSGA</a> - see lesson1.</ul>
|
||||||
|
|
||||||
<hr WIDTH="100%"><a NAME="Exercise1"></a><b><font size=+2><font color="#000099">Exercice
|
<hr WIDTH="100%"><a NAME="Exercise1"></a><b><font size=+2><font color="#000099">Exercise
|
||||||
1: </font><font color="#FF0000">minimizing</font></font></b>
|
1: </font><font color="#FF0000">minimizing</font></font></b>
|
||||||
<br><font color="#000000">Modify the algorithm so that it minimizes the
|
<br><font color="#000000">Modify the algorithm so that it minimizes the
|
||||||
fitness.</font>
|
fitness.</font>
|
||||||
|
|
@ -201,16 +201,16 @@ the file <b><tt><a href="real_value.html">real_value.h</a></tt></b> so
|
||||||
that it returns the sum of squares instead of its inverse. And again there
|
that it returns the sum of squares instead of its inverse. And again there
|
||||||
is something else to modify...</font></li>
|
is something else to modify...</font></li>
|
||||||
</ul>
|
</ul>
|
||||||
<a NAME="exercise2"></a><b><font size=+2><font color="#000099">Exercice
|
<a NAME="exercise2"></a><b><font size=+2><font color="#000099">Exercise
|
||||||
2: </font><font color="#FF0000">initialization</font></font></b>
|
2: </font><font color="#FF0000">initialization</font></font></b>
|
||||||
<br><font color="#000000">Use different initializers: for instance, on
|
<br><font color="#000000">Use different initializers: for instance, on
|
||||||
the real-valued sphere function minimization, try to initialize half of
|
the real-valued sphere function minimization, try to initialize half of
|
||||||
the population in [-2,-1] and the other half in [1,2], with and without
|
the population in [-2,-1] and the other half in [1,2], with and without
|
||||||
the segment and arithmetic crossovers (and for large values of VEC_SIZE,
|
the segment and arithmetic crossovers (and for large values of VEC_SIZE,
|
||||||
the size of the vectors). Amazing, isn't it! Explain that result.</font>
|
the size of the vectors). Amazing, isn't it! Explain that result.</font>
|
||||||
<p><a NAME="Exercise3"></a><b><font size=+2><font color="#000099">Exercice
|
<p><a NAME="Exercise3"></a><b><font size=+2><font color="#000099">Exercise
|
||||||
3: </font><font color="#FF0000">replacement</font></font></b>
|
3: </font><font color="#FF0000">replacement</font></font></b>
|
||||||
<br><font color="#000000">You can now twidle the number of offspring that
|
<br><font color="#000000">You can now twiddle the number of offspring that
|
||||||
will be generated from the parents. But of course you need to adjust the
|
will be generated from the parents. But of course you need to adjust the
|
||||||
replacement to keep a constant population size.</font>
|
replacement to keep a constant population size.</font>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ file</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="#state">save</a> the population to disk, together with every part
|
<a href="#state">save</a> the population to disk, together with every part
|
||||||
of the algrithm you could think of - so you can decide to <font color="#FF6600">reload</font>
|
of the algorithm you could think of - so you can decide to <font color="#FF6600">reload</font>
|
||||||
everything later to continue the same run, eventually with different parameters.</li>
|
everything later to continue the same run, eventually with different parameters.</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
@ -79,7 +79,7 @@ after the encapsulation of our </font><font color="#CC0000">binary_function</fon
|
||||||
into an </font><b><tt><font color="#CC0000"><font size=+1>eoEvalFunc</font></font></tt></b><font color="#000000">
|
into an </font><b><tt><font color="#CC0000"><font size=+1>eoEvalFunc</font></font></tt></b><font color="#000000">
|
||||||
object, which again encapsulate the </font><b><tt><font color="#CC0000"><font size=+1>eoEvalFunc</font></font></tt></b><font color="#000000">
|
object, which again encapsulate the </font><b><tt><font color="#CC0000"><font size=+1>eoEvalFunc</font></font></tt></b><font color="#000000">
|
||||||
into an </font><b><tt><font color="#CC0000"><font size=+1>eoEvalFuncCounter</font></font></tt></b><font color="#000000">.
|
into an </font><b><tt><font color="#CC0000"><font size=+1>eoEvalFuncCounter</font></font></tt></b><font color="#000000">.
|
||||||
As its name says, thisobject will, in addition to computing the fitness,
|
As its name says, this object will, in addition to computing the fitness,
|
||||||
count the </font><b><font color="#FF6600">actual</font></b><font color="#000000">
|
count the </font><b><font color="#FF6600">actual</font></b><font color="#000000">
|
||||||
number of evaluations: the fitness of non-modified individuals is of course
|
number of evaluations: the fitness of non-modified individuals is of course
|
||||||
not recomputed - and this is taken care of by this object. Moreover, it
|
not recomputed - and this is taken care of by this object. Moreover, it
|
||||||
|
|
@ -129,11 +129,11 @@ for volunteers to create a Graphical User Interface :-)</font>
|
||||||
<li>
|
<li>
|
||||||
<font color="#000000">The </font><b><tt><font color="#3366FF">eoValueParam</font></tt></b><font color="#000000">
|
<font color="#000000">The </font><b><tt><font color="#3366FF">eoValueParam</font></tt></b><font color="#000000">
|
||||||
class, </font><font color="#FF6600">templatized by the type of the variable</font><font color="#000000">
|
class, </font><font color="#FF6600">templatized by the type of the variable</font><font color="#000000">
|
||||||
you want to handle (i.e. i</font><b><tt><font color="#660000">nteger, double,
|
you want to handle (i.e. i</font><b><tt><font color="#660000">integer, double,
|
||||||
yourPrivateClass</font></tt></b><font color="#000000">, ...). In this lesson,
|
yourPrivateClass</font></tt></b><font color="#000000">, ...). In this lesson,
|
||||||
we will not go into details: e.g. we will not tell you that the
|
we will not go into details: e.g. we will not tell you that the
|
||||||
<b><font face="Arial,Helvetica"><font size=+1><a href="doc/html/class_eovalueparam.html">eoValueParam</a></font></font></b>
|
<b><font face="Arial,Helvetica"><font size=+1><a href="doc/html/class_eovalueparam.html">eoValueParam</a></font></font></b>
|
||||||
is actually a templatized sub-class of abstract class eoParam (oups, I
|
is actually a templatized sub-class of abstract class eoParam (oops, I
|
||||||
said it!), nor will we deal with parameters outside their use from an eoParser.
|
said it!), nor will we deal with parameters outside their use from an eoParser.
|
||||||
See the parameter section of the Bottom-up tutorial, or wait until <a href="eoLesson4.html">lesson
|
See the parameter section of the Bottom-up tutorial, or wait until <a href="eoLesson4.html">lesson
|
||||||
4</a>).</font></li>
|
4</a>).</font></li>
|
||||||
|
|
@ -153,7 +153,7 @@ are read, by order of priority</font>
|
||||||
<font color="#000000">from a text file</font></li>
|
<font color="#000000">from a text file</font></li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<font color="#000000">from the environement</font></li>
|
<font color="#000000">from the environment</font></li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<font color="#000000">from default values</font></li>
|
<font color="#000000">from default values</font></li>
|
||||||
|
|
@ -186,7 +186,7 @@ in</li>
|
||||||
But you can now type in
|
But you can now type in
|
||||||
<br>
|
<br>
|
||||||
<b><tt><font color="#FF6666">SecondBitEA --vecSize=100</font></tt></b>
|
<b><tt><font color="#FF6666">SecondBitEA --vecSize=100</font></tt></b>
|
||||||
<br>and see the output of the optimization of OneMax on 100-bit bitstings.
|
<br>and see the output of the optimization of OneMax on 100-bit bitstrings.
|
||||||
<br>
|
<br>
|
||||||
<li>
|
<li>
|
||||||
Take a look at all available parameters by typing in</li>
|
Take a look at all available parameters by typing in</li>
|
||||||
|
|
@ -271,7 +271,7 @@ mechanism offers you better ways to do that - and it's so easy ....</font>
|
||||||
<p>
|
<p>
|
||||||
<hr WIDTH="100%"><a NAME="checkpoint"></a><b><font color="#000099"><font size=+2>eoCheckpoint:
|
<hr WIDTH="100%"><a NAME="checkpoint"></a><b><font color="#000099"><font size=+2>eoCheckpoint:
|
||||||
every generation I'd like to ...</font></font></b>
|
every generation I'd like to ...</font></font></b>
|
||||||
<br><font color="#000000">The checkpointing mechanism is a very powerfull
|
<br><font color="#000000">The checkpointing mechanism is a very powerful
|
||||||
construct to perform some </font><b><font color="#FF6600">systematic actions</font></b><font color="#000000">
|
construct to perform some </font><b><font color="#FF6600">systematic actions</font></b><font color="#000000">
|
||||||
every generation - like </font><font color="#FF6600">saving things</font><font color="#000000">
|
every generation - like </font><font color="#FF6600">saving things</font><font color="#000000">
|
||||||
(using eoState objects described above), computing </font><font color="#FF6600">statistics</font><font color="#000000">
|
(using eoState objects described above), computing </font><font color="#FF6600">statistics</font><font color="#000000">
|
||||||
|
|
@ -330,14 +330,14 @@ whatever this is).</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<b><tt><font color="#3366FF">eoAverageStat</font></tt></b> and <b><tt><font color="#3366FF">eoSecondMomentStat</font></tt></b>
|
<b><tt><font color="#3366FF">eoAverageStat</font></tt></b> and <b><tt><font color="#3366FF">eoSecondMomentStat</font></tt></b>
|
||||||
respectiveley return the average (type double, assumes that <b><tt><font color="#660000">FitnessType</font></tt></b>
|
respectively return the average (type double, assumes that <b><tt><font color="#660000">FitnessType</font></tt></b>
|
||||||
is castable to a double) and a pair made of the average and the standard
|
is castable to a double) and a pair made of the average and the standard
|
||||||
deviation (type <b><tt><font color="#660000">pair<double></font></tt></b>)
|
deviation (type <b><tt><font color="#660000">pair<double></font></tt></b>)
|
||||||
of the fitnesses in the populations.</li>
|
of the fitnesses in the populations.</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<b><tt><font color="#3366FF">eoDiversityStat</font></tt></b> returns the
|
<b><tt><font color="#3366FF">eoDiversityStat</font></tt></b> returns the
|
||||||
diversity in the population: asssuming that there is a distance function
|
diversity in the population: assuming that there is a distance function
|
||||||
defined among individuals, it returns the average inter-individuals distance.
|
defined among individuals, it returns the average inter-individuals distance.
|
||||||
See also Exercise 2.</li>
|
See also Exercise 2.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -346,8 +346,8 @@ within your algorithm, simply <a href="SecondBitEA.html#stat_declare">declare</a
|
||||||
the corresponding eoStat objects, and <a href="SecondBitEA.html#stat_pass">add</a>
|
the corresponding eoStat objects, and <a href="SecondBitEA.html#stat_pass">add</a>
|
||||||
them to the <b><tt><font color="#3366FF">eoCheckpoint</font></tt></b> you
|
them to the <b><tt><font color="#3366FF">eoCheckpoint</font></tt></b> you
|
||||||
use in the algorithm.
|
use in the algorithm.
|
||||||
<p><b><font color="#FF0000">Note</font></b>: actually, there are 2 disctinct
|
<p><b><font color="#FF0000">Note</font></b>: actually, there are 2 distinct
|
||||||
classes that compute and gove access to statistics: <b><tt><font color="#3366FF">eoStat</font></tt></b>
|
classes that compute and give access to statistics: <b><tt><font color="#3366FF">eoStat</font></tt></b>
|
||||||
and <b><tt><font color="#3366FF">eoSortedStat</font></tt></b>. As its name
|
and <b><tt><font color="#3366FF">eoSortedStat</font></tt></b>. As its name
|
||||||
indicate, the latter is used whenever computing the statistics require
|
indicate, the latter is used whenever computing the statistics require
|
||||||
a sorted population: not only this avoids to sort the population many times,
|
a sorted population: not only this avoids to sort the population many times,
|
||||||
|
|
@ -368,8 +368,8 @@ are available in th eEO distribution:
|
||||||
<b><tt><font color="#3366FF">eoStdoutMonitor</font></tt></b> displays its
|
<b><tt><font color="#3366FF">eoStdoutMonitor</font></tt></b> displays its
|
||||||
parameters in <font color="#FF6600">text format on the screen</font>. The
|
parameters in <font color="#FF6600">text format on the screen</font>. The
|
||||||
(optional) boolean value in the constructor modifies the output: when true
|
(optional) boolean value in the constructor modifies the output: when true
|
||||||
(the default), vebose output is used, with one line per parameter. When
|
(the default), verbose output is used, with one line per parameter. When
|
||||||
false, parcimonious output displays one line for all parameters.</li>
|
false, parsimonious output displays one line for all parameters.</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<b><tt><font color="#3366FF">eoStdoutMonitor</font></tt></b> writes its
|
<b><tt><font color="#3366FF">eoStdoutMonitor</font></tt></b> writes its
|
||||||
|
|
@ -414,7 +414,7 @@ are available in the EO distribution:
|
||||||
<b><tt><font color="#3366FF">eoIncrementor</font></tt></b> A simple updater
|
<b><tt><font color="#3366FF">eoIncrementor</font></tt></b> A simple updater
|
||||||
which maintains a <font color="#FF6600">counter</font> (an <b><tt><font color="#3366FF">eoValueParam</font></tt></b>
|
which maintains a <font color="#FF6600">counter</font> (an <b><tt><font color="#3366FF">eoValueParam</font></tt></b>
|
||||||
that needs to be created beforehand, and passed in the constructor). It
|
that needs to be created beforehand, and passed in the constructor). It
|
||||||
is incremented everytime the <b><tt><font color="#660000">operator()</font></tt></b>
|
is incremented every time the <b><tt><font color="#660000">operator()</font></tt></b>
|
||||||
method is called (every generation at the moment). You can of course also
|
method is called (every generation at the moment). You can of course also
|
||||||
give an increment in the constructor (1 by default).</li>
|
give an increment in the constructor (1 by default).</li>
|
||||||
|
|
||||||
|
|
@ -442,7 +442,7 @@ the state to some state-saver - and don't forget to <a href="SecondBitEA.html#st
|
||||||
the statesavers to the current <b><tt><font color="#3366FF">eoCheckpoint</font></tt></b>.
|
the statesavers to the current <b><tt><font color="#3366FF">eoCheckpoint</font></tt></b>.
|
||||||
<br>
|
<br>
|
||||||
<hr WIDTH="100%">
|
<hr WIDTH="100%">
|
||||||
<br><b><font color="#000099"><font size=+2>Exercice 1:</font></font></b>
|
<br><b><font color="#000099"><font size=+2>Exercise 1:</font></font></b>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<font color="#000000">The code of </font><b><tt><font color="#660000"><font size=+1>SecondBitEA</font></font></tt></b><font color="#000000">
|
<font color="#000000">The code of </font><b><tt><font color="#660000"><font size=+1>SecondBitEA</font></font></tt></b><font color="#000000">
|
||||||
|
|
@ -459,25 +459,25 @@ otherwise the standard deviations won't make any sense here.</font></li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<font color="#000000">Please try to understand why the average is always
|
<font color="#000000">Please try to understand why the average is always
|
||||||
0 before taking alook at the solution (file <a href="NoWay.html">exercise1.cpp</a>).</font></li>
|
0 before taking a look at the solution (file <a href="NoWay.html">exercise1.cpp</a>).</font></li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<font color="#000000">Then run</font></li>
|
<font color="#000000">Then run</font></li>
|
||||||
|
|
||||||
<br><b><tt><font color="#660000"><font size=+1>
|
<br><b><tt><font color="#660000"><font size=+1>
|
||||||
exercise1 --vecSize=1000 --maxGen=1000</font></font></tt></b>
|
exercise1 --vecSize=1000 --maxGen=1000</font></font></tt></b>
|
||||||
<br><font color="#000000">to get a chance to see something hapenning before
|
<br><font color="#000000">to get a chance to see something happening before
|
||||||
the program ends!</font></ul>
|
the program ends!</font></ul>
|
||||||
|
|
||||||
<hr WIDTH="100%"><b><font color="#000099"><font size=+2>Exercice 2:</font></font></b>
|
<hr WIDTH="100%"><b><font color="#000099"><font size=+2>Exercise 2:</font></font></b>
|
||||||
<br><font color="#000000">Write the </font><b><tt><font color="#3366FF">eoDiversityStat</font></tt></b><font color="#000000">
|
<br><font color="#000000">Write the </font><b><tt><font color="#3366FF">eoDiversityStat</font></tt></b><font color="#000000">
|
||||||
stat computation and test it. Thanks to send us the code!</font>
|
stat computation and test it. Thanks to send us the code!</font>
|
||||||
<br>
|
<br>
|
||||||
<hr WIDTH="100%">
|
<hr WIDTH="100%">
|
||||||
<br><b><font color="#000099"><font size=+2>Exercice 3:</font></font></b>
|
<br><b><font color="#000099"><font size=+2>Exercise 3:</font></font></b>
|
||||||
<br><font color="#000000">Write the code for an </font><b><tt><font color="#3366FF"><font size=+1>eoGnuplot1DwithErrorbarsMonitor</font></font></tt></b><font color="#000000">
|
<br><font color="#000000">Write the code for an </font><b><tt><font color="#3366FF"><font size=+1>eoGnuplot1DwithErrorbarsMonitor</font></font></tt></b><font color="#000000">
|
||||||
that would take into account the standard deviations and display them as
|
that would take into account the standard deviations and display them as
|
||||||
errorbars.</font>
|
error-bars.</font>
|
||||||
<br><font color="#000000">Again, send us the code afterwards, thanks :-)</font>
|
<br><font color="#000000">Again, send us the code afterwards, thanks :-)</font>
|
||||||
<br>
|
<br>
|
||||||
<hr WIDTH="100%">
|
<hr WIDTH="100%">
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ are that
|
||||||
functors are functions with private data</li>
|
functors are functions with private data</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
you can have different funtors objects of the same class, i.e. you can
|
you can have different functors objects of the same class, i.e. you can
|
||||||
use the same functionality with different parameters</li>
|
use the same functionality with different parameters</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
@ -165,15 +165,15 @@ function.
|
||||||
<p><b><font color="#000099">Drawbacks</font></b>
|
<p><b><font color="#000099">Drawbacks</font></b>
|
||||||
<br>The main drawback I see in using STL is that it makes it almost
|
<br>The main drawback I see in using STL is that it makes it almost
|
||||||
<b><font color="#FF6600">impossible
|
<b><font color="#FF6600">impossible
|
||||||
to use a debugger </font></b>normally: whereas acess to data is made simple
|
to use a debugger </font></b>normally: whereas access to data is made simple
|
||||||
to the progammer, data structures are actually so complex, and debuggers
|
to the programmer, data structures are actually so complex, and debuggers
|
||||||
so willing to display everything that you get lines of template instanciation
|
so willing to display everything that you get lines of template instantiation
|
||||||
when asking your debugger what is inside some container! For instance I
|
when asking your debugger what is inside some container! For instance I
|
||||||
could never visualize some
|
could never visualize some
|
||||||
<tt><font color="#FF6600"><font size=+1>v[i]</font></font></tt>
|
<tt><font color="#FF6600"><font size=+1>v[i]</font></font></tt>
|
||||||
with <tt><font color="#FF6600"><font size=+1>gbd</font></font></tt>, v
|
with <tt><font color="#FF6600"><font size=+1>gbd</font></font></tt>, v
|
||||||
being an STL vector!
|
being an STL vector!
|
||||||
<br>But there nonehteless are so many advantages !!!
|
<br>But there nonetheless are so many advantages !!!
|
||||||
<p>
|
<p>
|
||||||
<hr WIDTH="100%">
|
<hr WIDTH="100%">
|
||||||
<br><a NAME="random"></a><b><font color="#000099"><font size=+1>Random
|
<br><a NAME="random"></a><b><font color="#000099"><font size=+1>Random
|
||||||
|
|
@ -183,7 +183,7 @@ numbers are simulated in computers by using <font color="#FF6600">pseudo-random<
|
||||||
number generators (RNGs for short), i.e. functions that return series of
|
number generators (RNGs for short), i.e. functions that return series of
|
||||||
numbers who look random (w.r.t. some statistical criteria).
|
numbers who look random (w.r.t. some statistical criteria).
|
||||||
<p>To make sure the random number generator is as good as possible, and
|
<p>To make sure the random number generator is as good as possible, and
|
||||||
to ensure reproducibility of the results across diffrerent platforms, EO
|
to ensure reproducibility of the results across different platforms, EO
|
||||||
has its own RNG, the ``<font color="#FF6600">Mersenne Twister</font>''
|
has its own RNG, the ``<font color="#FF6600">Mersenne Twister</font>''
|
||||||
random number generator MT19937 (thanks to <font color="#FF0000">Takuji
|
random number generator MT19937 (thanks to <font color="#FF0000">Takuji
|
||||||
Nishimura</font>, see <font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/class_eorng.html">eoRNG.h</a></font></font>
|
Nishimura</font>, see <font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/class_eorng.html">eoRNG.h</a></font></font>
|
||||||
|
|
@ -205,12 +205,12 @@ use the RNG seeding procedure, see e.g. in <a href="FirstBitGA.html#random">Less
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
to simulate "true" random runs, you can just seed the RNG with a machine-clock
|
to simulate "true" random runs, you can just seed the RNG with a machine-clock
|
||||||
realted number, e.g. calling time(0), as done for isntance in <a href="SecondBitEA.html#random">Lesson3</a>
|
related number, e.g. calling time(0), as done for instance in <a href="SecondBitEA.html#random">Lesson3</a>
|
||||||
(and after).</li>
|
(and after).</li>
|
||||||
</ul>
|
</ul>
|
||||||
As RNGs only produce (by definition) numbers that are uniformly distributed
|
As RNGs only produce (by definition) numbers that are uniformly distributed
|
||||||
integers between 0 and some maximal number, EO provides you with random
|
integers between 0 and some maximal number, EO provides you with random
|
||||||
numbers follwing <b><font color="#FF6600">different probability distribution</font></b>
|
numbers following <b><font color="#FF6600">different probability distribution</font></b>
|
||||||
(e.g. floating point following <font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/class_eorng.html#a8">normal
|
(e.g. floating point following <font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/class_eorng.html#a8">normal
|
||||||
distribution</a></font></font>).
|
distribution</a></font></font>).
|
||||||
<p>EO also provides <a href="../../doc/html/rnd_generators.h-source.html">random_generators</a>
|
<p>EO also provides <a href="../../doc/html/rnd_generators.h-source.html">random_generators</a>
|
||||||
|
|
@ -225,14 +225,14 @@ and naming style</font></font></b>
|
||||||
EO:
|
EO:
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
The name of local varoiables shoudl start with a lower case letter</li>
|
The name of local variables should start with a lower case letter</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
The name of the parameters to a function shoudl start with an underscore
|
The name of the parameters to a function should start with an underscore
|
||||||
(_)</li>
|
(_)</li>
|
||||||
|
|
||||||
<br>The initialization parameters of constructors, for instance,
|
<br>The initialization parameters of constructors, for instance,
|
||||||
shoudl be named from the names of the variables they are used to initialize.
|
should be named from the names of the variables they are used to initialize.
|
||||||
<li>
|
<li>
|
||||||
The names of classes should start with eo + an Uppercase letter</li>
|
The names of classes should start with eo + an Uppercase letter</li>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ populations,
|
||||||
...).</li>
|
...).</li>
|
||||||
|
|
||||||
<p><br>Current version (Nov. 29, 2000) stops here, but here are the plans
|
<p><br>Current version (Nov. 29, 2000) stops here, but here are the plans
|
||||||
(sujected to many changes, of course!)
|
(subjected to many changes, of course!)
|
||||||
<br>
|
<br>
|
||||||
<li>
|
<li>
|
||||||
Lesson 4 - More about checkpointing: write your first <font color="#FF6600">adaptive
|
Lesson 4 - More about checkpointing: write your first <font color="#FF6600">adaptive
|
||||||
|
|
@ -69,7 +69,7 @@ Lesson 7 - ...</li>
|
||||||
</ul>
|
</ul>
|
||||||
Of course, in each lesson, you have links to the Bottom-Up page of the
|
Of course, in each lesson, you have links to the Bottom-Up page of the
|
||||||
corresponding component of an EA you are modifying.
|
corresponding component of an EA you are modifying.
|
||||||
<br>( ... Well, to tell you the truth, as of today, november 28, this is
|
<br>( ... Well, to tell you the truth, as of today, November 28, this is
|
||||||
not true :-)
|
not true :-)
|
||||||
<br>
|
<br>
|
||||||
<hr WIDTH="100%">
|
<hr WIDTH="100%">
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ EAs :-)
|
||||||
This tutorial can be used in 2 different ways: top-down and bottom-up.
|
This tutorial can be used in 2 different ways: top-down and bottom-up.
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a href="eoTopdown.html">Top-down</a> means you start from a <font color="#FF6600">very
|
<a href="eoTopDown.html">Top-down</a> means you start from a <font color="#FF6600">very
|
||||||
simple, ready-to-run algorithm,</font> and gradually modify it, making
|
simple, ready-to-run algorithm,</font> and gradually modify it, making
|
||||||
it both more powerful and more complex.</li>
|
it both more powerful and more complex.</li>
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@ brief introduction</a>).</li>
|
||||||
|
|
||||||
<p><br><b><font color="#000099"><font size=+2>Colors and navigation:</font></font></b>
|
<p><br><b><font color="#000099"><font size=+2>Colors and navigation:</font></font></b>
|
||||||
<p>You will see this diagram in quite many places, as for instance at the
|
<p>You will see this diagram in quite many places, as for instance at the
|
||||||
top of all examples - usually it will be clicable and will help you navigate
|
top of all examples - usually it will be clickable and will help you navigate
|
||||||
among the different parts of an EO program. See the <a href="eoIntroEA.html">brief
|
among the different parts of an EO program. See the <a href="eoIntroEA.html">brief
|
||||||
introduction to Evolutionary Computation</a> for a detailed explanation.
|
introduction to Evolutionary Computation</a> for a detailed explanation.
|
||||||
<center>
|
<center>
|
||||||
|
|
@ -108,8 +108,8 @@ any of the above, i.e. random number generator, or basic C++/STL syntax
|
||||||
.</li>
|
.</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
Note that <font color="#FF6666">pink</font> will be used to desctibe the
|
Note that <font color="#FF6666">pink</font> will be used to describe the
|
||||||
syntax of compile orders (i.e. at the oepratoring system level, see e.g.
|
syntax of compile orders (i.e. at the operating system level, see e.g.
|
||||||
<a href="#install">below</a>).</li>
|
<a href="#install">below</a>).</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
@ -120,10 +120,10 @@ will use the Helvetica typeface, like this line you are now reading.</font></li>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
an interface that would allow you to build your Evolutionary Programs by
|
an interface that would allow you to build your Evolutionary Programs by
|
||||||
a few clics; such a thing does exist, is called <a href="http://www-rocq.inria.fr/EASEA/">EASEA</a>,
|
a few clicks; such a thing does exist, is called <a href="http://www-rocq.inria.fr/EASEA/">EASEA</a>,
|
||||||
and is complementary to this tutorial as it helps the user to build some
|
and is complementary to this tutorial as it helps the user to build some
|
||||||
simple EO programs from simple description. But there are things that EASEA
|
simple EO programs from simple description. But there are things that EASEA
|
||||||
cannot do, and you will have to do it yourself and will need to imcrease
|
cannot do, and you will have to do it yourself and will need to increase
|
||||||
your knowledge about EO for that.</li>
|
your knowledge about EO for that.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a NAME="install"></a>
|
<a NAME="install"></a>
|
||||||
|
|
|
||||||
Reference in a new issue