A few errors + local TOC at top of eoEngine

This commit is contained in:
evomarc 2000-12-19 18:32:09 +00:00
commit 25dd305ee6
2 changed files with 73 additions and 74 deletions

View file

@ -2,55 +2,27 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (X11; U; Linux 2.2.17-21mdk i686) [Netscape]">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (X11; U; Linux 2.2.17-21mdksmp i686) [Netscape]">
<title>Genetic Engine</title>
</head>
<body text="#000000" link="#0000EF" vlink="#51188E" alink="#FF0000" background="beige009.jpg">
<a href="eoTopDown.html">Algorithm-Based</a> - <a href="eoBottomUp.html">Component-Based</a>
- <a href="eoProgramming.html">Programming hints</a> - <b><font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/index.html">EO
documentation</a></font></font></b>
<b><font color="#CC0000">General: </font></b><a href="eoTopDown.html">Algorithm-Based</a>
- <a href="eoBottomUp.html">Component-Based</a> - <a href="eoProgramming.html">Programming
hints</a> - <b><font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/index.html">EO
documentation
<hr WIDTH="100%"></a></font></font><font color="#CC0000">Local: </font></b><a href="#introduction">Introduction</a>&nbsp;
- <a href="#selection">Selection</a> - <a href="#replacement">Replacement</a>
- <a href="#popular">Popular evolution engines</a> - <a href="#tournament">Tournaments</a>
- <a href="#merge">Merge</a> - <a href="#reduce">Reduce</a> - <a href="#howmany">HowMany</a>
- <a href="#SAD">SurviveAndDie</a>
<hr WIDTH="100%">
<center>
<h1>
<b><font color="#CC0000">Evolution Engine</font></b></h1></center>
<p><br><b><font color="#000099"><font size=+2>Contents</font></font></b>
<ul>
<li>
<a href="#introduction">Introduction</a></li>
<li>
<a href="#selection">Selection</a> choice of parents that will be allowed
to <b><font color="#FF6600">reproduce</font></b></li>
<li>
<a href="#replacement">Replacement</a> choice of individuals that will
<b><font color="#FF6600">survive</font></b></li>
<li>
Popular <a href="#popular">evolution engines</a> all historical evolution
engines are implemented in EO</li>
<li>
Helper classes:</li>
<li>
<a href="#tournament">tournaments</a>, are intensively used within selection
and replacement procedures</li>
<li>
<a href="#howmany">rate-or-number</a> is used to decide whether to return
a relative (to the current population size) or absolute number, when something
should return more than one individual.</li>
<li>
<a href="#SAD">Survive-and-die</a>, a functor class with two populations
arguments: saves some from the first in the second, and kill some others
from the first. Used in replacements only.</li>
</ul>
<hr WIDTH="100%">
<br><a NAME="introduction"></a><b><font color="#000099"><font size=+2>Introduction</font></font></b>
<br><a NAME="introduction"></a><b><font color="#000099"><font size=+2>Evolution
Engines</font></font></b>
<p>The term <b><font color="#FF6600">evolution engine</font></b> denotes
the different parts of an Evolutionary Algorithm that simulate the Darwinism:
<center>
@ -124,6 +96,20 @@ and you can probably guess what each of them actually does :-)</li>
<br>&nbsp;
<p>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<p>Available <font color="#FF6600">instances of eoMergeReduce</font> replacement
include
<ul>
@ -371,8 +357,8 @@ as parameter in the constructor (default is 0.75).</li>
<p><br>
<hr WIDTH="100%">
<br><a NAME="howmany"></a><b><font color="#000099"><font size=+2>Relative
or absolute number of individuals</font></font></b>
<br><a NAME="howmany"></a><b><font color="#000099"><font size=+2>eoHowMany:
Choosing a number of individuals</font></font></b>
<p>Many classes in selection/replacement procedures will handle a number
of individuals that may either be fixed or be a fraction of some argument-population
size.
@ -401,7 +387,8 @@ derives from
<p>Its constructor takes 2 argumenrts:
<center>
<p><b><tt><font color="#993300">eoHowMany(double _rate, bool _interpret_as_rate
= true)</font></tt></b></center>
=
true)</font></tt></b></center>
so by default the double is indeed interpreted as a rate.
<p>It is used in <font color="#009900">eoSelectMany</font> (which supersedes
<font color="#009900">eoSelectPerc</font>
@ -413,15 +400,22 @@ methods.
<br><a NAME="SAD"></a><b><font color="#000099"><font size=+2>Survive and
Die</font></font></b>
<p>
<hr WIDTH="100%"><a href="eoTopDown.html">Algorithm-Based</a> - <a href="eoBottomUp.html">Component-Based</a>
- <a href="eoProgramming.html">Programming hints</a> -<b><font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/index.html">EO
documentation</a></font></font></b>
<hr WIDTH="100%"><b><font color="#CC0000">Local: </font></b><a href="#introduction">Introduction</a>&nbsp;
- <a href="#selection">Selection</a> - <a href="#replacement">Replacement</a>
- <a href="#popular">Popular evolution engines</a> - <a href="#tournament">Tournaments</a>
- <a href="#merge">Merge</a> - <a href="#reduce">Reduce</a> - <a href="#howmany">HowMany</a>
- <a href="#SAD">SurviveAndDie</a>
<br>
<hr>
<hr WIDTH="100%">
<br><b><font color="#CC0000">General: </font></b><a href="eoTopDown.html">Algorithm-Based</a>
- <a href="eoBottomUp.html">Component-Based</a> - <a href="eoProgramming.html">Programming
hints</a> - <b><font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/index.html">EO
documentation</a></font></font></b>
<hr WIDTH="100%">
<address>
<a href="mailto:Marc.Schoenauer@polytechnique.fr">Marc Schoenauer</a></address>
<br><!-- Created: Mon Oct 30 07:27:13 CET 2000 --><!-- hhmts start -->Last
modified: Tue. Dec. 5 2000&nbsp;<!-- hhmts end -->
modified: Tue. Dec. 19 2000&nbsp;<!-- hhmts end -->
</body>
</html>

View file

@ -2,12 +2,12 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (X11; U; Linux 2.2.17-21mdk i686) [Netscape]">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (X11; U; Linux 2.2.17-21mdksmp i686) [Netscape]">
<title>Variation Operators</title>
</head>
<body text="#000000" link="#0000EF" vlink="#51188E" alink="#FF0000" background="beige009.jpg">
<b><font color="#FF0000">General</font></b>: <a href="eoTopDown.html">Algorithm-Based
page</a> - <a href="eoBottomUp.html">Component-Based</a> - <a href="eoProgramming.html">Programming
<b><font color="#FF0000">General</font></b>: <a href="eoTopDown.html">Algorithm-Based</a>
- <a href="eoBottomUp.html">Component-Based</a> - <a href="eoProgramming.html">Programming
hints</a> - <b><font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/index.html">EO
documentation</a></font></font></b>
<br>
@ -105,8 +105,7 @@ the <b><font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/class_
class.</li>
</ul>
<hr WIDTH="100%">
<a NAME="crossover"></a><b><font size=+1><font color="#000099">Simple
<hr WIDTH="100%"><a NAME="crossover"></a><b><font size=+1><font color="#000099">Simple
operators: </font><font color="#FF0000">Crossover</font></font></b>
<p>The characteristic of crossover operators is that they involve two parents.
However, there are crossover operators that generate two parents, and some
@ -236,8 +235,7 @@ EO might not know it should compute the fitness again and will keep the
old value.</li>
</ul>
<hr WIDTH="100%">
<a NAME="proportional_simple"></a><b><font size=+1><font color="#000099">Combining
<hr WIDTH="100%"><a NAME="proportional_simple"></a><b><font size=+1><font color="#000099">Combining
simple operators: </font><font color="#FF0000">proportional combinations</font></font></b>
<p>The best thing to do is to go to the <a href="eoLesson2.html#combined_operators">Lesson2</a>
of the tutorial, where everything is explained. You will find out how you
@ -289,18 +287,18 @@ _pop)</font></tt></b>
<br><b><tt><font color="#993300">{</font></tt></b>
<br><tt><font color="#993300"><b>&nbsp; EOT &amp; eo1 = *_pop; </b>// get
(select if necessary) the guy</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</b>// advance</font></tt>
<br><tt><font color="#993300"><b>&nbsp; EOT &amp; eo2 = *_pop; </b>// get
(select if necessary) the guy</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</b>// advance</font></tt>
<br><b><tt><font color="#993300">...</font></tt></b>
<br><tt><font color="#993300"><b>&nbsp; EOT &amp; eoN = *_pop; </b>// get
(select if necessary) the guy</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</b>// advance</font></tt>
<p><tt><font color="#993300">// do whatever the operator is supposed to
@ -320,14 +318,12 @@ were parents</font>, it needs to insert them into the list using the <b><tt><fon
method of the class <b><font color="#999900">eoPopulator</font></b> as
in the following:</li>
<br>&nbsp;
<p>&nbsp;
<p><b><tt><font color="#993300">void operator()(</font><font color="#999900">eoPopulator</font><font color="#993300">&amp;
<p><br><b><tt><font color="#993300">void operator()(</font><font color="#999900">eoPopulator</font><font color="#993300">&amp;
_pop)</font></tt></b>
<br><b><tt><font color="#993300">{</font></tt></b>
<br><tt><font color="#993300"><b>&nbsp; EOT &amp; eo1 = *_pop; </b>// get
(select if necessary) the guy</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</b>// advance</font></tt>
<br><tt><font color="#993300">&nbsp; // Now create second offspring - eo1
@ -351,36 +347,45 @@ If you think "generational", the first idea is to get the parents from
outside the curent list, so the total number of (intermediate) offspring
is always equal to the initial population size. By chance, the <b><font color="#999900">eoPopulator</font></b>has
a handle on the initial population that was used to start the process,
and you can access it from inside the GenOp method. For instance
and you can access it from inside the GenOp method. For instance</li>
<br>&nbsp;
<p>&nbsp;
<p><b><tt><font color="#993300">void operator()(</font><font color="#999900">eoPopulator</font><font color="#993300">&amp;
_pop)</font></tt></b>
<br><b><tt><font color="#993300">{</font></tt></b>
<br><tt><font color="#993300"><b>&nbsp; EOT &amp; eo1 = *_pop; </b>// get
(select if necessary) the guy</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b>// advance</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</b>// advance</font></tt>
<br><b><tt><font color="#993300">&nbsp; const EOT &amp; eo2 = </font><font color="#009900">select</font><font color="#993300">(_pop.source());</font></tt></b>
<p>where select is any selector you like. Note the const: you are not allowed
to modify an element of the original population (but you could of course
have copied it!). Now to find out where that selector comes from, you'll
have to wait until next section. If you can't wait, go directly there.</li>
have to wait until next section. If you can't wait, go directly there.
<li>
If you don't care about the size of the offspring population, you can use
the delete method of the class <b><font color="#999900">eoPopulator</font></b>.
For instance
For instance</li>
<br><b><tt><font color="#993300">void operator()(</font><font color="#999900">eoPopulator</font><font color="#993300">&amp;
_pop)</font></tt></b>
<br><b><tt><font color="#993300">{</font></tt></b>
<br><tt><font color="#993300"><b>&nbsp; EOT &amp; eo1 = *_pop; </b>// get
(select if necessary) the guy</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b>// advance</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</b>// advance</font></tt>
<br><tt><font color="#993300"><b>&nbsp; EOT &amp; eo2 = *_pop; </b>// get
(select if necessary) the guy</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b>// advance</font></tt>
<br><tt><font color="#993300"><b>&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</b>// advance</font></tt>
<br><tt><font color="#993300">&nbsp; // do whatever needs to be done, modifying
eo1 but not eo2</font></tt>
<br><tt><font color="#993300"><b>&nbsp; _pop.delete();&nbsp;&nbsp; </b>//
removes (untouched) eo2 from the list</font></tt></li></ul>
removes (untouched) eo2 from the list</font></tt></ul>
</ul>
<b><font color="#FF6600">Warning</font></b>: if you use operators that
have different number of parents than offspring, you are deviating from
@ -636,10 +641,10 @@ _pop)</font></tt></b>
<br><b><tt><font color="#993300">{</font></tt></b>
<br><tt><font color="#993300"><b>&nbsp; EOT &amp; eo1 = *_pop; </b>// get
(select if necessary) the first guy</font></tt>
<br><b><tt><font color="#993300">&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<br><b><tt><font color="#993300">&nbsp; ++_pop;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</font></tt></b><tt><font color="#993300">// advance</font></tt>
<br><b><tt><font color="#993300">&nbsp; EOT &amp; eo2 = </font><font color="#009900">findBlonde</font><font color="#993300">(_pop.source());&nbsp;
<br><b><tt><font color="#993300">&nbsp; EOT &amp; eo2 = </font><font color="#009900">findBlonde</font><font color="#993300">(_pop.source());
</font></tt></b><tt><font color="#993300">// select mate</font></tt>
<br><tt><font color="#993300">// do whatever the operator is supposed to
@ -656,8 +661,8 @@ in its constructor for instance, which should give something like:
- <a href="#proportional_simple">Combinations</a> - <a href="#general">General
Operators</a> - <a href="#populators">Populators</a> - <a href="#general_combination">General
combinations</a>- <a href="#advanced_general">Advanced operators
<hr WIDTH="100%"></a><b><font color="#FF0000">General</font></b>: <a href="eoTopDown.html">Algorithm-Based
page</a> - <a href="eoBottomUp.html">Component-Based</a> - <a href="eoProgramming.html">Programming
<hr WIDTH="100%"></a><b><font color="#FF0000">General</font></b>: <a href="eoTopDown.html">Algorithm-Based</a>
- <a href="eoBottomUp.html">Component-Based</a> - <a href="eoProgramming.html">Programming
hints</a> -<b><font face="Arial,Helvetica"><font size=+1><a href="../../doc/html/index.html">EO
documentation</a></font></font></b>
<br>