Skip to content

Commit

Permalink
[issue1082] triage TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjaschindler committed Feb 16, 2024
1 parent 77586ee commit 957a6d4
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 39 deletions.
16 changes: 8 additions & 8 deletions src/search/AAA_Mechanical_Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ search
├── ✅ evaluation_result.h
├── ✅ evaluator_cache.cc
├── ✅ evaluator_cache.h
├── evaluator.cc
├── evaluator.h
├── evaluator.cc
├── evaluator.h
├── ✅ evaluators
├── heuristic.cc
├── heuristic.h
├── heuristic.cc
├── heuristic.h
├── ✅ heuristics
├── ✅ landmarks
├── ✅ lp
├── ✅ merge_and_shrink
├── ✅ open_list_factory.cc
├── ✅ open_list_factory.h
├── ✅ open_list.h
├── open_lists
├── open_lists
├── ✅ operator_cost.cc
├── ✅ operator_cost.h
├── ✅ operator_counting
Expand All @@ -95,7 +95,7 @@ search
├── ✅ plan_manager.h
├── ✅ planner.cc
├── ✅ plugins
├── potentials
├── potentials
├── ✅ pruning
├── ✅ pruning_method.cc
├── ✅ pruning_method.h
Expand All @@ -117,8 +117,8 @@ search
│ ├── ✅ plugin_lazy.cc
│ ├── ✅ plugin_lazy_greedy.cc
│ ├── ✅ plugin_lazy_wastar.cc
│ ├── search_common.cc
│ └── search_common.h
│ ├── search_common.cc
│ └── search_common.h
├── ✅ search_node_info.cc
├── ✅ search_node_info.h
├── ✅ search_progress.cc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class AdditiveCartesianHeuristicFeature
virtual shared_ptr<AdditiveCartesianHeuristic> create_component(
const plugins::Options &opts, const utils::Context &) const override {
return plugins::make_shared_from_arg_tuples<AdditiveCartesianHeuristic>(
opts.get<vector<shared_ptr<SubtaskGenerator>>>("subtasks"), // TODO issue1082 why not get_list?
opts.get_list<shared_ptr<SubtaskGenerator>>("subtasks"),
opts.get<int>("max_states"),
opts.get<int>("max_transitions"),
opts.get<double>("max_time"),
Expand Down
5 changes: 0 additions & 5 deletions src/search/evaluator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ void add_evaluator_options_to_feature(plugins::Feature &feature, const string &d
utils::add_log_options_to_feature(feature);
}

// TODO 1082 remove this, just keep the one above
void add_evaluator_options_to_feature(plugins::Feature &feature) {
utils::add_log_options_to_feature(feature);
}

tuple<string, utils::Verbosity> get_evaluator_arguments_from_options(
const plugins::Options &opts) {
return tuple_cat(
Expand Down
1 change: 0 additions & 1 deletion src/search/evaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ class Evaluator {
};

extern void add_evaluator_options_to_feature(plugins::Feature &feature, const std::string &description);
extern void add_evaluator_options_to_feature(plugins::Feature &feature); // TODO 1082 remove this, just keep the one above

extern std::tuple<std::string, utils::Verbosity> get_evaluator_arguments_from_options(const plugins::Options &opts);
extern std::tuple<bool, bool, bool> get_evaluator_default_arguments();
Expand Down
4 changes: 2 additions & 2 deletions src/search/landmarks/landmark_cost_partitioning_heuristic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ LandmarkCostPartitioningHeuristic::LandmarkCostPartitioningHeuristic(
}

void LandmarkCostPartitioningHeuristic::check_unsupported_features(
const plugins::Options &opts) {
const plugins::Options &lm_factory_option) {
shared_ptr<LandmarkFactory> lm_graph_factory =
opts.get<shared_ptr<LandmarkFactory>>("lm_factory");
lm_factory_option.get<shared_ptr<LandmarkFactory>>("lm_factory");

if (task_properties::has_axioms(task_proxy)) {
cerr << "Cost partitioning does not support axioms." << endl;
Expand Down
4 changes: 2 additions & 2 deletions src/search/landmarks/landmark_cost_partitioning_heuristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ enum class CostPartitioningMethod {
class LandmarkCostPartitioningHeuristic : public LandmarkHeuristic {
std::unique_ptr<CostPartitioningAlgorithm> cost_partitioning_algorithm;

void check_unsupported_features(const plugins::Options &opts); // TODO issue1082 this needs Options to construct the lm_factory later.
void check_unsupported_features(const plugins::Options &lm_factory_option); // TODO issue1082 this needs Options to construct the lm_factory later.
void set_cost_partitioning_algorithm(CostPartitioningMethod cost_partitioning,
lp::LPSolverType lpsolver,
bool alm);
Expand All @@ -32,7 +32,7 @@ class LandmarkCostPartitioningHeuristic : public LandmarkHeuristic {
This should be handled by issue559 eventually.
*/
LandmarkCostPartitioningHeuristic(
const plugins::Options &options,
const plugins::Options &lm_factory_option,
bool use_preferred_operators,
bool prog_goal,
bool prog_gn,
Expand Down
6 changes: 3 additions & 3 deletions src/search/landmarks/landmark_sum_heuristic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static bool are_dead_ends_reliable(
}

LandmarkSumHeuristic::LandmarkSumHeuristic(
const plugins::Options &lm_factory_options,
const plugins::Options &lm_factory_option,
bool use_preferred_operators,
bool prog_goal,
bool prog_gn,
Expand All @@ -44,12 +44,12 @@ LandmarkSumHeuristic::LandmarkSumHeuristic(
description, verbosity),
dead_ends_reliable(
are_dead_ends_reliable(
lm_factory_options.get<shared_ptr<LandmarkFactory>>("lm_factory"),
lm_factory_option.get<shared_ptr<LandmarkFactory>>("lm_factory"),
task_proxy)) {
if (log.is_at_least_normal()) {
log << "Initializing landmark sum heuristic..." << endl;
}
initialize(lm_factory_options, prog_goal, prog_gn, prog_r);
initialize(lm_factory_option, prog_goal, prog_gn, prog_r);
compute_landmark_costs();
}

Expand Down
2 changes: 1 addition & 1 deletion src/search/landmarks/landmark_sum_heuristic.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class LandmarkSumHeuristic : public LandmarkHeuristic {
after this happened, so we allow the landmark heuristics to keep a
(small) options object around for that purpose.
*/
LandmarkSumHeuristic(const plugins::Options &lm_factory_options,
LandmarkSumHeuristic(const plugins::Options &lm_factory_option,
bool use_preferred_operators,
bool prog_goal,
bool prog_gn,
Expand Down
2 changes: 1 addition & 1 deletion src/search/search_algorithm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ SearchAlgorithm::SearchAlgorithm(
task_properties::print_variable_statistics(task_proxy);
}

SearchAlgorithm::SearchAlgorithm(const plugins::Options &opts) // TODO issue1082 needed for iterated search
SearchAlgorithm::SearchAlgorithm(const plugins::Options &opts) // TODO objections object is needed for iterated search, the prototype for issue559 resolves this
: description(opts.get_unparsed_config()),
status(IN_PROGRESS),
solution_found(false),
Expand Down
2 changes: 1 addition & 1 deletion src/search/search_algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class SearchAlgorithm {
double max_time,
const std::string &description,
utils::Verbosity verbosity);
explicit SearchAlgorithm(const plugins::Options &opts); // TODO issue1082 needed for iterated search
explicit SearchAlgorithm(const plugins::Options &opts); // TODO objections object is needed for iterated search, the prototype for issue559 resolves this
virtual ~SearchAlgorithm();
virtual void print_statistics() const = 0;
virtual void save_plan_if_necessary();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static shared_ptr<OpenListFactory> create_ehc_open_list_factory(
} else {
/*
TODO: Reduce code duplication with search_common.cc,
function create_astar_open_list_factory_and_f_eval. TODO: issue1082 update comment
function create_astar_open_list_factory_and_f_eval.
It would probably make sense to add a factory function or
constructor that encapsulates this work to the tie-breaking
Expand Down
2 changes: 1 addition & 1 deletion src/search/search_algorithms/iterated_search.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class IteratedSearch : public SearchAlgorithm {
virtual SearchStatus step() override;

public:
IteratedSearch(const plugins::Options &opts); // TODO issue1082 still needs the options objects, the prototype for issue559 resolves this
IteratedSearch(const plugins::Options &opts); // TODO this still needs the options objects, the prototype for issue559 resolves this

virtual void save_plan_if_necessary() override;
virtual void print_statistics() const override;
Expand Down
12 changes: 6 additions & 6 deletions src/search/search_algorithms/plugin_eager_greedy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,28 @@ class EagerGreedySearchFeature : public plugins::TypedFeature<SearchAlgorithm, e
document_note(
"Closed nodes",
"Closed node are not re-opened");
document_note( // TODO issue1082 confirm this
document_note(
"Equivalent statements using general eager search",
"\n```\n--evaluator h2=eval2\n"
"--search eager_greedy([eval1, h2], preferred=h2, boost=100)\n```\n"
"--search eager_greedy([eval1, h2], preferred=[h2], boost=100)\n```\n"
"is equivalent to\n"
"```\n--evaluator h1=eval1 --heuristic h2=eval2\n"
"--search eager(alt([single(h1), single(h1, pref_only=true), single(h2), \n"
" single(h2, pref_only=true)], boost=100),\n"
" preferred=h2)\n```\n"
" preferred=[h2])\n```\n"
"------------------------------------------------------------\n"
"```\n--search eager_greedy([eval1, eval2])\n```\n"
"is equivalent to\n"
"```\n--search eager(alt([single(eval1), single(eval2)]))\n```\n"
"------------------------------------------------------------\n"
"```\n--evaluator h1=eval1\n"
"--search eager_greedy(h1, preferred=h1)\n```\n"
"--search eager_greedy([h1], preferred=[h1])\n```\n"
"is equivalent to\n"
"```\n--evaluator h1=eval1\n"
"--search eager(alt([single(h1), single(h1, pref_only=true)]),\n"
" preferred=h1)\n```\n"
" preferred=[h1])\n```\n"
"------------------------------------------------------------\n"
"```\n--search eager_greedy(eval1)\n```\n"
"```\n--search eager_greedy([eval1])\n```\n"
"is equivalent to\n"
"```\n--search eager(single(eval1))\n```\n", true);
}
Expand Down
10 changes: 5 additions & 5 deletions src/search/search_algorithms/plugin_lazy_greedy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,24 @@ class LazyGreedySearchFeature : public plugins::TypedFeature<SearchAlgorithm, la
document_note( // TODO issue1082 confirm this
"Equivalent statements using general lazy search",
"\n```\n--evaluator h2=eval2\n"
"--search lazy_greedy([eval1, h2], preferred=h2, boost=100)\n```\n"
"--search lazy_greedy([eval1, h2], preferred=[h2], boost=100)\n```\n"
"is equivalent to\n"
"```\n--evaluator h1=eval1 --heuristic h2=eval2\n"
"--search lazy(alt([single(h1), single(h1, pref_only=true), single(h2),\n"
" single(h2, pref_only=true)], boost=100),\n"
" preferred=h2)\n```\n"
" preferred=[h2])\n```\n"
"------------------------------------------------------------\n"
"```\n--search lazy_greedy([eval1, eval2], boost=100)\n```\n"
"is equivalent to\n"
"```\n--search lazy(alt([single(eval1), single(eval2)], boost=100))\n```\n"
"------------------------------------------------------------\n"
"```\n--evaluator h1=eval1\n--search lazy_greedy(h1, preferred=h1)\n```\n"
"```\n--evaluator h1=eval1\n--search lazy_greedy([h1], preferred=[h1])\n```\n"
"is equivalent to\n"
"```\n--evaluator h1=eval1\n"
"--search lazy(alt([single(h1), single(h1, pref_only=true)], boost=1000),\n"
" preferred=h1)\n```\n"
" preferred=[h1])\n```\n"
"------------------------------------------------------------\n"
"```\n--search lazy_greedy(eval1)\n```\n"
"```\n--search lazy_greedy([eval1])\n```\n"
"is equivalent to\n"
"```\n--search lazy(single(eval1))\n```\n",
true);
Expand Down
1 change: 0 additions & 1 deletion src/search/search_algorithms/search_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "../evaluators/g_evaluator.h"
#include "../evaluators/sum_evaluator.h"
#include "../evaluators/weighted_evaluator.h"
#include "../plugins/options.h"
#include "../open_lists/alternation_open_list.h"
#include "../open_lists/best_first_open_list.h"
#include "../open_lists/tiebreaking_open_list.h"
Expand Down

0 comments on commit 957a6d4

Please sign in to comment.