AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
iterated_search.h
1#ifndef SEARCH_ALGORITHMS_ITERATED_SEARCH_H
2#define SEARCH_ALGORITHMS_ITERATED_SEARCH_H
3
4#include "downward/search_algorithm.h"
5
6#include <memory>
7#include <vector>
8
9class SearchAlgorithmFactory;
10
11namespace iterated_search {
12
13class IteratedSearch : public SearchAlgorithm {
14 std::vector<std::shared_ptr<SearchAlgorithmFactory>> algorithm_configs;
15
16 bool pass_bound;
17 bool repeat_last_phase;
18 bool continue_on_fail;
19 bool continue_on_solve;
20
21 int phase;
22 bool last_phase_found_solution;
23 int best_bound;
24 bool iterated_found_solution;
25
26 std::shared_ptr<SearchAlgorithm>
27 get_search_algorithm(int algorithm_configs_index);
28 std::shared_ptr<SearchAlgorithm> create_current_phase();
29 SearchStatus step_return_value();
30
31 virtual SearchStatus step() override;
32
33public:
34 IteratedSearch(
35 OperatorCost operator_cost,
36 int bound,
37 double max_time,
38 std::string description,
39 utils::Verbosity verbosity,
40 std::vector<std::shared_ptr<SearchAlgorithmFactory>> algorithm_configs,
41 bool pass_bound,
42 bool repeat_last,
43 bool continue_on_fail,
44 bool continue_on_solve);
45
46 ~IteratedSearch() override;
47
48 virtual void save_plan_if_necessary() override;
49 virtual void print_statistics() const override;
50};
51} // namespace iterated_search
52
53#endif