Skip to content

Commit

Permalink
Ignore effects achieving true facts of future landmarks when preferri…
Browse files Browse the repository at this point in the history
…ng operators.
  • Loading branch information
ClemensBuechner committed Jul 9, 2024
1 parent a707e7c commit 7534f53
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/search/landmarks/landmark_heuristic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,20 @@ void LandmarkHeuristic::generate_preferred_operators(
OperatorProxy op = task_proxy.get_operators()[op_id];
EffectsProxy effects = op.get_effects();
for (EffectProxy effect : effects) {
if (!does_fire(effect, state))
if (!does_fire(effect, state)) {
continue;
FactProxy fact_proxy = effect.get_fact();
LandmarkNode *lm_node = lm_graph->get_node(fact_proxy.get_pair());
}
FactPair fact = effect.get_fact().get_pair();
if (state[fact.var].get_value() == fact.value) {
continue;
}
LandmarkNode *lm_node = lm_graph->get_node(fact);
if (lm_node && future.test(lm_node->get_id())) {
set_preferred(op);
}
if (lm_graph->contains_conjunctive_landmark(
fact_proxy.get_pair())) {
if (lm_graph->contains_conjunctive_landmark(fact)) {
vector<LandmarkNode *> conjunctive_landmarks =
lm_graph->get_conjunctive_landmarks(fact_proxy.get_pair());
lm_graph->get_conjunctive_landmarks(fact);
for (auto conj_lm : conjunctive_landmarks) {
if (future.test(conj_lm->get_id())) {
set_preferred(op);
Expand Down

0 comments on commit 7534f53

Please sign in to comment.