{"id":16615214,"url":"https://github.com/nojhan/paradiseo","last_synced_at":"2025-04-04T18:05:29.214Z","repository":{"id":6321705,"uuid":"7556767","full_name":"nojhan/paradiseo","owner":"nojhan","description":"An evolutionary computation framework to (automatically) build fast parallel stochastic optimization solvers","archived":false,"fork":false,"pushed_at":"2025-03-21T08:05:54.000Z","size":1084979,"stargazers_count":102,"open_issues_count":49,"forks_count":36,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-28T17:05:37.374Z","etag":null,"topics":["algorithm","cpp","cpp17","evolutionary-algorithm","framework","metaheuristics","optimization","optimization-algorithms","paradiseo","parallelization","search-heuristics","solvers"],"latest_commit_sha":null,"homepage":"https://nojhan.github.io/paradiseo/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"andreberg/Meslo-Font","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nojhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-01-11T08:47:13.000Z","updated_at":"2025-03-21T08:06:03.000Z","dependencies_parsed_at":"2023-01-13T15:15:14.700Z","dependency_job_id":"d665a3cb-df6c-4010-b49b-b2b9fcf6baa7","html_url":"https://github.com/nojhan/paradiseo","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojhan%2Fparadiseo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojhan%2Fparadiseo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojhan%2Fparadiseo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojhan%2Fparadiseo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nojhan","download_url":"https://codeload.github.com/nojhan/paradiseo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","cpp","cpp17","evolutionary-algorithm","framework","metaheuristics","optimization","optimization-algorithms","paradiseo","parallelization","search-heuristics","solvers"],"created_at":"2024-10-12T02:08:54.325Z","updated_at":"2025-04-04T18:05:29.195Z","avatar_url":"https://github.com/nojhan.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Paradiseo: a Heuristic Optimization Framework\n\nParadiseo is an open-source ***full-featured evolutionary computation framework*** which main purpose is to help you write ***your own stochastic optimization algorithms***, insanely fast.\n\nIt focus on the efficiency of the implementation of solvers, by providing:\n- a ***modular design*** for several types of paradigms,\n- the ***largest codebase*** of existing components,\n- tools for ***automated design and selection*** of algorithms,\n- a focus on ***speed*** and several ***parallelization*** options.\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"640\" alt=\"Paradiseo logo\" src=\"https://raw.githubusercontent.com/nojhan/paradiseo/master/docs/img/paradiseo_logo_dark.svg\"/\u003e\n\u003c/div\u003e\n\n# Quick Start\n\n# Very Quick Start\n\n1. Use a recent Linux, like an Ubuntu.\n2. `sudo apt install g++-8 cmake make libeigen3-dev libopenmpi-dev doxygen graphviz libgnuplot-iostream-dev`\n3. From the Paradiseo directory: `mkdir build ; cd build ; cmake -D CMAKE_BUILD_TYPE=Release -DEDO=ON .. \u0026\u0026 make -j`\n4. Copy-paste this CMA-ES code in `cmaes.cpp`:\n```cpp\n#include \u003ceo\u003e\n#include \u003cedo\u003e\n#include \u003ces.h\u003e\n#include \u003cdo/make_pop.h\u003e\n#include \u003cdo/make_run.h\u003e\n#include \u003cdo/make_continue.h\u003e\n#include \u003cdo/make_checkpoint.h\u003e\n\nusing R = eoReal\u003ceoMinimizingFitness\u003e;\nusing CMA = edoNormalAdaptive\u003cR\u003e;\n\nR::FitnessType sphere(const R\u0026 sol) {\n    double sum = 0;\n    for(auto x : sol) { sum += x * x; }\n    return sum;\n}\n\nint main(int argc, char** argv) {\n    eoParser parser(argc, argv);\n    eoState state;\n\n    size_t dim = parser.createParam\u003csize_t\u003e(10,\n            \"dimension\", \"Dimension\", 'd',\n            \"Problem\").value();\n\n    size_t max_eval = parser.getORcreateParam\u003csize_t\u003e(100 * dim,\n            \"maxEval\", \"Maximum number of evaluations\", 'E',\n            \"Stopping criterion\").value();\n\n    edoNormalAdaptive\u003cR\u003e gaussian(dim);\n\n    auto\u0026 obj_func = state.pack\u003c eoEvalFuncPtr\u003cR\u003e \u003e(sphere);\n    auto\u0026 eval     = state.pack\u003c eoEvalCounterThrowException\u003cR\u003e \u003e(obj_func, max_eval);\n    auto\u0026 pop_eval = state.pack\u003c eoPopLoopEval\u003cR\u003e \u003e(eval);\n\n    auto\u0026 gen  = state.pack\u003c eoUniformGenerator\u003cR::AtomType\u003e \u003e(-5, 5);\n    auto\u0026 init = state.pack\u003c eoInitFixedLength\u003cR\u003e \u003e(dim, gen);\n    auto\u0026 pop = do_make_pop(parser, state, init);\n    pop_eval(pop,pop);\n\n    auto\u0026 eo_continue  = do_make_continue(  parser, state, eval);\n    auto\u0026 pop_continue = do_make_checkpoint(parser, state, eval, eo_continue);\n    auto\u0026 best = state.pack\u003c eoBestIndividualStat\u003cR\u003e \u003e();\n    pop_continue.add( best );\n    auto\u0026 distrib_continue = state.pack\u003c edoContAdaptiveFinite\u003cCMA\u003e \u003e();\n\n    auto\u0026 selector  = state.pack\u003c eoRankMuSelect\u003cR\u003e \u003e(dim/2);\n    auto\u0026 estimator = state.pack\u003c edoEstimatorNormalAdaptive\u003cR\u003e \u003e(gaussian);\n    auto\u0026 bounder   = state.pack\u003c edoBounderRng\u003cR\u003e \u003e(R(dim, -5), R(dim, 5), gen);\n    auto\u0026 sampler   = state.pack\u003c edoSamplerNormalAdaptive\u003cR\u003e \u003e(bounder);\n    auto\u0026 replacor  = state.pack\u003c eoCommaReplacement\u003cR\u003e \u003e();\n\n    make_verbose(parser);\n    make_help(parser);\n\n    auto\u0026 algo = state.pack\u003c edoAlgoAdaptive\u003cCMA\u003e \u003e(\n         gaussian , pop_eval, selector,\n         estimator, sampler , replacor,\n         pop_continue, distrib_continue);\n\n    try {\n        algo(pop);\n    } catch (eoMaxEvalException\u0026 e) {\n        eo::log \u003c\u003c eo::progress \u003c\u003c \"STOP\" \u003c\u003c std::endl;\n    }\n\n    std::cout \u003c\u003c best.value() \u003c\u003c std::endl;\n    return 0;\n}\n```\n\n5. Compile it with: `c++ cmaes.cpp -I../eo/src -I../edo/src -DWITH_EIGEN=1 -I/usr/include/eigen3 -std=c++17 -L./lib/ -leo -leoutils -les -o cmaes`\n6. `./cmaes -h`\n\n\n## Not-so-quick Start\n\n1. Use your system of choice, as soon as you know how to operate a C++ buildchain on it.\n2. Dependencies are: `libeigen3-dev libopenmpi-dev doxygen graphviz libgnuplot-iostream-dev` (or similar packagesnames, depending on your system)\n3. From the Paradiseo directory, within a `build` directory, call the equivalent of `cmake -D CMAKE_BUILD_TYPE=Release -DEDO=ON ..`, then call your system's favorite generator (see cmake's documentation for the `-G` option).\n4. Code your own algorithm, starting from one of the numerous examples (or tests) available around ParadisEO\n   (see the source code in `\u003cmodule\u003e/test/` or `\u003cmodule\u003e/tutorial/`, or see the website).\n5. Build it, indicating where to include the needed ParadisEO `\u003cmodule\u003e/src/` directories, and the `build/lib` directory for the library linker.\n\n\n# Rationale\n\n## Black-box and Gray-box Optimization Problems\n\nParadiseo targets the development of solvers for mathematical optimization\nproblems for which you cannot compute gradients.\nThe classical use case is the automated design or configuration of\nsome system which is simulated.\n\n## Metaheuristics / Evolutionary Algorithms\n\nParadiseo targets the design of metaheuristics solvers using\ncomputational intelligence methods, a subdomain of artificial intelligence.\n\n## Why choosing Paradiseo?\n\nLearning a full-featured framework like Paradiseo very often seems overkill.\nHowever, we would like to stress out that you may forget some points\nwhile jumping to this conclusion.\n\n**Paradiseo provides the *largest mature codebase* of state-of-the-art algorithms, and is focused on (automatically) find the *most efficient solvers*.**\n\nThe most classical impediment to the use of Paradiseo is that you just want to check if your problem can actually be solved with heuristics. You feel that it would be a loss of time to learn complex stuff if it ends being useless.\n\nHowever, you should keep in mind that:\n\n- Metaheuristics do seem very easy to implement in textbooks, but the state-of-the art versions of efficient algorithms can be a lot more complex.\n- It is usually easy to get something to actually run, but it is far more difficult to get an efficient solver.\n- Metaheuristics performances on a given problem are very sensitive to small variations in the parameter setting or the choice of some operators. Which render large experimental plans and algorithm selection compulsory to attain peak efficiency.\n\n**Fortunately, Paradiseo have the *largest codebase* of the market, hardened along 20 years of development of tens of solvers. Additionally, it provides the tools to rapidly search for the best combination of algorithms to solve your problem, even searching for this combination *automatically*.**\n\nParadiseo is the fastest framework on the market, which is a crucial feature for modern and robust approach to solver design and validation.\n\nAnother classical criticism against Paradiseo is that C++ is hard and that a fast language is useless because speed is not a concern when your objective function is dominating all the runtime.\n\nHowever, we argue that:\n\n- During the design phase of your solver, you will need to estimate its performance against synthetic benchmarks that are fast to compute. In that case, fast computation means fast design iterations. And it's even more true if you plan to use automated design to find the best solver for your problem.\n- Modern C++ makes use of the very same high-level abstractions you would find in more accepted languages like Python. Sure, the syntax is cumbersome, but you will not see it after a while, given that you will work at the algorithm level.\n- C++ provides full type checking and the largest set of tooling for any modern language, which are your first line of defense against long-term bugs. Sure, it sometimes gives you the impression that you fight against the compiler, but chasing subtle interface bugs across a complex Python code is even harder.\n\n# Features\n\n## Component-based Design\n\nDesigning an algorithm with Paradiseo consists in choosing what components (called operators) you want to use for your specific needs, just as building a structure with Lego blocks.\n\nIf you have a classical problem for which available code exists (for example if you have a black-box problem with real-valued variables), you will just choose operators to form an algorithm and connect it to your evaluation function (which computes the quality of a given solution).\n\nIf your problem is a bit more exotic, you will have to code a class that encodes how solutions to your problem are represented, and perhaps a few more. For instance, you may want ad-hoc variations operators, but most of the other operators (selection, replacement, stopping criteria, command-line interface, etc.) are already available in Paradiseo.\n\n## Large Choice of Components\n\nParadiseo is organized in several modules, either providing different \"grammars\" for different algorithms, either providing high-level features. All modules follows the same architecture design and are interoperable with the others, so that you can easily choose the subset of features you need.\n\nIt is, for instance, easy to start with a simple local search, then add multi-objective capabilities, then shared-memory parallelization, then hybridization with an evolutionary algorithm and finally plug everything in an objective function so as to optimize the parameters with a particle swarm optimizer.\n\n## Portability\n\nParadiseo is mainly developed under Linux operating systems, where its dependencies and the C++ toolchain are easy to install. Recent versions have been tested with gcc and clang compilers.\n\nStable versions should however work on Windows and any Unix-like operating system with a standard-conforming C++ development system. \n\n\n# Code\n\nThe latest stable version is on the official Git repository of INRIA: `git clone git://scm.gforge.inria.fr/paradiseo/paradiseo.git`\n\n## Dependencies\n\nIn order to build the latest version of Paradiseo, you will need a C++ compiler supporting C++17. So far, GCC and CLANG gave good results under Linux. You will also need the CMake and make build tools.\n\nA free working build chain under Windows seems always difficult to find. Paradiseo 2.0.1 was successfully tested with MinGW (minus the PEO module), but it's unsure if it still work for recent versions. If you managed to build under Windows, your feedback would be appreciated.\n\nSome features are only available if some dependencies are installed:\n\n- Most of the EDO module depends on either uBlas or Eigen3. The recommended package is Eigen3, which enables the adaptive algorithms.\n- Doxygen is needed to build the API documentation, and you should also install graphviz if you want the class relationship diagrams.\n- GNUplot is needed to have the… GNUplot graphs at checkpoints.\n\nTo install all those dependencies at once under Ubuntu (18.04), just type: `sudo apt install g++-8 cmake make libeigen3-dev libopenmpi-dev doxygen graphviz libgnuplot-iostream-dev`.\n\n## Compilation\n\nThe 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 \u003cgenerator-name\u003e` option (see the CMake doc for the list of available generators).\n\nUnder Linux, the default is make, and a build command is straitghtforward: `mkdir build ; cd build ; cmake .. \u0026\u0026 make -j`.\n\nThere is, however, several build options which you may want to switch. 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\u003coption\u003e=\u003cvalue\u003e` argument to cmake.\n\n**The first option to consider is `CMAKE_BUILD_TYPE`, which you most probably want to set to `Debug` (during development/tests) or `Release` (for production/validation).**\n\n\nOther important options are: `EDO` (which is false by default) and parallelization options: `ENABLE_OPENMP`, `MPI`, `SMP`.\n\nBy default, the build script will build the Paradiseo libraries only.\n\nIf you `ENABLE_CMAKE_TESTING` and `BUILD_TESTING`, it will be the tests, which you can run with the `ctest` command.\n\nIf you `ENABLE_CMAKE_EXAMPLE`, it will also build the examples.\n\nIf may want to make build scripts more verbose (especially when building the\ndoc) by enabling `CMAKE_VERBOSE_MAKEFILE`.\n\n\n## Licenses\n\nParadiseo is distributed under the GNU Lesser General Public License and the CeCILL license (depending on the modules).\n\nNote that those licenses places copyleft restrictions on a program created with Paradiseo, but does not apply these restrictions to other software that would links with the program.\n\n\n# Documentation\n\nParadiseo has a lot of documentation! You will find in the source repository\na lot of examples, the tutorials and you can generate the API documentation\n(`make doc`, then open\n`paradiseo/\u003cbuild\u003e/\u003cmodule\u003e/doc/html/index.html`).\n\nTutorials are located in each module's directory. For example for the EO module:\n`paradiseo/eo/tutorial`.\nA lot of examples for (almost) each class are available in the test directories\n(e.g. `paradiseo/eo/test`). Example problems and bindings to external\nbenchmark libraries are in `paradiseo/problems`.\n\nFor academic articles, books, more tutorials, presentations slides,\nreal life example of solvers and contact information,\nplease see the web site (available in `paradiseo/website/index.html`).\n\nThere is also an [online wiki](https://gitlab.inria.fr/paradiseo/paradiseo/-/wikis/home)\n\n\n# Contact\n\nFor further information about ParadisEO, help or to report any\nproblem, you can send an e-mail to: `paradiseo-help@lists.gforge.inria.fr`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnojhan%2Fparadiseo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnojhan%2Fparadiseo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnojhan%2Fparadiseo/lists"}