AI 24/25 Project Software
Documentation for the AI 24/25 course programming project software
Loading...
Searching...
No Matches
stubborn_sets_simple.h
1#ifndef PRUNING_STUBBORN_SETS_SIMPLE_H
2#define PRUNING_STUBBORN_SETS_SIMPLE_H
3
4#include "downward/pruning/stubborn_sets_action_centric.h"
5
6namespace stubborn_sets_simple {
7/* Implementation of simple instantiation of strong stubborn sets.
8 Disjunctive action landmarks are computed trivially.*/
9class StubbornSetsSimple : public stubborn_sets::StubbornSetsActionCentric {
10 /* interference_relation[op1_no] contains all operator indices
11 of operators that interfere with op1. */
12 std::vector<std::vector<int>> interference_relation;
13 std::vector<bool> interference_relation_computed;
14
15 void add_necessary_enabling_set(const FactPair& fact);
16 void add_interfering(int op_no);
17
18 inline bool interfere(int op1_no, int op2_no)
19 {
20 return can_disable(op1_no, op2_no) || can_conflict(op1_no, op2_no) ||
21 can_disable(op2_no, op1_no);
22 }
23 const std::vector<int>& get_interfering_operators(int op1_no);
24
25protected:
26 virtual void initialize_stubborn_set(const State& state) override;
27 virtual void
28 handle_stubborn_operator(const State& state, int op_no) override;
29
30public:
31 explicit StubbornSetsSimple(utils::Verbosity verbosity);
32 virtual void initialize(const std::shared_ptr<AbstractTask>& task) override;
33};
34} // namespace stubborn_sets_simple
35
36#endif