Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add planner tests #261

Merged
merged 9 commits into from
Jul 10, 2023
50 changes: 50 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/domain.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; 4 Op-blocks world
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(define (domain blocks-domain)
(:requirements :strips :typing :disjunctive-preconditions)
(:types block)
(:predicates
(ontable ?x - block)
(on ?x ?y - block)
(clear ?x - block)
(emptyhand)
(holding ?x - block)
)

(:action pick-up
:parameters (?x - block)
:precondition (and (clear ?x) (ontable ?x) (emptyhand))
:effect
(and (not (ontable ?x))
(not (clear ?x))
(not (emptyhand))
(holding ?x)))

(:action put-down
:parameters (?x - block)
:precondition (holding ?x)
:effect
(and (not (holding ?x))
(clear ?x)
(emptyhand)
(ontable ?x)))
(:action stack
:parameters (?x ?y - block)
:precondition (and (holding ?x) (clear ?y))
:effect
(and (not (holding ?x))
(not (clear ?y))
(clear ?x)
(emptyhand)
(on ?x ?y)))
(:action unstack
:parameters (?x ?y - block)
:precondition (and (on ?x ?y) (clear ?x) (emptyhand))
:effect
(and (holding ?x)
(clear ?y)
(not (clear ?x))
(not (emptyhand))
(not (on ?x ?y)))))
6 changes: 6 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/p10.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(define (problem bw_10)
(:domain blocks-domain)
(:objects b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 - block)
(:init (emptyhand) (ontable b1) (ontable b2) (ontable b3) (ontable b4) (ontable b5) (ontable b6) (ontable b7) (ontable b8) (ontable b9) (ontable b10) (clear b1) (clear b2) (clear b3) (clear b4) (clear b5) (clear b6) (clear b7) (clear b8) (clear b9) (clear b10))
(:goal (and (emptyhand)))
)
6 changes: 6 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/p2.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(define (problem bw_10)
(:domain blocks-domain)
(:objects b1 b2 - block)
(:init (emptyhand) (ontable b1) (ontable b2) (clear b1) (clear b2))
(:goal (and (emptyhand)))
)
6 changes: 6 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/p3.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(define (problem bw_10)
(:domain blocks-domain)
(:objects b1 b2 b3 - block)
(:init (emptyhand) (ontable b1) (ontable b2) (ontable b3) (clear b1) (clear b2) (clear b3))
(:goal (and (emptyhand)))
)
6 changes: 6 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/p4.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(define (problem bw_10)
(:domain blocks-domain)
(:objects b1 b2 b3 b4 - block)
(:init (emptyhand) (ontable b1) (ontable b2) (ontable b3) (ontable b4) (clear b1) (clear b2) (clear b3) (clear b4))
(:goal (and (emptyhand)))
)
6 changes: 6 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/p5.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(define (problem bw_10)
(:domain blocks-domain)
(:objects b1 b2 b3 b4 b5 - block)
(:init (emptyhand) (ontable b1) (ontable b2) (ontable b3) (ontable b4) (ontable b5) (clear b1) (clear b2) (clear b3) (clear b4) (clear b5))
(:goal (and (emptyhand)))
)
6 changes: 6 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/p6.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(define (problem bw_10)
(:domain blocks-domain)
(:objects b1 b2 b3 b4 b5 b6 - block)
(:init (emptyhand) (ontable b1) (ontable b2) (ontable b3) (ontable b4) (ontable b5) (ontable b6) (clear b1) (clear b2) (clear b3) (clear b4) (clear b5) (clear b6))
(:goal (and (emptyhand)))
)
6 changes: 6 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/p7.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(define (problem bw_10)
(:domain blocks-domain)
(:objects b1 b2 b3 b4 b5 b6 b7 - block)
(:init (emptyhand) (ontable b1) (ontable b2) (ontable b3) (ontable b4) (ontable b5) (ontable b6) (ontable b7) (clear b1) (clear b2) (clear b3) (clear b4) (clear b5) (clear b6) (clear b7))
(:goal (and (emptyhand)))
)
6 changes: 6 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/p8.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(define (problem bw_10)
(:domain blocks-domain)
(:objects b1 b2 b3 b4 b5 b6 b7 b8 - block)
(:init (emptyhand) (ontable b1) (ontable b2) (ontable b3) (ontable b4) (ontable b5) (ontable b6) (ontable b7) (ontable b8) (clear b1) (clear b2) (clear b3) (clear b4) (clear b5) (clear b6) (clear b7) (clear b8))
(:goal (and (emptyhand)))
)
6 changes: 6 additions & 0 deletions tests/benchmarks/deterministic/BF/blocksworld_ppltl/p9.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(define (problem bw_10)
(:domain blocks-domain)
(:objects b1 b2 b3 b4 b5 b6 b7 b8 b9 - block)
(:init (emptyhand) (ontable b1) (ontable b2) (ontable b3) (ontable b4) (ontable b5) (ontable b6) (ontable b7) (ontable b8) (ontable b9) (clear b1) (clear b2) (clear b3) (clear b4) (clear b5) (clear b6) (clear b7) (clear b8) (clear b9))
(:goal (and (emptyhand)))
)
66 changes: 66 additions & 0 deletions tests/benchmarks/deterministic/BF/elevators_ppltl/domain.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
(define (domain miconic)
(:requirements :strips :typing :disjunctive-preconditions)
(:types passenger - object
floor - object
)

(:predicates
(origin ?person - passenger ?floor - floor)
;; entry of ?person is ?floor
;; inertia

(destin ?person - passenger ?floor - floor)
;; exit of ?person is ?floor
;; inertia

(above ?floor1 - floor ?floor2 - floor)
;; ?floor2 is located above of ?floor1

(boarded ?person - passenger)
;; true if ?person has boarded the lift

(not-boarded ?person - passenger)
;; true if ?person has not boarded the lift

(served ?person - passenger)
;; true if ?person has alighted as her destination

(not-served ?person - passenger)
;; true if ?person is not at their destination

(lift-at ?floor - floor)
;; current position of the lift is at ?floor
)


;;stop and allow boarding

(:action board
:parameters (?f - floor ?p - passenger)
:precondition (and (lift-at ?f) (origin ?p ?f))
:effect (boarded ?p))

(:action depart
:parameters (?f - floor ?p - passenger)
:precondition (and (lift-at ?f) (destin ?p ?f)
(boarded ?p))
:effect (and (not (boarded ?p))
(served ?p)))
;;drive up

(:action up
:parameters (?f1 - floor ?f2 - floor)
:precondition (and (lift-at ?f1) (above ?f1 ?f2))
:effect (and (lift-at ?f2) (not (lift-at ?f1))))


;;drive down

(:action down
:parameters (?f1 - floor ?f2 - floor)
:precondition (and (lift-at ?f1) (above ?f2 ?f1))
:effect (and (lift-at ?f2) (not (lift-at ?f1))))
)



Loading