AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
flaw_finding_strategy.h
1#ifndef PROBFD_PDBS_CEGAR_FLAW_FINDING_STRATEGY_H
2#define PROBFD_PDBS_CEGAR_FLAW_FINDING_STRATEGY_H
3
4#include "probfd/pdbs/types.h"
5
6#include <functional>
7#include <string>
8#include <unordered_set>
9#include <vector>
10
11// Forward Declarations
12class State;
13class PreconditionsProxy;
14class GoalsProxy;
15
16namespace utils {
17class CountdownTimer;
18}
19
20namespace probfd {
21class ProbabilisticTaskProxy;
22}
23
24namespace probfd::pdbs {
25class StateRankingFunction;
26}
27
28namespace probfd::pdbs::cegar {
29struct Flaw;
30}
31
32namespace probfd::pdbs::cegar {
33
34class FlawFindingStrategy {
35public:
36 virtual ~FlawFindingStrategy() = default;
37
38 // Returns whether policy is executable (modulo blacklisting)
39 // Note that the output flaw list might be empty regardless since only
40 // remaining goals are added to the list for goal violations.
41 virtual bool apply_policy(
42 const ProbabilisticTaskProxy& task_proxy,
43 const StateRankingFunction& state_ranking_function,
44 const ProjectionStateSpace& mdp,
45 const ProjectionMultiPolicy& policy,
46 std::vector<Flaw>& flaws,
47 const std::function<bool(const Flaw&)>& notify_flaw,
48 utils::CountdownTimer& timer) = 0;
49
50 virtual std::string get_name() = 0;
51};
52
53bool collect_flaws(
54 PreconditionsProxy facts,
55 const State& state,
56 std::vector<Flaw>& flaws,
57 const std::function<bool(const Flaw&)>& accept_flaw);
58
59bool collect_flaws(
60 GoalsProxy facts,
61 const State& state,
62 std::vector<Flaw>& flaws,
63 const std::function<bool(const Flaw&)>& accept_flaw);
64
65} // namespace probfd::pdbs::cegar
66
67#endif // PROBFD_PDBS_CEGAR_FLAW_FINDING_STRATEGY_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