Added some explanations about the memory mangement (through eoFunctorStore)
This commit is contained in:
parent
c7743f88ef
commit
dcee458c27
5 changed files with 266 additions and 86 deletions
|
|
@ -2,7 +2,7 @@
|
|||
<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.78 [en] (X11; U; Linux 2.4.7-10 i686) [Netscape]">
|
||||
<title>Tutorial: Lesson 3</title>
|
||||
</head>
|
||||
<body text="#000000" link="#0000EE" vlink="#551A8B" alink="#FF0000" background="beige009.jpg">
|
||||
|
|
@ -142,7 +142,7 @@ See the parameter section of the Component-Based tutorial, or wait until
|
|||
class, whose only purpose is the input of parameters.</font></li>
|
||||
</ul>
|
||||
|
||||
<hr WIDTH="50%"><A NAME="paraminput"><b><font color="#000099">eoParser:</font><font color="#FF0000">
|
||||
<hr WIDTH="50%"><a NAME="paraminput"></a><b><font color="#000099">eoParser:</font><font color="#FF0000">
|
||||
Modifying parameter values at run-time:</font></b>
|
||||
<br><font color="#000000">Using an eoParser object, the parameter values
|
||||
are read, by order of priority</font>
|
||||
|
|
@ -172,10 +172,10 @@ the general syntax to modify parameter value at run-time is (either from
|
|||
the command-line or in a text file)</li>
|
||||
|
||||
<br>
|
||||
|
||||
<b><tt><font color="#660000">--longKeyword=value</font></tt></b>
|
||||
or <b><tt><font color="#660000">-cvalue</font></tt></b>
|
||||
if 'c' is the short keyword (though <b><tt><font color="#660000">-c=value</font></tt></b> also works)
|
||||
if 'c' is the short keyword (though <b><tt><font color="#660000">-c=value</font></tt></b>
|
||||
also works)
|
||||
<br>
|
||||
<li>
|
||||
so, after compiling the executable for Lesson 3 (<b><tt><font color="#FF6666">make
|
||||
|
|
@ -183,12 +183,10 @@ lesson3</font></tt></b> at system prompt in Unix), you can try to type
|
|||
in</li>
|
||||
|
||||
<br>
|
||||
|
||||
<b><tt><font color="#FF6666">SecondBitEA</font></tt></b>
|
||||
<br>and see the algorithm run as before (OneMax optimized on 8-bits bitstrings).
|
||||
But you can now type in
|
||||
<br>
|
||||
|
||||
<b><tt><font color="#FF6666">SecondBitEA --vecSize=100</font></tt></b>
|
||||
<br>and see the output of the optimization of OneMax on 100-bit bitstrings.
|
||||
<br>
|
||||
|
|
@ -196,7 +194,6 @@ But you can now type in
|
|||
Take a look at all available parameters by typing in</li>
|
||||
|
||||
<br>
|
||||
|
||||
<b><tt><font color="#FF6666">SecondBitEA --help</font></tt></b>
|
||||
<br>or by going into the code: all parameter inputs have been grouped in
|
||||
the
|
||||
|
|
@ -208,7 +205,8 @@ it contains the list of all actual parameters used, and can directly be
|
|||
used as parameter input file: change the file name (e.g. to <b><tt><font color="#660000">SecondBitEA.param</font></tt></b>),
|
||||
edit it, change whichever parameter you want, and type in</li>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<b><tt><font color="#FF6666">SecondBitEA @SecondBitEA.param</font></tt></b>
|
||||
<br>and you will see all values that you defined into the file taken into
|
||||
account.
|
||||
|
|
@ -247,7 +245,9 @@ of eoParam returns a reference, so you can eventually modify its value
|
|||
somewhere else later (though of course this is not any useful for variable
|
||||
<b><tt><font color="#660000">seed</font></tt></b>!).</li>
|
||||
</ul>
|
||||
|
||||
There is however another way to achieve the same result in less lines of
|
||||
code - with a different memory management (see <a href="eoLesson4.html#parameters">Lesson4</a>).
|
||||
<br>
|
||||
<hr WIDTH="100%">
|
||||
<br><a NAME="state"></a><b><font color="#000099"><font size=+2>eoState:
|
||||
saving and loading</font></font></b><font color="#000000">You might have
|
||||
|
|
@ -276,7 +276,11 @@ method, as done <a href="SecondBitEA.html#loadstate">here</a>.</font>
|
|||
method for an </font><b><tt><font color="#3366FF">eoState</font></tt></b><font color="#000000">
|
||||
object anywhere in the code. But the <a href="#statesaver">checkpointing</a>
|
||||
mechanism offers you better ways to do that - and it's so easy ....</font>
|
||||
<p>
|
||||
<p>Note that an eoState alos has another use in EO whan it comes to memory
|
||||
management: it can be a repository of pointers that are not allocated within
|
||||
obects - allowing to delete them by simply deleting the eoState (see <a href="eoLesson4.html#memory">Lesson
|
||||
4)</a>.
|
||||
<br>
|
||||
<hr WIDTH="100%"><a NAME="checkpoint"></a><b><font color="#000099"><font size=+2>eoCheckpoint:
|
||||
every generation I'd like to ...</font></font></b>
|
||||
<br><font color="#000000">The checkpointing mechanism is a very powerful
|
||||
|
|
@ -544,4 +548,4 @@ documentation</a></font></font></b>
|
|||
<br><!-- Created: Fri Nov 3 18:49:12 CET 2000 --><!-- hhmts start -->Last
|
||||
modified: None of your business!<!-- hhmts end -->
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue