Skip to content

Commit

Permalink
Prefer absolute index
Browse files Browse the repository at this point in the history
  • Loading branch information
Maumagnaguagno committed Dec 30, 2023
1 parent 61efaf9 commit c900f1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion extensions/Dejavu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def apply(operators, methods, predicates, state, tasks, goal_pos, goal_not, debu
end
method.drop(2).each {|dec|
break if dec.equal?(decomposition)
dec[-1].each {|subtask,*sterms| subtask.sub!('visit','mark') if subtask.start_with?('invisible_visit_','invisible_unvisit_') and sterms == terms}
dec[4].each {|subtask,*sterms| subtask.sub!('visit','mark') if subtask.start_with?('invisible_visit_','invisible_unvisit_') and sterms == terms}
}
end
}
Expand Down
5 changes: 2 additions & 3 deletions extensions/Macro.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ def apply(operators, methods, predicates, state, tasks, goal_pos, goal_not, debu
puts 'Macro'.center(50,'-') if debug
# Task counter
counter = Hash.new(0)
methods.each {|met| met.drop(2).each {|dec| dec[-1].each {|t,| counter[t] += 1}}}
methods.each {|met| met.drop(2).each {|dec| dec[4].each {|t,| counter[t] += 1}}}
ordered = tasks.shift
tasks.each {|t,| counter[t] += 1}
# Macro sequential operators
macro = []
clear_ops = {}
methods.each {|met|
met.drop(2).each {|dec|
macro_sequential_operators(operators, macro, dec[-1], new_subtasks = [], counter, clear_ops, debug)
dec[4] = new_subtasks
macro_sequential_operators(operators, macro, dec[4], dec[4] = [], counter, clear_ops, debug)
}
}
# Macro sequential top ordered operators
Expand Down
2 changes: 1 addition & 1 deletion extensions/Pullup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def apply(operators, methods, predicates, state, tasks, goal_pos, goal_not, debu

def mark_effects(operators, methods, decompositions, effects, visited = {})
decompositions.each {|dec|
dec[-1].each {|s,|
dec[4].each {|s,|
unless visited.include?(s)
visited[s] = nil
if op = operators.assoc(s)
Expand Down

0 comments on commit c900f1b

Please sign in to comment.