From 558e197adca8fb5427234602ddd406145c0b1c43 Mon Sep 17 00:00:00 2001 From: cahon Date: Wed, 23 Feb 2005 13:31:20 +0000 Subject: [PATCH] Removing ParadisEO --- eo/tutorial/ParadisEO/Lesson1/.cvsignore | 1 - eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp | 89 ----------------- .../ParadisEO/Lesson1/IslandBitEA1.cpp | 90 ----------------- .../ParadisEO/Lesson1/IslandBitEA2.cpp | 98 ------------------- eo/tutorial/ParadisEO/Lesson1/Makefile.am | 19 ---- eo/tutorial/ParadisEO/Lesson1/Makefile.simple | 29 ------ eo/tutorial/ParadisEO/Lesson1/binary_value.h | 17 ---- .../ParadisEO/Lesson1/paradiseo.config | 4 - 8 files changed, 347 deletions(-) delete mode 100644 eo/tutorial/ParadisEO/Lesson1/.cvsignore delete mode 100644 eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp delete mode 100644 eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp delete mode 100644 eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp delete mode 100644 eo/tutorial/ParadisEO/Lesson1/Makefile.am delete mode 100644 eo/tutorial/ParadisEO/Lesson1/Makefile.simple delete mode 100644 eo/tutorial/ParadisEO/Lesson1/binary_value.h delete mode 100644 eo/tutorial/ParadisEO/Lesson1/paradiseo.config diff --git a/eo/tutorial/ParadisEO/Lesson1/.cvsignore b/eo/tutorial/ParadisEO/Lesson1/.cvsignore deleted file mode 100644 index 70845e08e..000000000 --- a/eo/tutorial/ParadisEO/Lesson1/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -Makefile.in diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp deleted file mode 100644 index 97adb8e85..000000000 --- a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include -#include - -typedef eoBit Indi; // A bitstring with fitness double - -#include "binary_value.h" - -using namespace std; - -void main_function(int argc, char ** argv) { - - // Some parameters ... - const unsigned int T_SIZE = 3 ; // Size for tournament selection - const unsigned int VEC_SIZE = 50 ; // Number of bits in genotypes - const unsigned int POP_SIZE = 100 ; // Size of population - - const unsigned int MAX_GEN = 1000 ; // Fixed number of generations - - const double P_CROSS = 0.8 ; // Crossover probability - const double P_MUT = 1.0 ; // Mutation probability - - const double P_MUT_PER_BIT = 0.01 ; // Internal probability for bit-flip mutation - const double onePointRate = 0.5 ; // Rate for 1-pt Xover - const double bitFlipRate = 0.5 ; // Rate for bit-flip mutation - - eoEvalFuncPtr & > eval (binary_value) ; - eoUniformGenerator uGen ; - eoInitFixedLength random (VEC_SIZE, uGen) ; - - eoPop pop (POP_SIZE, random) ; - - apply (eval, pop) ; // A first evaluation of the population - - eoDetTournamentSelect selectOne(T_SIZE) ; - eoSelectPerc select (selectOne) ; // The selection operator - - eoGenerationalReplacement replace ; // The replacement operator - - eo1PtBitXover xover1 ; - eoPropCombinedQuadOp xover (xover1, onePointRate) ; - eoBitMutation mutationBitFlip (P_MUT_PER_BIT) ; - eoPropCombinedMonOp mutation (mutationBitFlip, bitFlipRate) ; - - eoSGATransform transform (xover, P_CROSS, mutation, P_MUT) ; - - eoGenContinue genCont (MAX_GEN) ; // The continuation criteria - - // First evolutionnary algorithm - eoEasyEA gga (genCont, eval, select, transform, replace) ; - - // What's new ? - eoListener listen (argc, argv) ; - rng.reseed (listen.here ().number ()) ; - - vector v ; - v.push_back ("Mars") ; // Only evol. algos named "Mars" are considered - eoFullConnectivity conn (listen, v) ; // The ring topology used - - eoCyclicGenContinue cycl_cont (300) ; // Immigration step all 300 evolutions - eoRandomSelect sel_rand ; // Random selection of emigrants - eoSelectMany sel (sel_rand, 0.1) ; /* How many individuals should be selected - to be sent ? */ - eoPlusReplacement repl ; // How to integrate new individuals ? - // A island esay evolutionnary named "Mars" - eoIslandsEasyEA islgga ("Mars", listen, conn, gga, cycl_cont, sel, repl) ; - islgga (pop) ; - pop.sort () ; - cout << "The final population is now ..." << endl ; - cout << pop << endl ; -} - -int main(int argc, char **argv) { -#ifdef _MSC_VER - - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); - -#endif - - try { - main_function(argc, argv) ; - } - catch(exception& e) { - cout << "Exception: " << e.what () << '\n' ; - } - - return 1 ; -} diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp deleted file mode 100644 index 04114ec0b..000000000 --- a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1.cpp +++ /dev/null @@ -1,90 +0,0 @@ -#include -#include - -typedef eoBit Indi; // A bitstring with fitness double - -#include "binary_value.h" - -using namespace std; - -void main_function(int argc, char ** argv) { - - // Some parameters ... - const unsigned int T_SIZE = 3 ; // Size for tournament selection - const unsigned int VEC_SIZE = 50 ; // Number of bits in genotypes - const unsigned int POP_SIZE = 100 ; // Size of population - - const unsigned int MAX_GEN = 1000 ; // Fixed number of generations - - const double P_CROSS = 0.8 ; // Crossover probability - const double P_MUT = 1.0 ; // Mutation probability - - const double P_MUT_PER_BIT = 0.01 ; // Internal probability for bit-flip mutation - const double onePointRate = 0.5 ; // Rate for 1-pt Xover - const double bitFlipRate = 0.5 ; // Rate for bit-flip mutation - - eoEvalFuncPtr & > eval (binary_value) ; - eoUniformGenerator uGen ; - eoInitFixedLength random (VEC_SIZE, uGen) ; - - eoPop pop (POP_SIZE, random) ; - - apply (eval, pop) ; // A first evaluation of the population - - eoDetTournamentSelect selectOne(T_SIZE) ; - eoSelectPerc select (selectOne) ; // The selection operator - - eoGenerationalReplacement replace ; // The replacement operator - - eo1PtBitXover xover1 ; - eoPropCombinedQuadOp xover (xover1, onePointRate) ; - eoBitMutation mutationBitFlip (P_MUT_PER_BIT) ; - eoPropCombinedMonOp mutation (mutationBitFlip, bitFlipRate) ; - - eoSGATransform transform (xover, P_CROSS, mutation, P_MUT) ; - - eoGenContinue genCont (MAX_GEN) ; // The continuation criteria - - // First evolutionnary algorithm - eoEasyEA gga (genCont, eval, select, transform, replace) ; - - // What's new ? - eoListener listen (argc, argv) ; - rng.reseed (listen.here ().number ()) ; - - vector v ; - v.push_back ("Mars1") ; - v.push_back ("Mars2") ; - eoRingConnectivity conn (listen, v) ; // The ring topology used - - eoCyclicGenContinue cycl_cont (300) ; // Immigration step all 300 evolutions - eoRandomSelect sel_rand ; // Random selection of emigrants - eoSelectMany sel (sel_rand, 0.1) ; /* How many individuals should be selected - to be sent ? */ - eoPlusReplacement repl ; // How to integrate new individuals ? - // A island esay evolutionnary named "Mars" - eoIslandsEasyEA islgga ("Mars1", listen, conn, gga, cycl_cont, sel, repl) ; - islgga (pop) ; - pop.sort () ; - cout << "The final population is now ..." << endl ; - cout << pop << endl ; -} - -int main(int argc, char **argv) { -#ifdef _MSC_VER - - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); - -#endif - - try { - main_function(argc, argv) ; - } - catch(exception& e) { - cout << "Exception: " << e.what () << '\n' ; - } - - return 1 ; -} diff --git a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp b/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp deleted file mode 100644 index 5b616a303..000000000 --- a/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2.cpp +++ /dev/null @@ -1,98 +0,0 @@ -#include -#include - -typedef eoBit Indi; // A bitstring with fitness double - -#include "binary_value.h" - -using namespace std; - -void main_function(int argc, char ** argv) { - - // Some parameters ... - const unsigned int T_SIZE = 3 ; // Size for tournament selection - const unsigned int VEC_SIZE = 50 ; // Number of bits in genotypes - const unsigned int POP_SIZE = 100 ; // Size of population - - const unsigned int MAX_GEN = 1000 ; // Fixed number of generations - - const double P_CROSS = 0.8 ; // Crossover probability - const double P_MUT = 1.0 ; // Mutation probability - - const double P_MUT_PER_BIT = 0.01 ; // Internal probability for bit-flip mutation - //const double onePointRate = 0.5 ; // Rate for 1-pt Xover - const double URate = 0.5 ; // Rate for Uniform Xover - //const double bitFlipRate = 0.5 ; // Rate for bit-flip mutation - const double oneBitRate = 0.5 ; // Rate for one-bit mutation - - eoEvalFuncPtr & > eval (binary_value) ; - eoUniformGenerator uGen ; - eoInitFixedLength random (VEC_SIZE, uGen) ; - - eoPop pop (POP_SIZE, random) ; - - apply (eval, pop) ; // A first evaluation of the population - - eoDetTournamentSelect selectOne(T_SIZE) ; - eoSelectPerc select (selectOne) ; // The selection operator - - eoGenerationalReplacement replace ; // The replacement operator - - // Uniform crossover for bitstring - eoUBitXover xoverU ; - eoPropCombinedQuadOp xover (xoverU, URate) ; - - // eoBitMutation mutationBitFlip (P_MUT_PER_BIT) ; - - eoDetBitFlip mutationOneBit ; - - eoPropCombinedMonOp mutation (mutationOneBit, oneBitRate) ; - - eoSGATransform transform (xover, P_CROSS, mutation, P_MUT) ; - - eoGenContinue genCont (MAX_GEN) ; // The continuation criteria - - // First evolutionnary algorithm - eoEasyEA gga (genCont, eval, select, transform, replace) ; - - // What's new ? - eoListener listen (argc, argv) ; - rng.reseed (listen.here ().number ()) ; - - vector v ; - v.push_back ("Mars1") ; - v.push_back ("Mars2") ; // Algos named "Mars1" or "Mars2" are considered ... - - eoRingConnectivity conn (listen, v) ; // The ring topology used - - eoCyclicGenContinue cycl_cont (300) ; // Immigration step all 300 evolutions - eoRandomSelect sel_rand ; // Random selection of emigrants - eoSelectMany sel (sel_rand, 0.1) ; /* How many individuals should be selected - to be sent ? */ - eoPlusReplacement repl ; // How to integrate new individuals ? - // A island esay evolutionnary named "Mars2" - eoIslandsEasyEA islgga ("Mars2", listen, conn, gga, cycl_cont, sel, repl) ; - islgga (pop) ; - pop.sort () ; - cout << "The final population is now ..." << endl ; - cout << pop << endl ; -} - -int main(int argc, char **argv) { -#ifdef _MSC_VER - - int flag = _CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF); - flag |= _CRTDBG_LEAK_CHECK_DF; - _CrtSetDbgFlag(flag); - -#endif - - try { - main_function(argc, argv) ; - } - catch(exception& e) { - cout << "Exception: " << e.what () << '\n' ; - } - - return 1 ; -} diff --git a/eo/tutorial/ParadisEO/Lesson1/Makefile.am b/eo/tutorial/ParadisEO/Lesson1/Makefile.am deleted file mode 100644 index 67f0e9e77..000000000 --- a/eo/tutorial/ParadisEO/Lesson1/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -noinst_PROGRAMS = IslandBitEA IslandBitEA1 IslandBitEA2 - -LIBEO = $(top_builddir)/src/libeo.a -LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a - -CXX = $(MPICXX) -LD = $(MPICXX) -AM_CXXFLAGS = -I$(top_srcdir)/src -DEPS = $(LIBEOUTILS) $(LIBEO) -LIBS = $(LIBEOUTILS) $(LIBEO) - - -noinst_HEADERS = binary_value.h - -IslandBitEA_SOURCES = IslandBitEA.cpp - -IslandBitEA1_SOURCES = IslandBitEA1.cpp - -IslandBitEA2_SOURCES = IslandBitEA2.cpp diff --git a/eo/tutorial/ParadisEO/Lesson1/Makefile.simple b/eo/tutorial/ParadisEO/Lesson1/Makefile.simple deleted file mode 100644 index 7bd46d2a6..000000000 --- a/eo/tutorial/ParadisEO/Lesson1/Makefile.simple +++ /dev/null @@ -1,29 +0,0 @@ -MPICC = mpiCC - -ALL = IslandBitEA IslandBitEA2 IslandBitEA1 - -lesson2 : IslandBitEA IslandBitEA2 IslandBitEA1 - -all : $(ALL) - -clean : - @/bin/rm $(ALL) *.o *~ - -IslandBitEA : IslandBitEA.o - $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA IslandBitEA.o ../../../src/utils/libeoutils.a ../../../src/libeo.a - -IslandBitEA.o : IslandBitEA.cpp binary_value.h - $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA.cpp - -IslandBitEA1 : IslandBitEA1.o - $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA1 IslandBitEA1.o ../../../src/utils/libeoutils.a ../../../src/libeo.a - -IslandBitEA1.o : IslandBitEA1.cpp binary_value.h - $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA1.cpp - -IslandBitEA2 : IslandBitEA2.o - $(MPICC) -DPACKAGE=\"eo\" -o IslandBitEA2 IslandBitEA2.o ../../../src/utils/libeoutils.a ../../../src/libeo.a - -IslandBitEA2.o : IslandBitEA2.cpp binary_value.h - $(MPICC) -DPACKAGE=\"eo\" -I. -I../../../src -c IslandBitEA2.cpp - diff --git a/eo/tutorial/ParadisEO/Lesson1/binary_value.h b/eo/tutorial/ParadisEO/Lesson1/binary_value.h deleted file mode 100644 index f2f5d6ca1..000000000 --- a/eo/tutorial/ParadisEO/Lesson1/binary_value.h +++ /dev/null @@ -1,17 +0,0 @@ -#include - -//----------------------------------------------------------------------------- - -/** Just a simple function that takes binary value of a chromosome and sets - the fitnes. - @param _chrom A binary chromosome -*/ -// INIT -double binary_value(const std::vector& _chrom) -{ - double sum = 0; - for (unsigned i = 0; i < _chrom.size(); i++) - sum += _chrom[i]; - return sum; -} - diff --git a/eo/tutorial/ParadisEO/Lesson1/paradiseo.config b/eo/tutorial/ParadisEO/Lesson1/paradiseo.config deleted file mode 100644 index ac546ad3a..000000000 --- a/eo/tutorial/ParadisEO/Lesson1/paradiseo.config +++ /dev/null @@ -1,4 +0,0 @@ -${MACHINE1} 0 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 -${MACHINE2} 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA1 -${MACHINE3} 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2 -${MACHINE4} 1 ${HOME}/eo/tutorial/ParadisEO/Lesson1/IslandBitEA2