Skip to content

Commit

Permalink
fix hierarchical typing edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
tsilver-bdai committed Oct 17, 2023
1 parent 7aa8f59 commit 96c2e7a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions predicators/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2806,9 +2806,10 @@ def create_pddl_domain(operators: Collection[NSRTOrSTRIPSOperator],
for parent_type in sorted(parent_to_children_types):
child_types = parent_to_children_types[parent_type]
if not child_types:
continue
child_type_str = " ".join(t.name for t in child_types)
types_str += f"\n {child_type_str} - {parent_type.name}"
types_str += f"\n {parent_type.name}"
else:
child_type_str = " ".join(t.name for t in child_types)
types_str += f"\n {child_type_str} - {parent_type.name}"
ops_lst = sorted(operators)
preds_str = "\n ".join(pred.pddl_str() for pred in preds_lst)
ops_strs = "\n\n ".join(op.pddl_str() for op in ops_lst)
Expand Down

0 comments on commit 96c2e7a

Please sign in to comment.