AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
sampling_flaw_finder.h
1#ifndef PROBFD_PDBS_CEGAR_SAMPLING_FLAW_FINDER_H
2#define PROBFD_PDBS_CEGAR_SAMPLING_FLAW_FINDER_H
3
4#include "probfd/pdbs/cegar/flaw_finding_strategy.h"
5
6#include "probfd/storage/per_state_storage.h"
7
8#include "probfd/distribution.h"
9
10#include <memory>
11#include <string>
12#include <unordered_set>
13#include <vector>
14
15// Forward Declarations
16class StateID;
17class State;
18
19namespace utils {
20class RandomNumberGenerator;
21}
22
23namespace probfd {
24class ProbabilisticTaskProxy;
25}
26
27namespace probfd::pdbs::cegar {
28
29class SamplingFlawFinder : public FlawFindingStrategy {
30 struct ExplorationInfo {
31 bool explored = false;
32 Distribution<StateID> successors;
33 };
34
35 std::vector<State> stk_;
36 storage::PerStateStorage<ExplorationInfo> einfos_;
37
38 const std::shared_ptr<utils::RandomNumberGenerator> rng_;
39 const int max_search_states_;
40
41public:
42 explicit SamplingFlawFinder(
43 std::shared_ptr<utils::RandomNumberGenerator> rng,
44 int max_search_states);
45
46 ~SamplingFlawFinder() override;
47
48 bool apply_policy(
49 const ProbabilisticTaskProxy& task_proxy,
50 const StateRankingFunction& state_ranking_function,
51 const ProjectionStateSpace& mdp,
52 const ProjectionMultiPolicy& policy,
53 std::vector<Flaw>& flaws,
54 const std::function<bool(const Flaw&)>& notify_flaw,
55 utils::CountdownTimer& timer) override;
56
57 std::string get_name() override;
58};
59
60} // namespace probfd::pdbs::cegar
61
62#endif // PROBFD_PDBS_CEGAR_SAMPLING_FLAW_FINDER_H
The top-level namespace of probabilistic Fast Downward.
Definition command_line.h:8