diff --git a/src/search/AAA_Mechanical_Changes.md b/src/search/AAA_Mechanical_Changes.md index 7502ad8d34..0bfba91112 100644 --- a/src/search/AAA_Mechanical_Changes.md +++ b/src/search/AAA_Mechanical_Changes.md @@ -71,8 +71,8 @@ search │ ├── array_pool.h✅ │ ├── blind_search_heuristic.cc✅ │ ├── blind_search_heuristic.h✅ -│ ├── cea_heuristic.cc -│ ├── cea_heuristic.h +│ ├── cea_heuristic.cc✅ +│ ├── cea_heuristic.h✅ │ ├── cg_cache.cc │ ├── cg_cache.h │ ├── cg_heuristic.cc diff --git a/src/search/heuristics/cea_heuristic.cc b/src/search/heuristics/cea_heuristic.cc index da05b84f7d..efd0a27657 100644 --- a/src/search/heuristics/cea_heuristic.cc +++ b/src/search/heuristics/cea_heuristic.cc @@ -409,8 +409,11 @@ int ContextEnhancedAdditiveHeuristic::compute_heuristic( } ContextEnhancedAdditiveHeuristic::ContextEnhancedAdditiveHeuristic( - const plugins::Options &opts) - : Heuristic(opts), + const shared_ptr &transform, + bool cache_estimates, + const string &name, + utils::Verbosity verbosity) + : Heuristic(transform, cache_estimates, name, verbosity), min_action_cost(task_properties::get_min_operator_cost(task_proxy)) { if (log.is_at_least_normal()) { log << "Initializing context-enhanced additive heuristic..." << endl; @@ -448,7 +451,7 @@ class ContextEnhancedAdditiveHeuristicFeature : public plugins::TypedFeature create_component( + const plugins::Options &opts, const utils::Context &) const override { + return plugins::make_shared_from_args_tuple_and_args( + Heuristic::get_heuristic_parameters_from_options(opts) + ); + } }; static plugins::FeaturePlugin _plugin; diff --git a/src/search/heuristics/cea_heuristic.h b/src/search/heuristics/cea_heuristic.h index 7033760274..dc205a9a43 100644 --- a/src/search/heuristics/cea_heuristic.h +++ b/src/search/heuristics/cea_heuristic.h @@ -50,7 +50,11 @@ class ContextEnhancedAdditiveHeuristic : public Heuristic { protected: virtual int compute_heuristic(const State &ancestor_state) override; public: - explicit ContextEnhancedAdditiveHeuristic(const plugins::Options &opts); + ContextEnhancedAdditiveHeuristic( + const std::shared_ptr &transform, + bool cache_estimates, + const std::string &name, + utils::Verbosity verbosity); ~ContextEnhancedAdditiveHeuristic(); virtual bool dead_ends_are_reliable() const override; };