I am trying to develop a algorithm using PDDL
. Below here I am trying to define the domain and the problem files
Domain File:
(define (domain sp)
(:requirements :typing)
(:types location agent item - object
robot human - agent
room - location
fruit cup table - item)
(:predicates
(at ?o - object ?l - location)
(detected ?p - human ?l - room)
(greeted ?r - robot ?p - human)
)
(:action detect
:parameters (?p - human ?i - item ?r - robot ?l - location)
:precondition (at ?r ?l)
:effect (and (at ?p ?l) (at ?r ?l))
)
(:action greet
:parameters (?r - robot ?p - human ?l - location)
:precondition (and (at ?r ?l) (detected ?p ?l))
:effect (greeted ?r ?p)
)
)
Problem File:
(define (problem test12)
(:domain sp)
(:objects person0 - Human
pepper0 - Robot
apple - Fruit
cup0 - Cup
table0 - Table
room0 - Room)
(:init
(at pepper0 room0)
)
(:goal (and
(detected person0 room0)
(greeted pepper0 person0)
)
)
)
What I am trying to achieve is
When I run this code I am going to the following error.
solution-impossbible
ff: parsing domain file
domain 'SP' defined
... done.
ff: parsing problem file
problem 'TEST12' defined
... done.
ff: goal can be simplified to FALSE. No plan will solve it
I followed the syntax correctly but it throws this error. I am not sure how to go about it. Can anyone show me a direction and if possible some debugging resources for PDDL
?
the output per-se is not an error. It simply indicates that there is no plan to your problem. The issue is that (detected ?p ?l)
is never added by any action and is not in your initial state, so you will never be able to achieve it. You probably want to add it as an effect of the detect
action (instead of (at ?r ?l)
?).