Search code examples
pddl

object composition in PDDL


I'm very new to PDDL and stumbling into something basic.

The object model is something along the line of:

  • Object A has multiple numeric properties: Object B is a collection of Object A,
  • as part of the pre-condition in an action where the parameter passed is Object B, properties of all Object A's (that are contained in Object B) need to satisfy certain criteria.

Using functions, I can define numeric properties of Object A, but I don't know how to capture "Object B is a collection of Object A"?


Solution

  • I'm not sure if it adheres to your problem specification, but couldn't you just define a predicate is_part_of(?x - ObjectA ?y - ObjectB) to define this property?

    Then in the precondition you can use a forall quantifier on all objectA. In the forall body state that when the predicate is true, the objects have to satisfy the criteria. Note that PDDL has the when keyword that makes this easy. Otherwise you could encode this as just a simple or by encoding the alternative.