Why this domain file doesn't compile?

56 Views Asked by At

I am trying to code a planification in PDDL with robots that serve tea to persons. This is my domain file:

(define (domain robots)
    (:requirements :strips :typing :disjunctive-preconditions)
  (:types entidad robot-entidad persona-entidad taza-entidad armario-entidad maquina-entidad localizacion brazo)
  
  (:predicates (at ?x - entidad ?l - location)
           (in ?t - taza ?x - entidad)  
           (free ?r - robot ?b - brazo)
           (taza-vacia ?t)
           (connected ?l - location ?l1 - location)
           )    
 (:action MOVER
       :parameters (?r - robot ?l - localizacion ?l1 - localizacion)
       :precondition (and (at-robot ?r ?l)
                  (connected ?l ?l1))
       :effect (and (at-robot ?r ?l1)
            (connected ?l ?l1)
            (not (at-robot ?r ?l))))  
 (:action COGER-TAZA
           :parameters (?r - robot ?b - brazo ?t - taza ?a - armario ?m - maquina ?p - persona ?l - localizacion)
           :precondition (and (at ?r ?l)
                              (at ?t ?l)
                              (free ?r ?b)
                              (or (in ?t ?a) (in ?t ?p) (in ?t ?m) (in ?t ?r))
                              (or (taza-vacia ?t) (not (taza-vacia ?t))))
 
           :effect (and (or (taza-vacia ?t) (not (taza-vacia ?t))) 
                (at ?r ?l) 
                (at ?t ?l) 
                (in ?t ?r)))
  (:action HACER-TE
       :parameters (?r - robot ?b - brazo ?t - taza ?m - maquina ?p - persona ?l - localizacion)
       :precondition (and (at ?r ?l)
                  (at ?m ?l)
                  (at ?t ?l)
                  (in ?t ?r)
                  (taza-vacia ?t))
       :effect (and (at ?r ?l)
            (at ?m ?l)
            (at ?t ?l)
            (in ?t ?m)
            (not (taza-vacia ?t))))
  (:action SERVIR-TE
       :parameters (?r - robot ?b - brazo ?t - taza ?p - persona ?l - localizacion)
       :precondition (and (at ?r ?l)
                  (at ?t ?l)
                  (at ?p ?l)
                  (in ?t ?r)
                  (not (taza-vacia ?t))
                  (not (free ?r ?b)))
       :effect (and (at ?r ?l)
            (at ?t ?l)
            (at ?p ?l)
            (in ?t ?p)
            (not (taza-vacia ?t))
            (free ?r ?b)))
)
  

The error that the metric-ff says is: "syntax error in line 29, 'or': domain definition expected" I'm not able to identify the syntax error. Thanks!

0

There are 0 best solutions below