pyperplan icon indicating copy to clipboard operation
pyperplan copied to clipboard

Error unknown predicate and used in precondition of action

Open MATTYGILO opened this issue 11 months ago • 1 comments

I am getting this error:

Error unknown predicate and used in precondition of action

from this code:

    (:action PICKUP_NORMAL
        :parameters (?b - Bot ?a - Aisle ?s - Shelf)
        ; The bot is in the aisle (At ?b ?a)
        ; The bot is not holding anything (not (Holding ?b))
        ; The bot can pick up (CanPickUp ?a ?s)
        ; The shelf must not be weighed (not (WeighableShelf ?s))
        :precondition (and
            (At ?b ?a)
            (and
                (not (Holding ?b))
                (and
                    (CanPickUp ?a ?s)
                    (not (WeighableShelf ?s))
                )

            )
        )
        ; The bot is holding something (Holding ?b)
        ; The bot is holding the shelf (HoldingShelf ?b ?s)
        :effect (and
            (Holding ?b)
            (HoldingShelf ?b ?s)
        )
    )

MATTYGILO avatar Mar 18 '24 09:03 MATTYGILO

How does the (:predicates ...) section in your domain file look like? Did you declare all predicates there?

roeger avatar Mar 18 '24 09:03 roeger