From decda239777cfb051a54c0553a741e3cc3fdef75 Mon Sep 17 00:00:00 2001
From: nojhan Or clone the latest version: git clone git://scm.gforge.inria.fr/paradiseo/paradiseo.git
Or clone the latest version: git clone git://scm.gforge.inria.fr/paradiseo/paradiseo.git
As Paradiseo is a development framework, you do not really need to install it on all your systems. Just put it somewhere on your development computer, compile it from here and indicate where to find it to your favorite build system.
Paradiseo is mainly developed for Linux, on which it is straightforward to install a C++ build chain. - For example, on Ubuntu 18.04:
sudo apt install g++-8 cmake make libeigen3-dev libopenmpi-dev doxygen graphviz libgnuplot-iostream-dev+ For example, on Ubuntu 18.04:
sudo apt install g++-8 cmake make libeigen3-dev libopenmpi-dev doxygen graphviz libgnuplot-iostream-dev
Paradiseo use the CMake build system, so building it should be as simple as: -
mkdir build ; cd build ; cmake .. && make -j+
mkdir build ; cd build ; cmake .. && make -j
For more details, see the building Paradiseo section.
Download the quick start project template, edit the
CMakeLists.txtfile to indicate where to find Paradiseo and start developing your own solver. +
Download the quick start project template, edit the CMakeLists.txt file to indicate where to find Paradiseo and start developing your own solver.
To show you how does a Paradiseo code look, you will find below a minimal implementation of the popular CMA-ES algorithm.
- -The code is presented without comments, to keep it short, but it is yet full-featured, as you will see if you compile it and run
./cmaes --help+ + +
+
+ 1 #include <eo>
+ 2 #include <edo>
+ 3 #include <es.h>
+ 4 #include <do/make_pop.h>
+ 5 #include <do/make_run.h>
+ 6 #include <do/make_continue.h>
+ 7 #include <do/make_checkpoint.h>
+ 8
+ 9 using R = eoReal<eoMinimizingFitness>;
+10 using CMA = edoNormalAdaptive<R>;
+11
+12 R::FitnessType sphere(const R& sol) {
+13 double sum = 0;
+14 for(auto x : sol) { sum += x * x; }
+15 return sum;
+16 }
+17
+18 int main(int argc, char** argv) {
+19 eoParser parser(argc, argv);
+20 eoState state;
+21
+22 size_t dim = parser.createParam<size_t>(10,
+23 "dimension", "Dimension", 'd',
+24 "Problem").value();
+25
+26 size_t max_eval = parser.getORcreateParam<size_t>(100 * dim,
+27 "maxEval", "Maximum number of evaluations", 'E',
+28 "Stopping criterion").value();
+29
+30 edoNormalAdaptive<R> gaussian(dim);
+31
+32 auto& obj_func = state.pack< eoEvalFuncPtr<R> >(sphere);
+33 auto& eval = state.pack< eoEvalCounterThrowException<R> >(obj_func, max_eval);
+34 auto& pop_eval = state.pack< eoPopLoopEval<R> >(eval);
+35
+36 auto& gen = state.pack< eoUniformGenerator<R::AtomType> >(-5, 5);
+37 auto& init = state.pack< eoInitFixedLength<R> >(dim, gen);
+38 auto& pop = do_make_pop(parser, state, init);
+39 pop_eval(pop,pop);
+40
+41 auto& eo_continue = do_make_continue( parser, state, eval);
+42 auto& pop_continue = do_make_checkpoint(parser, state, eval, eo_continue);
+43 auto& best = state.pack< eoBestIndividualStat<R> >();
+44 pop_continue.add( best );
+45 auto& distrib_continue = state.pack< edoContAdaptiveFinite<CMA> >();
+46
+47 auto& selector = state.pack< eoRankMuSelect<R> >(dim/2);
+48 auto& estimator = state.pack< edoEstimatorNormalAdaptive<R> >(gaussian);
+49 auto& bounder = state.pack< edoBounderRng<R> >(R(dim, -5), R(dim, 5), gen);
+50 auto& sampler = state.pack< edoSamplerNormalAdaptive<R> >(bounder);
+51 auto& replacor = state.pack< eoCommaReplacement<R> >();
+52
+53 make_verbose(parser);
+54 make_help(parser);
+55
+56 auto& algo = state.pack< edoAlgoAdaptive<CMA> >(
+57 gaussian , pop_eval, selector,
+58 estimator, sampler , replacor,
+59 pop_continue, distrib_continue);
+60
+61 try {
+62 algo(pop);
+63 } catch (eoMaxEvalException& e) {
+64 eo::log << eo::progress << "STOP" << std::endl;
+65 }
+66
+67 std::cout << best.value() << std::endl;
+68 return 0;
+69 }
+
+
+
The code is presented without comments, to keep it short, but it is yet full-featured, as you will see if you compile it and run ./cmaes --help
One of the very powerful feature of Paradiseo is that its design targets easy combination of operators. Is is, for instance, straightforward to plug several different continuation operators in the stopping criterion slot of algorithms.
-Popular combination of operators are provided as pre-defined functions, with automatic command line argument control.
+Popular combination of operators are provided as code-defined functions, with automatic command line argument control.
Additionally, this design allows for all kind of hybridizations between algorithms. For instance, it's easy to plug a local search algorithm as a variation operator of an evolutionary algorithm.
Another advantage is that you can very easily try alternative algorithms. With tens of operators available for popular slots, the number of different algorithms increase very rapidly. For instance, just using basic genetic algorithm operators with set parameters, Paradiseo can provide up to 5 millions different bitstrings algorithms. Given that metaheuristics are very sensitive to the interactions between operators, this approach allows for vital degrees of freedom.
Of course, it's also possible to add new algorithms "grammar". For instance, the grammar for estimation of distribution algorithms is an extension of the one for evolutionary algorithms. That way, you can re-use the operators already implemented for other algorithms.
@@ -393,10 +469,263 @@The following tables show how Paradiseo compares to other active open-source frameworks, to the best of our knowledge (updated on 2019-10-18).
- -Gathering and maintaining those information is not easy, so take them with a grain of salt, and if you see errors in those tables, please contact us.
+ + + + +Gathering and maintaining this information is not easy, so take them with a grain of salt, and if you see errors in those tables, please contact us.
@@ -631,7 +960,7 @@ undiscovered knowledge.+
For your convenience, you can browse an online API doc for Paradiseo version 2.0:
Note that if you want to find the API documentation for the version you have at hand, just build the
make doctarget and open
paradiseo/<build>/<module>/doc/html/index.htmlin your web browser. +
Note that if you want to find the API documentation for the version you have at hand, just build the make doc target and open paradiseo/<build>/<module>/doc/html/index.html in your web browser.
The current stable release is version 2.0.1: ParadisEO 2.0.1. Some other releases (older or newer) can be found on GitHub/paradiseo/releases.
You can obtain the latest stable and beta version directly via the official Git repository: -
git clone git://scm.gforge.inria.fr/paradiseo/paradiseo.git. +
git clone git://scm.gforge.inria.fr/paradiseo/paradiseo.git.
The release are on the "master" branch.
@@ -748,17 +1087,17 @@ undiscovered knowledge.
The build chain uses the classical workflow of CMake. The recommended method is to build in a specific, separated directory - and call
cmake ..from here. - CMake will prepare the compilation script for your system of choice which you can change with the
-G <generator-name>option (see the CMake doc for the list of available generators). + and call
cmake .. from here.
+ CMake will prepare the compilation script for your system of choice which you can change with the -G <generator-name> option (see the CMake doc for the list of available generators).
Under Linux, the default is make, and a build command is straitghtforward: -
mkdir build ; cd build ; cmake .. && make -j+
mkdir build ; cd build ; cmake .. && make -j
There is, however, several build options which you may want to switch. - To see them, we recommend the use of a CMake gui, like
ccmakeor
cmake-gui. - On the command line, you can see the available options with:
cmake -LH ... - Those options can be set with the
-D<option>=<value>argument to cmake. + To see them, we recommend the use of a CMake gui, like
ccmake or cmake-gui.
+ On the command line, you can see the available options with: cmake -LH ...
+ Those options can be set with the -D<option>=<value> argument to cmake.
The first option to consider is CMAKE_BUILD_TYPE, @@ -767,8 +1106,8 @@ undiscovered knowledge.
Other important options are:
EDO(which is false by default) - and parallelization options:
ENABLE_OPENMP, MPI, SMP. +
Other important options are: EDO (which is false by default)
+ and parallelization options: ENABLE_OPENMP, MPI, SMP.
By default, the build script will build the Paradiseo libraries only.
If you ENABLE_CMAKE_TESTING and BUILD_TESTING, it will be the tests, which you can run with the "ctest" command.
If you ENABLE_CMAKE_EXAMPLE, it will also build the examples.
diff --git a/website/lightblue.css b/website/lightblue.css index 091a12484..272b3b9af 100644 --- a/website/lightblue.css +++ b/website/lightblue.css @@ -276,23 +276,52 @@ figcaption { margin-left:5%; } -iframe.code { +.code { width:95%; height:35em; resize:vertical; overflow-y:scroll; - box-shadow: 5px 10px 18px #ddd; + box-shadow: 5px 10px 18px #aaa; + background-color:#2b2b2b; + color: #d4cfc9; + border:thin solid black; + white-space: pre; } -iframe.table { +.vimCodeElement { /* white-space: pre-wrap; */ font-family: monospace; color: #d4cfc9; background-color: #2b2b2b; } +.String { color: #cc7844; background-color: #272935; padding-bottom: 1px; } +.Character { color: #da4939; } +.Number { color: #519f50; } +.LineNr { color: #6b758f; background-color: #272935; padding-bottom: 1px; } +.Statement { color: #da4939; font-weight: bold; } +.Type { color: #6d9cbe; } +.Repeat { color: #da4939; } +.Include { color: #6d9cbe; } +.Exception { color: #da4939; } +.StorageClass { color: #ffc66d; } +.cppOperator { color: #b6b3eb; } +.cppSTL { color: #f4f1ed; } +.cppBraces { color: #ffc66d; } +.cppStatement { color: #ffc66d; } +.cppEndline { color: #6b758f; } + +.table { padding:1em; border:thin solid lightgray; box-shadow: 5px 10px 18px #ddd; width:60%; - max-width: 30em; + max-width: 40em; margin-left:20% } +figure.table table { + width:100%; +} + +a.comment-indicator:hover + comment { background:#ffd; position:absolute; display:block; border:1px solid black; padding:0.5em; } +a.comment-indicator { background:red; display:inline-block; border:1px solid black; width:0.5em; height:0.5em; } +comment { display:none; } + @media only screen and (max-width: 800px) { #alt { clear:left;