diff --git a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_simpleHC.cpp b/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_simpleHC.cpp index a728ed127..47514a83d 100644 --- a/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_simpleHC.cpp +++ b/trunk/paradiseo-mo/tutorial/Lesson1/lesson1_simpleHC.cpp @@ -19,19 +19,23 @@ #include #include +// declaration of the namespace using namespace std; //----------------------------------------------------------------------------- -// representation of solutions, neighbor, and neighborhood -#include // bit string : see EO tutorial lesson 1: FirstBitGA.cpp +// representation of solutions, and neighbors +#include // bit string : see also EO tutorial lesson 1: FirstBitGA.cpp #include // neighbor of bit string -#include // neighborhood: all neighors in increasing order of bit index //----------------------------------------------------------------------------- // fitness function, and evaluation of neighbors #include -#include #include +#include + +//----------------------------------------------------------------------------- +// neighborhood description +#include // visit all neighbors in increasing order of bit index //----------------------------------------------------------------------------- // the simple Hill-Climbing local search @@ -108,7 +112,7 @@ void main_function(int argc, char **argv) * * ========================================================= */ - // a Indi random initializer + // a Indi random initializer: each bit is random // more information: see EO tutorial lesson 1 (FirstBitGA.cpp) eoUniformGenerator uGen; eoInitFixedLength random(vecSize, uGen); @@ -128,7 +132,7 @@ void main_function(int argc, char **argv) * * ========================================================= */ - // Use it if a neighbor is evaluated by the full evaluation of a solution + // Use it if there is no incremental evaluation: a neighbor is evaluated by the full evaluation of a solution // moFullEvalByModif neighborEval(fullEval); // Incremental evaluation of the neighbor: fitness is modified by +/- 1 @@ -154,7 +158,7 @@ void main_function(int argc, char **argv) /* ========================================================= * - * execute the local search from a random solution + * executes the local search from a random solution * * ========================================================= */