PDDL 规划器无法识别类型

PDDL planner does not recognize types

我在描述厨房环境(鸡蛋、咖啡、容器、表面等)的域文件中编写了一个 pddl 代码,因此类型以分层方式定义。

(define (domain robochef)

(:requirements :adl :strips :fluents :typing)

(:types 
    locatable surface - object
    cookable receptacle - locatable
    food liquid - cookable
    mug pan plate coffeeMachine - receptacle
    egg - food
    coffee water - liquid
    table - surface 
)

(:constants
    ROBOT
)

该域的谓词可能依赖于某些类型:

    (is-at ?y ?x) ;true iff an object ?y is in front of an object ?x
    (is-visible ?x ?r - ROBOT) ;true iff the object visible by the robot
    (is-held ?x ?r - ROBOT) ;true iff the robot holds ?x
    (contains ?y - receptacle ?x) ;true iff ?x is contained in ?y
    (on ?y - surface ?x - locatable) ;true iff ?x is on top of ?y
    (is-cooked ?x - cookable) ;true iff ?x is cooked
    (is-egg-cracked ?e - egg) ;true iff ?x is cracked
    (is-coffeMachine-available ?cm - coffeeMachine) ;true iff the coffee machine is free use
)

运行 solver.planning.domains 此代码的规划器导致格式错误“谓词 [X] 被声明为使用未知或空类型 [Y]”。 更详细 - 输出是:

predicate IS-COFFEMACHINE-AVAILABLE is declared to use unknown or empty type COFFEEMACHINE


predicate IS-EGG-CRACKED is declared to use unknown or empty type EGG


predicate IS-COOKED is declared to use unknown or empty type COOKABLE


predicate ON is declared to use unknown or empty type SURFACE


predicate OCCUPIED is declared to use unknown or empty type RECEPTACLE


predicate CONTAINS is declared to use unknown or empty type RECEPTACLE


predicate IS-HELD is declared to use unknown or empty type ROBOT


predicate IS-VISIBLE is declared to use unknown or empty type ROBOT


Failed to parse the problem -- The types found in the problem file must be a subset of the types listed in the domain file
Domain types: set(['plate', 'coffee', 'coffeemachine', 'liquid', 'food', 'receptacle', 'object', 'locatable', 'surface', 'water', 'mug', 'table', 'cookable', 'egg', 'pan'])
Problem types: set(['default_object'])


predicate IS-COFFEMACHINE-AVAILABLE is declared to use unknown or empty type COFFEEMACHINE


predicate IS-EGG-CRACKED is declared to use unknown or empty type EGG


predicate IS-COOKED is declared to use unknown or empty type COOKABLE


predicate ON is declared to use unknown or empty type SURFACE


predicate OCCUPIED is declared to use unknown or empty type RECEPTACLE


predicate CONTAINS is declared to use unknown or empty type RECEPTACLE


predicate IS-HELD is declared to use unknown or empty type ROBOT


predicate IS-VISIBLE is declared to use unknown or empty type ROBOT

为什么类型明写了却不被识别?

您缺少类型 ROBOT。 相反,您定义了一个名为 ROBOT 且没有类型说明的常量;因此默认为 object.

试试:

(:types 
    locatable surface ROBOT - object
    cookable receptacle - locatable
    food liquid - cookable
    mug pan plate coffeeMachine - receptacle
    egg - food
    coffee water - liquid
    table - surface 
)

(:constants
    self - ROBOT
)

并确保如果 ROBOT 在您的域中的其他地方用于引用常量(而不是类型),则将其替换为 self