Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix hierarchical typing edge case #1574

Merged
merged 3 commits into from
Oct 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix hierarchical typing edge case
  • Loading branch information
tsilver-bdai committed Oct 17, 2023
commit 96c2e7aa86039c48d6b6e3009936e95cceea9aa5
7 changes: 4 additions & 3 deletions predicators/utils.py
Original file line number Diff line number Diff line change
@@ -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)