我在描述厨房环境(鸡蛋、咖啡、容器、表面等)的域文件中编写了一个 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
为什么类型被明确写入但无法识别?