From 9e0edc381e3e845206ed271b904756269684cc03 Mon Sep 17 00:00:00 2001 From: evomarc Date: Wed, 26 May 2004 09:00:26 +0000 Subject: [PATCH] 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 ... --- eo/tutorial/Templates/MyStructSEA.cpp | 8 +++-- eo/tutorial/html/eoLesson5.html | 27 ++++++++++++++++ eo/tutorial/html/eoTutorial.html | 46 ++++++++++++++++++--------- 3 files changed, 63 insertions(+), 18 deletions(-) diff --git a/eo/tutorial/Templates/MyStructSEA.cpp b/eo/tutorial/Templates/MyStructSEA.cpp index bf2a3ad8..39c4dea1 100644 --- a/eo/tutorial/Templates/MyStructSEA.cpp +++ b/eo/tutorial/Templates/MyStructSEA.cpp @@ -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); diff --git a/eo/tutorial/html/eoLesson5.html b/eo/tutorial/html/eoLesson5.html index cffede04..fcb02578 100644 --- a/eo/tutorial/html/eoLesson5.html +++ b/eo/tutorial/html/eoLesson5.html @@ -38,6 +38,33 @@ of its fitness.
The examples will be described supposing you want to evolve ... bitstings to solve the OneMax problem (oh no!!!).

+ +New May 2004 : A +second script, createSimple, + was added some time ago, that generates much simpler +set of files, and the stat.tmpl +file is now used to allow you to +compute and +print and +save-to-disk and +plot-on-line your +own statistics. +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 OneMaxEA.cpp +and the newly created +eoOneMaxStat.h.

+ +New May 2004 : In +the same simplified main file (e.g. OneMaxEA.cpp after running +./createsimple OneMax in +dir .../eo/tutorial/Templates), you +will also be able to use fitness sharing (together with roulette) as a +possible selector. + +


Using template files
Follow this very simple procedure: diff --git a/eo/tutorial/html/eoTutorial.html b/eo/tutorial/html/eoTutorial.html index c0490719..27370444 100644 --- a/eo/tutorial/html/eoTutorial.html +++ b/eo/tutorial/html/eoTutorial.html @@ -17,34 +17,50 @@ and to

EO Tutorial

-
Version 0.97 - May. 9 2002 -

New

+
Version 0.98 - May 2004 +


Welcome to EO tutorial/on-line documentation. -
Please note that this tutorial is not supposed +
Please note that this tutorial is not supposed to be printed and read off-line, as it takes full advantage of hyper-text links between the different parts, and with the technical documentation.