Temporary modification of the tutorial to account for the new features
- stat.tmpl allowing easy creation of own stat - sharing as a new possible selector in make_algo_scalar - requires a distance No detail given, though ...
This commit is contained in:
parent
795f63b7fe
commit
9e0edc381e
3 changed files with 63 additions and 18 deletions
|
|
@ -257,9 +257,9 @@ try
|
|||
#endif
|
||||
|
||||
// now check how you want to output the stat:
|
||||
bool printMyStructStat = parser.createParam(true, "coutMyStructStat", "Affiche ma stat à l'écran", '\0', "Mon Probleme").value();
|
||||
bool fileMyStructStat = parser.createParam(false, "fileMyStructStat", "Stocke ma stat Dans un fichier", '\0', "Mon Probleme").value();
|
||||
bool plotMyStructStat = parser.createParam(false, "plotMyStructStat", "Affiche graphiquement ma stat pendant l'évolution", '\0', "Mon Probleme").value();
|
||||
bool printMyStructStat = parser.createParam(false, "coutMyStructStat", "Prints my stat to screen, one line per generation", '\0', "My application").value();
|
||||
bool fileMyStructStat = parser.createParam(false, "fileMyStructStat", "Saves my stat to file (in resDir", '\0', "My application").value();
|
||||
bool plotMyStructStat = parser.createParam(false, "plotMyStructStat", "On-line plots my stat using gnuplot", '\0', "My application").value();
|
||||
|
||||
// should we write it on StdOut ?
|
||||
if (printMyStructStat)
|
||||
|
|
@ -283,6 +283,8 @@ try
|
|||
// should we write it to a file ?
|
||||
if (fileMyStructStat)
|
||||
{
|
||||
// the file name is hard-coded - of course you can read
|
||||
// a string parameter in the parser if you prefer
|
||||
myFileMonitor = new eoFileMonitor(dirName + "myStat.xg");
|
||||
// don't forget to store the memory in the state
|
||||
state.storeFunctor(myFileMonitor);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,33 @@ of its fitness.
|
|||
<br>The examples will be described supposing you want to evolve ... bitstings
|
||||
to solve the OneMax problem (oh no!!!).
|
||||
<p>
|
||||
|
||||
<b><blink><font color="#FF0000">New</font></blink></b> May 2004 : A
|
||||
second script, <b><tt><font color="#993300">createSimple</font></tt></b>,
|
||||
was added some time ago, that generates much simpler
|
||||
set of files, and the <font color="#3366FF"><b>stat.tmpl</b></font>
|
||||
file is now used to allow you to
|
||||
<font color="#FF0000"><b>compute</b></font> and
|
||||
<font color="#FF0000"><b>print</b></font> and
|
||||
<font color="#FF0000"><b>save-to-disk</b></font> and
|
||||
<font color="#FF0000"><b>plot-on-line</b></font> your
|
||||
own <font color="#3366FF"><b>statistics</b></font>.
|
||||
But you'll have to find out by yourself how those work, sorry, no
|
||||
time. It should be easy by just looking at the code (in main file, and
|
||||
in <b><tt><font color="#993300">OneMaxEA.cpp</font></tt></b>
|
||||
and the newly created
|
||||
<b><tt><font color="#993300">eoOneMaxStat.h</font></tt></b>.<br><br>
|
||||
|
||||
<b><blink><font color="#FF0000">New</font></blink></b> May 2004 : In
|
||||
the same simplified main file (e.g. <b><tt><font
|
||||
color="#993300">OneMaxEA.cpp</font></tt></b> after running
|
||||
<b><tt><font color="#FF6666">./createsimple OneMax</font></tt></b> in
|
||||
dir <b><tt><font
|
||||
color="#FF6666"><b>.../eo/tutorial/Templates</b></font></tt></b>), you
|
||||
will also be able to use fitness sharing (together with roulette) as a
|
||||
possible selector.
|
||||
|
||||
|
||||
<hr WIDTH="100%"><a NAME="using"></a><b><font color="#000099"><font size=+2>Using
|
||||
template files</font></font></b>
|
||||
<br>Follow this very simple procedure:
|
||||
|
|
|
|||
|
|
@ -17,34 +17,50 @@ and to</font></b></center>
|
|||
<h1>
|
||||
<font color="#FF0000">EO Tutorial</font></h1></center>
|
||||
|
||||
<center><font color="#FF0000">Version 0.97 - May. 9 2002</font>
|
||||
<p><b><blink><font color="#FF0000">New</font></blink></b></center>
|
||||
<center><font color="#FF0000">Version 0.98 - May 2004</font>
|
||||
</center>
|
||||
|
||||
<ul>
|
||||
<center>
|
||||
<li><b><blink><font color="#FF0000">New</font></blink></b>
|
||||
<b><font color="#000000"><a href="eoLesson5.html">Lesson 5</a>
|
||||
</font></b><font color="#000000">has been improved: some of
|
||||
the empty template files in dir
|
||||
<b><tt><font color="#FF6666"><b>.../eo/tutorial/Templates</b></font></tt></b>
|
||||
have been simplified, and file <font color="#3366FF"><b>stat.tmpl</b></font>
|
||||
has been added, allowing you to
|
||||
<font color="#FF6600"><b>compute</b></font> and
|
||||
<font color="#FF6600"><b>print</b></font> and
|
||||
<font color="#FF6600"><b>save-to-disk</b></font> and
|
||||
<font color="#FF6600"><b>plot-on-line</b></font> your
|
||||
own <font color="#3366FF"><b>statistics</b></font>.
|
||||
The magic script is now (see Lesson5) <b><tt><font color="#993300">createSimple</font></tt></b>.<br>
|
||||
|
||||
The same simplified main file in
|
||||
dir <b><tt><font
|
||||
color="#FF6666"><b>.../eo/tutorial/Templates</b></font></tt></b>)
|
||||
also allows you to use
|
||||
<font color="#FF6600"><b>fitness sharing</b></font>
|
||||
(together with roulette wheel) as a possible selector.<br>
|
||||
|
||||
Unfortunately, the HTML file for Lesson5 and the corresponding
|
||||
html-ized code are not yet updated - time is missing
|
||||
(volunteers welcome).<br><br>
|
||||
</li>
|
||||
|
||||
<center><font color="#FF0000">May 2002</font></center>
|
||||
<li>
|
||||
<b><font color="#000000">ParadisEO</font><font color="#FF0000">, the parallel
|
||||
version of EO, </font></b><font color="#000000">is available together with
|
||||
a <a href="../pdf/paradiseoJet7.pdf">PDF presentation</a></font></li></center>
|
||||
|
||||
<center>
|
||||
<br><font color="#000000">Thanks to <a href="mailto:cahon@lifl.fr">Sébastien
|
||||
<font color="#000000">Thanks to <a href="mailto:cahon@lifl.fr">Sébastien
|
||||
Cahon</a> (LIFL, Lille)</font></center>
|
||||
|
||||
<center>
|
||||
<li>
|
||||
<b><font color="#000000"><a href="eoLesson5.html">Lesson 5</a> </font></b><font color="#000000">gives
|
||||
you the opportunity to</font><b><font color="#FF0000"> build your own genotype</font></b></li></center>
|
||||
|
||||
<center>
|
||||
<br><font color="#000000">and still benefit from<b> </b></font><b><font color="#FF6600">all
|
||||
powerful EO features </font></b><font color="#000000">(</font><b><font color="#009900">evolution
|
||||
engines</font></b><font color="#000000">, </font><b><font color="#3333FF">I/O,
|
||||
</font></b><font color="#000000">...).</font></center>
|
||||
</ul>
|
||||
|
||||
<p><br>Welcome to EO tutorial/on-line documentation.
|
||||
<br>Please note that <b><font color="#FF6600">this tutorial is not supposed
|
||||
<br>Please note that <b><font color="#FF6600">this tutorial is <font color="#FF0000">not</font> supposed
|
||||
to be printed and read off-line</font></b>, as it takes full advantage
|
||||
of hyper-text links between the different parts, and with the technical
|
||||
documentation.
|
||||
|
|
|
|||
Reference in a new issue