diff --git a/eo/tutorial/Lesson1/exercise3.cpp b/eo/tutorial/Lesson1/exercise1.3.cpp similarity index 95% rename from eo/tutorial/Lesson1/exercise3.cpp rename to eo/tutorial/Lesson1/exercise1.3.cpp index 64ca5df01..c0c248c80 100644 --- a/eo/tutorial/Lesson1/exercise3.cpp +++ b/eo/tutorial/Lesson1/exercise1.3.cpp @@ -91,18 +91,18 @@ void main_function(int argc, char **argv) // comment out the eoDetTournament lines // The well-known roulette - // eoProportional select; + // eoProportionalSelect select; // could also use stochastic binary tournament selection // // const double RATE = 0.75; - // eoStochTournament select(RATE); // RATE in ]0.5,1] + // eoStochTournamentSelect select(RATE); // RATE in ]0.5,1] // The robust tournament selection const unsigned int T_SIZE = 3; // size for tournament selection - eoDetTournament select(T_SIZE); // T_SIZE in [2,POP_SIZE] + eoDetTournamentSelect select(T_SIZE); // T_SIZE in [2,POP_SIZE] // and of course the random selection - // eoSelectRandom select; + // eoRandomSelect select; // The simple GA evolution engine uses generational replacement // so no replacement procedure is needed diff --git a/eo/tutorial/Lesson2/exercise3.cpp b/eo/tutorial/Lesson2/exercise2.3.cpp similarity index 94% rename from eo/tutorial/Lesson2/exercise3.cpp rename to eo/tutorial/Lesson2/exercise2.3.cpp index daff8e639..489956985 100644 --- a/eo/tutorial/Lesson2/exercise3.cpp +++ b/eo/tutorial/Lesson2/exercise2.3.cpp @@ -95,10 +95,13 @@ void main_function(int argc, char **argv) //////////////////////////////////// // SELECT // The robust tournament selection - eoDetTournament selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] + eoDetTournamentSelect selectOne(T_SIZE); // T_SIZE in [2,POP_SIZE] // solution solution solution solution solution solution solution - // modify the rate in the constructor - eoSelectMany select(selectOne,2, eo_is_an_integer);// rate is second arg. + // modify the nb offspring / rate in the constructor. 2 ways: + // second arg treated as integer + eoSelectMany select(selectOne,2, eo_is_an_integer); + // second arg treated as a rate (default behavior) + // eoSelectMany select(selectOne,0.1); // REPLACE // solution solution solution solution solution solution solution diff --git a/eo/tutorial/Lesson3/exercise1.cpp b/eo/tutorial/Lesson3/exercise3.1.cpp similarity index 99% rename from eo/tutorial/Lesson3/exercise1.cpp rename to eo/tutorial/Lesson3/exercise3.1.cpp index a01226ca9..66532bb96 100644 --- a/eo/tutorial/Lesson3/exercise1.cpp +++ b/eo/tutorial/Lesson3/exercise3.1.cpp @@ -186,7 +186,7 @@ void main_function(int argc, char **argv) //////////////////////////////////// // SELECT // The robust tournament selection - eoDetTournament selectOne(tSize); // tSize in [2,POPSIZE] + eoDetTournamentSelect selectOne(tSize); // tSize in [2,POPSIZE] // is now encapsulated in a eoSelectPerc (entage) eoSelectPerc select(selectOne);// by default rate==1