2014-10-15 7 views
0

PDDL에서 도메인 및 테스트 문제를 작성했지만 분명히 그래프 계획 구현에서 계획을 찾을 수 없습니다. 내가했듯이,PDDL Graphplan에서 계획을 찾을 수 없습니다.

move(h1,h2) 
enter(h2,r1) 
pickup(c1,r1) 

을하지만 :

(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)) 
     ) 
) 

을 여기에 문제가있다 : 다음은 도메인입니다해야이 특정 문제에 대한

(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) 
    ) 
    ) 
) 

솔루션에 대한 국가의 세트를 내가 (graphplan)를 사용하고있는 graphplan 구현은 어떤 계획도 찾을 수 없다고 말했다.

+0

당신은 무엇 출력을 얻을 수 있습니까? 처형을 추적하고 진행 상황을 볼 수 있습니까? 처음에 명시 적으로 'not (have c1)'를 정의해야합니까? – vmg

답변

0

strips을 사용하여 솔루션 계획을 찾을 수있었습니다. 그러나 도메인을 약간 조정해야했습니다. 특히 매개 변수 유형 "location"을 "room"으로 바꾸기 위해 도메인 작업 "pickup"및 "drop"을 변경했습니다. 이 변경으로 다음 솔루션을 찾을 수있었습니다 :

1. move h1 h2 
2. enter h2 r1 
3. pickup c1 r1 

아마도 이것은 그래프 플랜이 솔루션을 찾을 수 없었던 이유 일 수 있습니다. 다음은 수정 된 도메인 및 문제 pddl 파일입니다.

domain.pddl

(define (domain aperture) 
    (:requirements :strips :typing :negative-preconditions) 
    (:types 
     cube 
     hallway room - 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 - hallway ?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 - room) 
     :precondition (and (at ?l) (not (has ?c)) (in ?c ?l)) 
     :effect (and (has ?c) (not (in ?c ?l))) 
     ) 
    (:action drop 
     :parameters (?c - cube ?l - room) 
     :precondition (and (at ?l) (has ?c) (not (in ?c ?l))) 
     :effect (and (not (has ?c)) (in ?c ?l)) 
     ) 
) 

problem.pddl

(define (problem pb1) 
    (:domain aperture) 
    (: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) 
    ) 
    ) 
)