1#ifndef SEARCH_ALGORITHMS_LAZY_SEARCH_H
2#define SEARCH_ALGORITHMS_LAZY_SEARCH_H
4#include "downward/evaluation_context.h"
5#include "downward/evaluator.h"
6#include "downward/open_list.h"
7#include "downward/operator_id.h"
8#include "downward/search_algorithm.h"
9#include "downward/search_progress.h"
10#include "downward/search_space.h"
12#include "downward/utils/rng.h"
19namespace lazy_search {
20class LazySearch :
public SearchAlgorithm {
22 std::unique_ptr<EdgeOpenList> open_list;
25 bool reopen_closed_nodes;
27 bool randomize_successors;
28 bool preferred_successors_first;
29 std::shared_ptr<utils::RandomNumberGenerator> rng;
31 std::vector<Evaluator*> path_dependent_evaluators;
32 std::vector<std::shared_ptr<Evaluator>> preferred_operator_evaluators;
35 StateID current_predecessor_id;
36 OperatorID current_operator_id;
39 EvaluationContext current_eval_context;
41 virtual void initialize()
override;
42 virtual SearchStatus step()
override;
44 void generate_successors();
45 SearchStatus fetch_next_state();
47 void reward_progress();
49 std::vector<OperatorID> get_successor_operators(
50 const ordered_set::OrderedSet<OperatorID>& preferred_operators)
const;
54 const std::shared_ptr<OpenListFactory>& open,
56 const std::vector<std::shared_ptr<Evaluator>>& evaluators,
57 bool randomize_successors,
58 bool preferred_successors_first,
60 OperatorCost cost_type,
63 const std::string& description,
64 utils::Verbosity verbosity);
66 virtual void print_statistics()
const override;