2

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)
 )
davideps
  • 541
  • 3
  • 13

1 Answers1

2

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

CatOsMandros
  • 343
  • 2
  • 12
  • 1
    Yes, that works. I've seen this also done by setting specific types (ACTOR, LOCATION) also to the catchall type OBJECT. – davideps Jun 08 '19 at 10:05