AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
pattern_collection_generator_systematic.h
1#ifndef PROBFD_PDBS_PATTERN_COLLECTION_GENERATOR_SYSTEMATIC_H
2#define PROBFD_PDBS_PATTERN_COLLECTION_GENERATOR_SYSTEMATIC_H
3
4#include "probfd/pdbs/pattern_collection_generator.h"
5#include "probfd/pdbs/types.h"
6
7#include "downward/utils/hash.h"
8
9#include <cstdlib>
10#include <memory>
11#include <unordered_set>
12#include <vector>
13
14namespace probfd {
15class ProbabilisticTaskProxy;
16class ProbabilisticTask;
17} // namespace probfd
18
19namespace probfd::causal_graph {
20class ProbabilisticCausalGraph;
21}
22
23namespace probfd::pdbs {
24
25class PatternCollectionGeneratorSystematic : public PatternCollectionGenerator {
26 using PatternSet = utils::HashSet<Pattern>;
27
28 const size_t max_pattern_size;
29 const bool only_interesting_patterns;
30 std::shared_ptr<PatternCollection> patterns;
31 PatternSet pattern_set; // Cleared after pattern computation.
32
33public:
34 PatternCollectionGeneratorSystematic(
35 int pattern_max_size,
36 bool only_interesting_patterns,
37 utils::Verbosity verbosity);
38
39 PatternCollectionInformation generate(
40 const std::shared_ptr<ProbabilisticTask>& task,
41 const std::shared_ptr<FDRCostFunction>& task_cost_function) override;
42
43private:
44 void enqueue_pattern_if_new(const Pattern& pattern);
45
46 void build_sga_patterns(
47 const ProbabilisticTaskProxy& task_proxy,
48 const causal_graph::ProbabilisticCausalGraph& cg);
49 void build_patterns(const ProbabilisticTaskProxy& task_proxy);
50 void build_patterns_naive(const ProbabilisticTaskProxy& task_proxy);
51};
52
53} // namespace probfd::pdbs
54
55#endif // PROBFD_PDBS_PATTERN_COLLECTION_GENERATOR_SYSTEMATIC_H
Namespace dedicated to probabilistic pattern databases.
Definition gzocp_heuristic.h:16
The top-level namespace of probabilistic Fast Downward.
Definition command_line.h:8