I've written a domain and a test problem in PDDL, but apparently the graphplan implementation can't find a plan. Here's the domain:
(define (domain aperture)
(:requirements :strips :typing :negative-preconditions)
(:types
cube
hallway room - location
)
(:predicates
(at ?l - location)
(has ?c - cube)
(connected ?l1 - location ?l2 - location)
(in ?c - cube ?l - location)
)
(:action enter
:parameters (?h - hallway ?r - room)
:precondition (and (connected ?h ?r) (connected ?r ?h) (at ?h)
(not (at ?r)))
:effect (and (at ?r) (not (at ?h)))
)
(:action exit
:parameters (?r - room ?h - hallway)
:precondition (and (connected ?r ?h) (connected ?h ?r) (at ?r)
(not (at ?h)))
:effect (and (at ?h) (not (at ?r)))
)
(:action move
:parameters (?h1 ?h2 - hallway)
:precondition (and (connected ?h1 ?h2) (connected ?h2 ?h1)
(at ?h1) (not (at ?h2)))
:effect (and (at ?h2) (not (at ?h1)))
)
(:action pickup
:parameters (?c - cube ?l - location)
:precondition (and (at ?l) (not (has ?c)) (in ?c ?l))
:effect (and (has ?c) (not (in ?c ?l)))
)
(:action drop
:parameters (?c - cube ?l - location)
:precondition (and (at ?l) (has ?c) (not (in ?c ?l)))
:effect (and (not (has ?c)) (in ?c ?l))
)
)
and here's the problem:
(define (problem pb1)
(:domain aperture)
(:requirements :strips :typing)
(:objects h1 - hallway
h2 - hallway
h3 - hallway
r1 - room
c1 - cube)
(:init (at h1)
(connected h1 h2)
(connected h2 h1)
(connected h2 h3)
(connected h3 h2)
(connected h2 r1)
(connected r1 h2)
(in c1 r1)
)
(:goal (and
(has c1)
)
)
)
For this particular problem the set of states for the solution should be:
move(h1,h2)
enter(h2,r1)
pickup(c1,r1)
but, as I've said, the graphplan implementation that I'm using (graphplan) can't find any plan.