Search code examples
planningpddl

variable in PDDL that can be of more than one type?


Is there any version of this statement that is valid, expressing that an actor knows another actor or a location? Or must I specify separate predicates knows_actor and knows_location?

 (:predicates     
    (knows     ?a - ACTOR ?thing - ACTOR LOCATION)
 )

Solution

  • If the planner you are using supports types, a possible simple solution is to define a supertype in the types section:

    ACTOR LOCATON - ACTOR_OR_LOCATION 
    

    and then define the second parameter of the predicate (?thing) with the type ACTOR_OR_LOCATION