AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
landmark.h
1#ifndef LANDMARKS_LANDMARK_H
2#define LANDMARKS_LANDMARK_H
3
4#include "downward/task_proxy.h"
5
6#include <unordered_set>
7
8namespace landmarks {
9class Landmark {
10public:
11 Landmark(
12 std::vector<FactPair> _facts,
13 bool disjunctive,
14 bool conjunctive,
15 bool is_true_in_goal = false,
16 bool is_derived = false)
17 : facts(std::move(_facts))
18 , disjunctive(disjunctive)
19 , conjunctive(conjunctive)
20 , is_true_in_goal(is_true_in_goal)
21 , is_derived(is_derived)
22 {
23 assert(!(conjunctive && disjunctive));
24 assert(
25 (conjunctive && facts.size() > 1) ||
26 (disjunctive && facts.size() > 1) || facts.size() == 1);
27 }
28
29 bool operator==(const Landmark& other) const { return this == &other; }
30
31 bool operator!=(const Landmark& other) const { return !(*this == other); }
32
33 std::vector<FactPair> facts;
34 bool disjunctive;
35 bool conjunctive;
36 bool is_true_in_goal;
37 bool is_derived;
38
39 std::unordered_set<int> first_achievers;
40 std::unordered_set<int> possible_achievers;
41
42 bool is_true_in_state(const State& state) const;
43};
44} // namespace landmarks
45#endif
STL namespace.