AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
pucs_flaw_finder.h
1#ifndef PROBFD_PDBS_CEGAR_PUCS_FLAW_FINDER_H
2#define PROBFD_PDBS_CEGAR_PUCS_FLAW_FINDER_H
3
4#include "probfd/pdbs/cegar/flaw_finding_strategy.h"
5
6#include "probfd/pdbs/types.h"
7
8#include "probfd/storage/per_state_storage.h"
9
10#include "probfd/value_type.h"
11
12#include "downward/algorithms/priority_queues.h"
13
14#include "downward/task_proxy.h"
15
16#include <string>
17#include <unordered_set>
18#include <vector>
19
20// Forward Declarations
21class State;
22
23namespace probfd::pdbs::cegar {
24
25class PUCSFlawFinder : public FlawFindingStrategy {
26 struct ExpansionInfo {
27 bool expanded = false;
28 value_t path_probability = 0_vt;
29 };
30
31 priority_queues::HeapQueue<value_t, State> pq_;
32 storage::PerStateStorage<ExpansionInfo> probabilities_;
33
34 const int max_search_states_;
35
36public:
37 explicit PUCSFlawFinder(int max_search_states);
38
39 bool apply_policy(
40 const ProbabilisticTaskProxy& task_proxy,
41 const StateRankingFunction& state_ranking_function,
42 const ProjectionStateSpace& mdp,
43 const ProjectionMultiPolicy& policy,
44 std::vector<Flaw>& flaws,
45 const std::function<bool(const Flaw&)>& notify_flaw,
46 utils::CountdownTimer& timer) override;
47
48 std::string get_name() override;
49};
50
51} // namespace probfd::pdbs::cegar
52
53#endif // PROBFD_PDBS_CEGAR_PUCS_FLAW_FINDER_H
double value_t
Typedef for the state value type.
Definition aliases.h:7