aibasel / pyperplan

A lightweight STRIPS planner written in Python.
GNU General Public License v3.0
93 stars 41 forks source link

Error unknown predicate and used in precondition of action #26

Open MATTYGILO opened 7 months ago

MATTYGILO commented 7 months ago

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)
        )
    )
roeger commented 7 months ago

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