我是新来的PDDL,我一直在尝试blocksworld问题,但我得到了错误:PDDL错误编译
Failed to parse the problem -- Not args must be a list with only one element, got [Primitive sobre (default_object ?obj, default_object ?obj2), Primitive libre (default_object ?obj3), Primitive en (default_object ?obj, default_object ?from)] /tmp/solver_planning_domains_tmp_4BmsZdP37zJXS/domain.pddl: syntax error in line 16, '(': domain definition expected
我的文件是这些:
(define (domain blocly)
(:predicates (espacio ?e)
(ficha ?t)
(sobre ?t ?t)
(en ?t ?e)
(vacio ?e)
(libre ?t))
(:action movefichaficha
:parameters (?ficha ?ficha2 ?ficha3 ?from ?to)
:precondition (and (ficha ?ficha) (ficha ?ficha2) (ficha ?ficha3) (espacio ?from) (espacio ?to)
(sobre ?ficha ?ficha2) (libre ?ficha) (libre ?ficha3) (en ?ficha ?from) (en ?ficha2 ?from)
(en ?ficha3 ?to))
:effect (and (sobre ?ficha ?ficha3) (en ?ficha ?to) (libre ?ficha2)
(not (sobre ?ficha ?ficha2) (libre ?ficha3) (en ?ficha ?from))))
(:action movefichaesp
:parameters (?ficha ?ficha2 ?from ?to)
:precondition (and (ficha ?ficha) (ficha ?ficha2) (espacio ?from) (espacio ?to)
(sobre ?ficha ?ficha2) (vacio ?to) (en ?ficha ?from) (en ?ficha2 ?from))
:effect (and (libre ?ficha2) (en ?ficha ?to) (arriba ?ficha ?to)
(not (vacio ?to) (en ?ficha ?from) (sobre ?ficha ?ficha2))))
(:action moveoespficha
:parameters (?ficha ?ficha2 ?from ?to)
:precondition (and (ficha ?ficha) (ficha ?ficha2) (espacio ?from) (espacio ?to)
(libre ?ficha) (libre ?ficha2) (en ?ficha ?from) (en ?ficha ?to)())
:effect (and (vacio ?from) (en ?ficha ?to) (sobre ?ficha ?ficha2)
(not (libre ?ficha2) (en ?ficha ?from) (en ?ficha ?from)))))
这些:
(define (problem blockly-world)
(:domain blocly)
(:objects t1 t2 t3 e1 e2 e3)
(:init (ficha t1)
(ficha t2)
(ficha t3)
(espacio e1)
(espacio e2)
(espacio e3)
(sobre t3 t2)
(sobre t2 t1)
(en t1 e1)
(en t2 e1)
(en t3 e1)
(libre t3)
(vacio e2)
(vacio e3))
(:goal (and (sobre t1 t2)
(sobre t2 t3)))
谢谢!我回家后会试试看。对不起新手的错误。我会确保从这里学习:) – Jamidd