Skip to content

Commit

Permalink
Merge remote-tracking branch 'MyFork/issue1082' into issue1082
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/search/AAA_Mechanical_Changes.md
  • Loading branch information
SimonDold committed Feb 7, 2024
2 parents 2b7bf6c + 2125076 commit 9c53523
Show file tree
Hide file tree
Showing 15 changed files with 178 additions and 210 deletions.
266 changes: 97 additions & 169 deletions src/search/AAA_Mechanical_Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,175 +44,103 @@ Mark in the list below what you updated:

```
search
├── abstract_task.cc
├── abstract_task.h
├── algorithms
├── axioms.cc
├── axioms.h
├── cartesian_abstractions
├── cmake
├── CMakeLists.txt
├── command_line.cc
├── command_line.h
├── evaluation_context.cc
├── evaluation_context.h
├── evaluation_result.cc
├── evaluation_result.h
├── evaluator_cache.cc
├── evaluator_cache.h
├── evaluator.cc
├── evaluator.h
├── evaluators
├── heuristic.cc
├── heuristic.h
├── heuristics
│ ├── additive_heuristic.cc✅
│ ├── additive_heuristic.h✅
│ ├── array_pool.h
│ ├── blind_search_heuristic.cc
│ ├── blind_search_heuristic.h
│ ├── cea_heuristic.cc
│ ├── cea_heuristic.h
│ ├── cg_cache.cc
│ ├── cg_cache.h
│ ├── cg_heuristic.cc
│ ├── cg_heuristic.h
│ ├── domain_transition_graph.cc
│ ├── domain_transition_graph.h
│ ├── ff_heuristic.cc✅
│ ├── ff_heuristic.h✅
│ ├── goal_count_heuristic.cc
│ ├── goal_count_heuristic.h
│ ├── hm_heuristic.cc✅
│ ├── hm_heuristic.h✅
│ ├── lm_cut_heuristic.cc
│ ├── lm_cut_heuristic.h
│ ├── lm_cut_landmarks.cc
│ ├── lm_cut_landmarks.h
│ ├── max_heuristic.cc✅
│ ├── max_heuristic.h✅
│ ├── relaxation_heuristic.cc✅
│ └── relaxation_heuristic.h✅
├── landmarks
├── lp
├── merge_and_shrink✅
│ ├── distances.cc✅
│ ├── distances.h✅
│ ├── factored_transition_system.cc✅
│ ├── factored_transition_system.h✅
│ ├── fts_factory.cc✅
│ ├── fts_factory.h✅
│ ├── label_reduction.cc✅
│ ├── label_reduction.h✅
│ ├── labels.cc✅
│ ├── labels.h✅
│ ├── merge_and_shrink_algorithm.cc✅
│ ├── merge_and_shrink_algorithm.h✅
│ ├── merge_and_shrink_heuristic.cc✅
│ ├── merge_and_shrink_heuristic.h✅
│ ├── merge_and_shrink_representation.cc✅
│ ├── merge_and_shrink_representation.h✅
│ ├── merge_scoring_function.cc✅
│ ├── merge_scoring_function_dfp.cc✅
│ ├── merge_scoring_function_dfp.h✅
│ ├── merge_scoring_function_goal_relevance.cc✅
│ ├── merge_scoring_function_goal_relevance.h✅
│ ├── merge_scoring_function.h✅
│ ├── merge_scoring_function_miasm.cc✅
│ ├── merge_scoring_function_miasm.h✅
│ ├── merge_scoring_function_miasm_utils.cc✅
│ ├── merge_scoring_function_miasm_utils.h✅
│ ├── merge_scoring_function_single_random.cc✅
│ ├── merge_scoring_function_single_random.h✅
│ ├── merge_scoring_function_total_order.cc✅
│ ├── merge_scoring_function_total_order.h✅
│ ├── merge_selector.cc✅
│ ├── merge_selector.h✅
│ ├── merge_selector_score_based_filtering.cc✅
│ ├── merge_selector_score_based_filtering.h✅
│ ├── merge_strategy.cc✅
│ ├── merge_strategy_factory.cc✅
│ ├── merge_strategy_factory.h✅
│ ├── merge_strategy_factory_precomputed.cc✅
│ ├── merge_strategy_factory_precomputed.h✅
│ ├── merge_strategy_factory_sccs.cc✅
│ ├── merge_strategy_factory_sccs.h✅
│ ├── merge_strategy_factory_stateless.cc✅
│ ├── merge_strategy_factory_stateless.h✅
│ ├── merge_strategy.h✅
│ ├── merge_strategy_precomputed.cc✅
│ ├── merge_strategy_precomputed.h✅
│ ├── merge_strategy_sccs.cc✅
│ ├── merge_strategy_sccs.h✅
│ ├── merge_strategy_stateless.cc✅
│ ├── merge_strategy_stateless.h✅
│ ├── merge_tree.cc✅
│ ├── merge_tree_factory.cc✅
│ ├── merge_tree_factory.h✅
│ ├── merge_tree_factory_linear.cc✅
│ ├── merge_tree_factory_linear.h✅
│ ├── merge_tree.h✅
│ ├── shrink_bisimulation.cc✅
│ ├── shrink_bisimulation.h✅
│ ├── shrink_bucket_based.cc✅
│ ├── shrink_bucket_based.h✅
│ ├── shrink_fh.cc✅
│ ├── shrink_fh.h✅
│ ├── shrink_random.cc✅
│ ├── shrink_random.h✅
│ ├── shrink_strategy.cc✅
│ ├── shrink_strategy.h✅
│ ├── transition_system.cc✅
│ ├── transition_system.h✅
│ ├── types.cc✅
│ ├── types.h✅
│ ├── utils.cc✅
│ └── utils.h✅
├── open_list_factory.cc
├── open_list_factory.h
├── open_list.h
├── open_lists
├── operator_cost.cc
├── operator_cost.h
├── operator_counting
├── operator_id.cc
├── operator_id.h
├── parser
├── pdbs✅
├── per_state_array.h
├── per_state_bitset.cc
├── per_state_bitset.h
├── per_state_information.h
├── per_task_information.h
├── plan_manager.cc
├── plan_manager.h
├── planner.cc
├── plugins
├── potentials
├── pruning
├── pruning_method.cc
├── pruning_method.h
├── search_algorithm.cc
├── search_algorithm.h
├── search_algorithms
├── search_node_info.cc
├── search_node_info.h
├── search_progress.cc
├── search_progress.h
├── search_space.cc
├── search_space.h
├── search_statistics.cc
├── search_statistics.h
├── state_id.cc
├── state_id.h
├── state_registry.cc
├── state_registry.h
├── task_id.h
├── task_proxy.cc
├── task_proxy.h
├── tasks
├── task_utils
└── utils
├── ✅ abstract_task.cc
├── ✅ abstract_task.h
├── ✅ algorithms
├── ✅ axioms.cc
├── ✅ axioms.h
├── ❌ cartesian_abstractions
├── ✅ cmake
├── ✅ CMakeLists.txt
├── ✅ command_line.cc
├── ✅ command_line.h
├── ✅ evaluation_context.cc
├── ✅ evaluation_context.h
├── ✅ evaluation_result.cc
├── ✅ evaluation_result.h
├── ✅ evaluator_cache.cc
├── ✅ evaluator_cache.h
├── ❓ evaluator.cc
├── ❓ evaluator.h
├── ❌ evaluators
├── ❓ heuristic.cc
├── ❓ heuristic.h
├── ✅ heuristics
│ ├── ✅ additive_heuristic.cc
│ ├── ✅ additive_heuristic.h
│ ├── ✅ array_pool.h
│ ├── ✅ blind_search_heuristic.cc
│ ├── ✅ blind_search_heuristic.h
│ ├── ✅ cea_heuristic.cc
│ ├── ✅ cea_heuristic.h
│ ├── ✅ cg_cache.cc
│ ├── ✅ cg_cache.h
│ ├── ✅ cg_heuristic.cc
│ ├── ✅ cg_heuristic.h
│ ├── ✅ domain_transition_graph.cc
│ ├── ✅ domain_transition_graph.h
│ ├── ✅ ff_heuristic.cc
│ ├── ✅ ff_heuristic.h
│ ├── ✅ goal_count_heuristic.cc
│ ├── ✅ goal_count_heuristic.h
│ ├── ✅ hm_heuristic.cc
│ ├── ✅ hm_heuristic.h
│ ├── ✅ lm_cut_heuristic.cc
│ ├── ✅ lm_cut_heuristic.h
│ ├── ✅ lm_cut_landmarks.cc
│ ├── ✅ lm_cut_landmarks.h
│ ├── ✅ max_heuristic.cc
│ ├── ✅ max_heuristic.h
│ ├── ✅ relaxation_heuristic.cc
│ └── ✅ relaxation_heuristic.h
├── ❌ landmarks
├── ❌ lp
├── ✅ merge_and_shrink
├── ✅ open_list_factory.cc
├── ✅ open_list_factory.h
├── ✅ open_list.h
├── ❌ open_lists
├── ✅ operator_cost.cc
├── ✅ operator_cost.h
├── ❌ operator_counting
├── ✅ operator_id.cc
├── ✅ operator_id.h
├── ✅ parser
├── ✅ pdbs
├── ✅ per_state_array.h
├── ✅ per_state_bitset.cc
├── ✅ per_state_bitset.h
├── ✅ per_state_information.h
├── ✅ per_task_information.h
├── ✅ plan_manager.cc
├── ✅ plan_manager.h
├── ✅ planner.cc
├── ✅ plugins
├── ❌ potentials
├── ❌ pruning
├── ❌ pruning_method.cc
├── ❌ pruning_method.h
├── ❌ search_algorithm.cc
├── ❌ search_algorithm.h
├── ❌ search_algorithms
├── ✅ search_node_info.cc
├── ✅ search_node_info.h
├── ✅ search_progress.cc
├── ✅ search_progress.h
├── ✅ search_space.cc
├── ✅ search_space.h
├── ✅ search_statistics.cc
├── ✅ search_statistics.h
├── ✅ state_id.cc
├── ✅ state_id.h
├── ✅ state_registry.cc
├── ✅ state_registry.h
├── ✅ task_id.h
├── ✅ task_proxy.cc
├── ✅ task_proxy.h
├── ❌ tasks
├── ✅ task_utils
└── ✅ utils
```
10 changes: 3 additions & 7 deletions src/search/heuristics/blind_search_heuristic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ BlindSearchHeuristic::BlindSearchHeuristic(
}
}

BlindSearchHeuristic::~BlindSearchHeuristic() {
}

int BlindSearchHeuristic::compute_heuristic(const State &ancestor_state) {
State state = convert_ancestor_state(ancestor_state);
if (task_properties::is_goal_state(task_proxy, state))
Expand Down Expand Up @@ -57,10 +54,9 @@ class BlindSearchHeuristicFeature : public plugins::TypedFeature<Evaluator, Blin

virtual shared_ptr<BlindSearchHeuristic> create_component(
const plugins::Options &opts, const utils::Context &) const override {
return make_shared<BlindSearchHeuristic>(opts.get<shared_ptr<AbstractTask>>("transform"),
opts.get<bool>("cache_estimates"),
opts.get<string>("description"),
opts.get<utils::Verbosity>("verbosity"));
return plugins::make_shared_from_args_tuple_and_args<BlindSearchHeuristic>(
Heuristic::get_heuristic_parameters_from_options(opts)
);
}
};

Expand Down
1 change: 0 additions & 1 deletion src/search/heuristics/blind_search_heuristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class BlindSearchHeuristic : public Heuristic {
bool cache_estimates,
const std::string &name,
utils::Verbosity verbosity);
~BlindSearchHeuristic();
};
}

Expand Down
16 changes: 13 additions & 3 deletions src/search/heuristics/cea_heuristic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,11 @@ int ContextEnhancedAdditiveHeuristic::compute_heuristic(
}

ContextEnhancedAdditiveHeuristic::ContextEnhancedAdditiveHeuristic(
const plugins::Options &opts)
: Heuristic(opts),
const shared_ptr<AbstractTask> &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;
Expand Down Expand Up @@ -448,7 +451,7 @@ class ContextEnhancedAdditiveHeuristicFeature : public plugins::TypedFeature<Eva
ContextEnhancedAdditiveHeuristicFeature() : TypedFeature("cea") {
document_title("Context-enhanced additive heuristic");

Heuristic::add_options_to_feature(*this);
Heuristic::add_options_to_feature(*this, "cea");

document_language_support("action costs", "supported");
document_language_support("conditional effects", "supported");
Expand All @@ -463,6 +466,13 @@ class ContextEnhancedAdditiveHeuristicFeature : public plugins::TypedFeature<Eva
document_property("safe", "no");
document_property("preferred operators", "yes");
}

virtual shared_ptr<ContextEnhancedAdditiveHeuristic> create_component(
const plugins::Options &opts, const utils::Context &) const override {
return plugins::make_shared_from_args_tuple_and_args<ContextEnhancedAdditiveHeuristic>(
Heuristic::get_heuristic_parameters_from_options(opts)
);
}
};

static plugins::FeaturePlugin<ContextEnhancedAdditiveHeuristicFeature> _plugin;
Expand Down
6 changes: 5 additions & 1 deletion src/search/heuristics/cea_heuristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<AbstractTask> &transform,
bool cache_estimates,
const std::string &name,
utils::Verbosity verbosity);
~ContextEnhancedAdditiveHeuristic();
virtual bool dead_ends_are_reliable() const override;
};
Expand Down
3 changes: 0 additions & 3 deletions src/search/heuristics/cg_cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ CGCache::CGCache(const TaskProxy &task_proxy, int max_cache_size, utils::LogProx
}
}

CGCache::~CGCache() {
}

int CGCache::compute_required_cache_size(
int var_id, const vector<int> &depends_on, int max_cache_size) const {
/*
Expand Down
1 change: 0 additions & 1 deletion src/search/heuristics/cg_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class CGCache {
static const int NOT_COMPUTED = -2;

CGCache(const TaskProxy &task_proxy, int max_cache_size, utils::LogProxy &log);
~CGCache();

bool is_cached(int var) const {
return !cache[var].empty();
Expand Down
Loading

0 comments on commit 9c53523

Please sign in to comment.