Commit e3298851 authored by Jean-Baptiste Mouret's avatar Jean-Baptiste Mouret
Browse files

make CMA-ES work

parent c2bd4e76
......@@ -90,6 +90,10 @@ struct Params {
};
struct opt_nloptnograd : public defaults::opt_nloptnograd {
};
#ifdef USE_LIBCMAES
struct opt_cmaes : public defaults::opt_cmaes {
};
#endif
};
struct DirectParams {
......@@ -180,7 +184,7 @@ int main()
// benchmark different optimization algorithms
#elif defined(OPT_CMAES)
using AcquiOpt_t = opt::Chained<Params, opt::NLOptNoGrad<DirectParams, nlopt::GN_DIRECT_L>, opt::NLOptNoGrad<BobyqaParams, nlopt::LN_BOBYQA>>;
using AcquiOpt_t = opt::Cmaes<Params>;
using Opt_t = bayes_opt::BOptimizer<Params, acquiopt<AcquiOpt_t>>;
#elif defined(OPT_DIRECT)
using AcquiOpt_t = opt::Chained<Params, opt::NLOptNoGrad<DirectParams, nlopt::GN_DIRECT_L>, opt::NLOptNoGrad<BobyqaParams, nlopt::LN_BOBYQA>>;
......
......@@ -71,7 +71,7 @@ def build_bo_benchmarks(bld):
limbo.create_variants(bld,
source = 'limbo/bench.cpp',
uselib_local = 'limbo',
uselib = 'BOOST EIGEN TBB NLOPT CMAES',
uselib = 'BOOST EIGEN TBB NLOPT LIBCMAES',
variants = ['BAYESOPT_DEF',
'BAYESOPT_DEF_HPOPT',
'LIMBO_DEF',
......
......@@ -53,6 +53,8 @@
#include <limbo/opt/chained.hpp>
#ifdef USE_LIBCMAES
#include <limbo/opt/cmaes.hpp>
#else
#warning NO CMA-ES
#endif
#include <limbo/opt/grid_search.hpp>
#ifdef USE_NLOPT
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment