ACCELERATING PARTIAL-ORDER PLANNERS: SOME TECHNIQUES FOR EFFECTIVE SEARCH CONTROL AND PRUNING ON-LINE APPENDIX 2 Alfonso Gerevini and Lenhart K. Schubert This file contains the UCPOP formalizations of the planning domains and problems used for the experimentation. Most of the formalizations herein are from the UCPOP test suite and are reproduced with permission from the UCPOP distribution, http://www.cs.washington.edu/research/projects/ai/www/ucpop.html . David Joslin supplied the formalization of the Tile World domain to us. The formalization of ART-#est-#clob is from: Kambhampati, Knoblock & Yang, "Planning as refinement search: a unified framework for evaluating design tradeoff in partial-order planning", Artif. Intell. 76 (1-2). ----------------------------------------------------------------------- T-of-H1 (Towers of Hanoi with 1 operator and 3 disks) [from UCPOP2.0] ----------------------------------------------------------------------- (define (operator move-disk) :parameters ((disk ?disk) ?below-disk ?new-below-disk) :precondition (:and (smaller ?disk ?new-below-disk) ;handles pegs (:neq ?new-below-disk ?below-disk) (:neq ?new-below-disk ?disk) (:neq ?below-disk ?disk) (on ?disk ?below-disk) (clear ?disk) (clear ?new-below-disk)) :effect (:and (clear ?below-disk) (on ?disk ?new-below-disk) (:not (on ?disk ?below-disk)) (:not (clear ?new-below-disk)))) Initial state: ((smaller D1 P1) (smaller D2 P1) (smaller D3 P1) (smaller D1 P2) (smaller D2 P2) (smaller D3 P2) (smaller D1 P3) (smaller D2 P3) (smaller D3 P3) (smaller D1 D2) (smaller D1 D3) (smaller D2 D3) (clear P2) (clear P3) (clear D1) (disk D1) (disk D2) (disk D3) (on D1 D2) (on D2 D3) (on D3 P1)) Goal state: (and (on D1 D2) (on D2 D3) (on D3 P3)) -------------------------------------------------------------------- T-of-H3 (Towers of Hanoi with 3 operators and 3 disks) [by AG&LKS] -------------------------------------------------------------------- (define (operator move-D1) :parameters ((thing ?from) (thing ?to)) :precondition (:and (on D1 ?from) (clear ?to) (:not (on D1 ?to)) (:neq ?to D1)) :effect (:and (on D1 ?to) (:not (clear ?to)) (clear ?from) (:not (on D1 ?from)))) (define (operator move-D2) :parameters ((thing ?from) (thing ?to)) :precondition (:and (on D2 ?from) (clear ?to) (:not (on D2 ?to)) (:not (on D1 D2)) (:not (on D1 ?to)) (:neq ?to D1) (:neq ?to D2)) :effect (:and (on D2 ?to) (:not (clear ?to)) (clear ?from) (:not (on D2 ?from)))) (define (operator move-D3) :parameters ((thing ?from) (thing ?to)) :precondition (:and (on D3 ?from) (clear ?to) (:not (on D3 ?to)) (:not (on D1 D3)) (:not (on D2 D3)) (:not (on D1 ?to)) (:not (on D2 ?to)) (:neq ?to D1) (:neq ?to D2) (:neq ?to D3)) :effect (:and (on D3 ?to) (:not (clear ?to)) (clear ?from) (:not (on D3 ?from)))) Initial state: ( (thing d1)(thing d2)(thing d3)(thing p1)(thing p2)(thing p3) (on d1 d2)(on d2 d3)(on d3 p1)(clear D1)(clear P2)(clear P3) ) Goal state: (and (on d1 d2) (on d2 d3) (on d3 p3)) ----------------------------- Fridge domain [from UCPOP2.0] ----------------------------- (define (operator unscrew) :parameters ((screw ?x) (backplane ?y)) :precondition (:and (screwed ?X) (holds ?x ?y) ) :effect (:not (screwed ?X))) (define (operator screw) :parameters ((screw ?x) (backplane ?y)) :precondition (:and (:not (screwed ?X)) (holds ?x ?y)) :effect (screwed ?X)) (define (operator remove-backplane) :parameters ((backplane ?x) ?f ?a ?b ?c ?d) :precondition (:and (:neq ?a ?b) (:neq ?a ?c) (:neq ?a ?d) (:neq ?b ?c) (:neq ?b ?d) (:neq ?c ?d) (in-place ?x) (part-of ?x ?f) (:not (fridge-on ?f)) (holds ?a ?x) (holds ?b ?x) (holds ?c ?x) (holds ?d ?x) (:not (screwed ?a)) (:not (screwed ?b)) (:not (screwed ?c)) (:not (screwed ?d))) :effect (:not (in-place ?X))) (define (operator attach-backplane) :parameters ((backplane ?x) ?f ?a ?b ?c ?d) :precondition (:and (:neq ?a ?b) (:neq ?a ?c) (:neq ?a ?d) (:neq ?b ?c) (:neq ?b ?d) (:neq ?c ?d) (:not (in-place ?x)) (part-of ?x ?f) (:not (fridge-on ?f)) (holds ?a ?x) (holds ?b ?x) (holds ?c ?x) (holds ?d ?x) (:not (screwed ?a)) (:not (screwed ?b)) (:not (screwed ?c)) (:not (screwed ?d))) :effect (in-place ?X)) (define (operator start-fridge) :parameters (?f ?a ?b ?c ?d ?x) :precondition (:and (:neq ?a ?b) (:neq ?a ?c) (:neq ?a ?d) (:neq ?b ?c) (:neq ?b ?d) (:neq ?c ?d) (backplane ?x) (in-place ?x) (part-of ?x ?f) (holds ?a ?x)(holds ?b ?x)(holds ?c ?x)(holds ?d ?x) (screwed ?a) (screwed ?b) (screwed ?c) (screwed ?d) (:not (fridge-on ?f))) :effect (fridge-on ?f)) (define (operator stop-fridge) :parameters (?f) :precondition (fridge-on ?f) :effect (:not (fridge-on ?f))) (define (operator change-compressor) :parameters (?x ?y ?a) :precondition (:and (:neq ?x ?y) (backplane ?a) (:not (in-place ?a)) (covers ?a ?x) (compressor ?x) (compressor ?y) (attached ?x) (:not (attached ?y))) :effect (:and (:not (attached ?X)) (attached ?y) (:not (covers ?a ?x)) (covers ?a ?y))) Initial state of fixa: ((screw s1) (screw s2) (screw s3) (screw s4) (backplane b1) (compressor c1) (compressor c2) (fridge f1) (covers b1 c1) (part-of b1 f1) (holds s1 b1) (holds s2 b1) (holds s3 b1) (holds s4 b1) (ok c1) (ok c2) (fridge-on f1) (screwed s1) (screwed s2) (screwed s3) (screwed s4) (in-place b1) (attached c1)) Goal state of fixa: (:and (attached c2) (ok c2)) ------------------------------------------------- Flat tire domain (Stuart Russell) [from UCPOP2.0] ------------------------------------------------- (define (operator cuss) :effect (:not (annoyed))) (define (operator open) :parameters ((container ?x)) :precondition (:and (:not (locked ?x)) (:not (open ?x))) :effect (open ?x)) (define (operator close) :parameters ((container ?x)) :precondition (open ?x) :effect (:not (open ?x))) (define (operator fetch) :parameters (?x (container ?y)) :precondition (:and (:neq ?x ?y) (in ?x ?y) (open ?y)) :effect (:and (have ?x) (:not (in ?x ?y)))) (define (operator put-away) :parameters (?x (container ?y)) :precondition (:and (:neq ?x ?y) (have ?x) (open ?y)) :effect (:and (in ?x ?y) (:not (have ?x)))) (define (operator loosen) :parameters ((nut ?x) (hub ?y)) :precondition (:and (:neq ?x ?y) (have wrench) (tight ?x ?y) (on-ground ?y)) :effect (:and (loose ?x ?y) (:not (tight ?x ?y)))) (define (operator tighten) :parameters ((nut ?x) (hub ?y)) :precondition (:and (:neq ?x ?y) (have wrench) (loose ?x ?y) (on-ground ?y)) :effect (:and (tight ?x ?y) (:not (loose ?x ?y)))) (define (operator jack-up) :parameters ((hub ?y)) :precondition (:and (on-ground ?y) (have jack)) :effect (:and (:not (on-ground ?y)) (:not (have jack)))) ;; jacking down wheel x on hub y (dependency would be better) (define (operator jack-down) :parameters ((hub ?x)) :precondition (:not (on-ground ?x)) :effect (:and (on-ground ?x) (have jack))) (define (operator undo) :parameters ((nut ?x) (hub ?y)) :precondition (:and (:neq ?x ?y) (:not (on-ground ?y)) (:not (unfastened ?y)) (have wrench) (loose ?x ?y)) :effect (:and (have ?x) (unfastened ?y) (:not (on ?x ?y)) (:not (loose ?x ?y)))) (define (operator do-up) :parameters ((nut ?x) (hub ?y)) :precondition (:and (:neq ?x ?y) (have wrench) (unfastened ?y) (:not (on-ground ?y)) (have ?x)) :effect (:and (loose ?x ?y) (:not (unfastened ?y)) (:not (have ?x)))) (define (operator remove-wheel) :parameters ((wheel ?x) (hub ?y)) :precondition (:and (:neq ?x ?y) (:not (on-ground ?y)) (on ?x ?y) (unfastened ?y)) :effect (:and (have ?x) (free ?y) (:not (on ?x ?y)))) (define (operator put-on-wheel) :parameters ((wheel ?x) (hub ?y)) :precondition (:and (:neq ?x ?y) (have ?x) (free ?y) (unfastened ?y) (:not (on-ground ?y))) :effect (:and (on ?x ?y) (:not (have ?x)) (:not (free ?y)))) (define (operator inflate) :parameters ((wheel ?x)) :precondition (:and (have pump) (:not (inflated ?x)) (intact ?x)) :effect (inflated ?x)) Initial state of fixit: ((wheel wheel1) (wheel wheel2) (hub hub) (nut nuts) (container boot) (intact wheel2) (in jack boot) (in pump boot) (in wheel2 boot) (in wrench boot) (on wheel1 hub) (on-ground hub) (tight nuts hub)) Goal state of fixit: (:and (:not (open boot)) (in jack boot) (in pump boot) (in wheel1 boot) (in wrench boot) (on wheel2 hub) (tight nuts hub) (inflated wheel2)) Initial state of fix3: ((wheel wheel1) (wheel wheel2) (hub hub) (nut nuts) (container boot) (intact wheel2) (have pump) (have wheel2) (have wrench) (on wheel1 hub) (inflated wheel2) loose nuts hub)) Goal state of fix3: (:and (tight nuts hub) (on-ground hub) (on wheel2 hub)) ------------------------------ Blocks world [from UCPOP2.0] ------------------------------ (define (operator puton) :parameters (?X ?Y ?Z) :precondition (and (on ?X ?Z) (clear ?X) (clear ?Y) (neq ?Y ?Z) (neq ?X ?Z) (neq ?X ?Y) (neq ?X Table)) :effect (and (on ?X ?Y) (not (on ?X ?Z)) (when (neq ?Z Table) (clear ?Z)) (when (neq ?Y Table) (not (clear ?Y))))) Initial state of sussman-anomaly: ((block A) (block B) (block C) (block Table) (on C A) (on A Table) (on B Table) (clear C) (clear B) (clear Table)) Goal state of sussman-anomaly: (and (on B C) (on A B)) Initial state of tower-invert4: ((block A) (block B) (block C) (block D) (block Table) (on a b) (on b c) (on c d) (on d table) (clear a) (clear table)) Goal state of tower-invert4: (:and (on b c) (on c d) (on d a)) ---------------------------- Ferry domain [from UCPOP2.0] ---------------------------- (define (operator board) :parameters ((auto ?x)(place ?y)) :precondition (:and (at ?x ?y)(at-ferry ?y)(empty-ferry)) :effect (:and (on ?x ferry) (:not (at ?x ?y)) (:not (empty-ferry)))) (define (operator sail) :parameters ((place ?x)(place ?y)) :precondition (:and (at-ferry ?x) (:neq ?x ?y)) :effect (:and (at-ferry ?y) (:not (at-ferry ?x)))) (define (operator debark) :parameters ((auto ?x)(place ?y)) :precondition (:and (on ?x ferry)(at-ferry ?y)) :effect (:and (:not (on ?x ferry)) (at ?x ?y) (empty-ferry))) Initial state of test-ferry: ((place a) (place b) (auto c1) (auto c2) (at c1 a)(at c2 a)(at-ferry a) (empty-ferry)) Goal state of test-ferry: (:and (at c1 b)(at c2 b)) ---------------------------- Strips world [from UCPOP2.0] ---------------------------- (define (fact (loc-in-room ?x ?y ?room)) (labels ((convert-loc-to-room (x y) (cond ((and (<= y 5) (>= y 1)) (cond ((and (<= x 4) (>= x 3)) 'rpdp) ((and (<= x 9) (>= x 5)) 'rclk) ((and (<= x 12) (>= x 10)) 'rril) (t (error "Invalid x room coordinate")))) ((and (<= y 10) (>= y 6)) (cond ((and (<= x 2) (>= x 1)) 'runi) ((and (<= x 6) (>= x 3)) 'rmys) ((and (<= x 9) (>= x 7)) 'rram) ((and (<= x 12) (>= x 10)) 'rhal) (t (error "Invalid x room coordinate")))) (t (error "Invalid y room coordinate"))))) (cond ((or (variable? ?x) (variable? ?y)) :no-match-attempted) ((variable? ?room) `(((,?room ,(convert-loc-to-room ?x ?y))))) ((atom ?room) (when (eq ?room (convert-loc-to-room ?x ?y)) '(nil))) (t (error "Room is not a variable or an atom"))))) (define (operator GOTO-BOX) :parameters (?box ?room) :precondition (:and (is-type ?box object) (in-room ?box ?room) (in-room robot ?room)) :effect (:and (:forall (?one ?two) (:when (at robot ?one ?two) (:not (at robot ?one ?two)))) (:forall (?one) (:when (:and (:neq ?one ?box) (next-to robot ?one)) (:not (next-to robot ?one)))) (next-to robot ?box))) (define (operator GOTO-DOOR) :parameters (?door ?roomx ?roomy) :precondition (:and (is-type ?door door) (connects ?door ?roomx ?roomy) (in-room robot ?roomx)) :effect (:and (:forall (?one ?two) (:when (at robot ?one ?two) (:not (at robot ?one ?two)))) (:forall (?one) (:when (:and (:neq ?one ?door) (next-to robot ?one)) (:not (next-to robot ?one)))) (next-to robot ?door))) (define (operator GOTO-LOC) :parameters (?x ?y ?roomx) :precondition (:and (loc-in-room ?x ?y ?roomx) (in-room robot ?roomx)) :effect (:and (:forall (?one ?two) (:when (at robot ?one ?two) (:not (at robot ?one ?two)))) (:forall (?one) (:when (next-to robot ?one) (:not (next-to robot ?one)))) (at robot ?x ?y))) (define (operator PUSH-BOX) :parameters (?boxx ?boxy ?roomx) :precondition (:and (is-type ?boxy object) (pushable ?boxx) (in-room ?boxx ?roomx) (in-room ?boxy ?roomx) (in-room robot ?roomx) (next-to robot ?boxx)) :effect (:and (:forall (?one ?two) (:and (:when (at robot ?one ?two) (:not (at robot ?one ?two))) (:when (at ?boxx ?one ?two) (:not (at ?boxx ?one ?two))))) (:forall (?one) (:and (:when (:and (:neq ?one ?boxx) (next-to robot ?one)) (:not (next-to robot ?one))) (:when (:and (:neq ?one ?boxy) (next-to ?boxx ?one)) (:not (next-to ?boxx ?one))) (:when (:and (:neq ?one robot) (:neq ?one ?boxy) (next-to ?one ?boxx)) (:not (next-to ?one ?boxx))))) (next-to ?boxy ?boxx) (next-to ?boxx ?boxy) (next-to robot ?boxx))) (define (operator PUSH-TO-DOOR) :parameters (?box ?door ?roomx ?roomy) :precondition (:and (connects ?door ?roomx ?roomy) (pushable ?box) (is-type ?door door) (in-room robot ?roomx) (in-room ?box ?roomx) (next-to robot ?box)) :effect (:and (:forall (?one ?two) (:and (:when (at robot ?one ?two) (:not (at robot ?one ?two))) (:when (at ?box ?one ?two) (:not (at ?box ?one ?two))))) (:forall (?one) (:and (:when (:and (:neq ?one ?box) (next-to robot ?one)) (:not (next-to robot ?one))) (:when (:and (:neq ?one ?door) (next-to ?box ?one)) (:not (next-to ?box ?one))) (:when (:and (:neq ?one robot) (next-to ?one ?box)) (:not (next-to ?one ?box))))) (next-to ?box ?door) (next-to robot ?box))) (define (operator PUSH-TO-LOC) :parameters (?box ?x ?y ?roomx) :precondition (:and (pushable ?box) (loc-in-room ?x ?y ?roomx) (in-room robot ?roomx) (in-room ?box ?roomx) (next-to robot ?box)) :effect (:and (:forall (?one ?two) (:and (:when (at robot ?one ?two) (:not (at robot ?one ?two))) (:when (:and (:neq ?x ?one) (:neq ?y ?two) (at ?box ?one ?two)) (:not (at ?box ?one ?two))))) (:forall (?one) (:and (:when (:and (:neq ?one ?box) (next-to robot ?one)) (:not (next-to robot ?one))) (:when (next-to ?box ?one) (:not (next-to ?box ?one))) (:when (:and (:neq ?one robot) (next-to ?one ?box)) (:not (next-to ?one ?box))))) (at ?box ?x ?y) (next-to robot ?box))) (define (operator GO-THRU-DOOR) :parameters (?door ?roomy ?roomx) :precondition (:and (connects ?door ?roomx ?roomy) (is-type ?door door) (is-type ?roomx room) (in-room robot ?roomy) (statis ?door open) (next-to robot ?door)) :effect (:and (:forall (?one ?two) (:when (at robot ?one ?two) (:not (at robot ?one ?two)))) (:forall (?one) (:when (next-to robot ?one) (:not (next-to robot ?one)))) (:when (in-room robot ?roomy) (:not (in-room robot ?roomy))) (in-room robot ?roomx))) (define (operator PUSH-THRU-DOOR) :parameters (?box ?door ?roomy ?roomx) :precondition (:and (connects ?door ?roomy ?roomx) (pushable ?box) (is-type ?door door) (is-type ?roomx room) (in-room robot ?roomy) (in-room ?box ?roomy) (statis ?door open) (next-to ?box ?door) (next-to robot ?box)) :effect (:and (:forall (?one ?two) (:and (:when (at robot ?one ?two) (:not (at robot ?one ?two))) (:when (at ?box ?one ?two) (:not (at ?box ?one ?two))))) (:forall (?one) (:and (:when (:and (:neq ?one ?box) (next-to robot ?one)) (:not (next-to robot ?one))) (:when (next-to ?box ?one) (:not (next-to ?box ?one))) (:when (:and (:neq ?one robot) (next-to ?one ?box)) (:not (next-to ?one ?box))))) (:when (in-room robot ?roomy) (:not (in-room robot ?roomy))) (:when (in-room ?box ?roomy) (:not (in-room ?box ?roomy))) (in-room robot ?roomx) (in-room ?box ?roomx) (next-to robot ?box))) (define (operator OPEN-DOOR) :parameters (?door) :precondition (:and (is-type ?door door) (next-to robot ?door) (statis ?door closed)) :effect (:and (:when (statis ?door closed) (:not (statis ?door closed))) (statis ?door open))) (define (operator CLOSE-DOOR) :parameters (?door) :precondition (:and (is-type ?door door) (next-to robot ?door) (statis ?door open)) :effect (:and (:when (statis ?door open) (:not (statis ?door open))) (statis ?door closed))) Initial state of move-boxes: ((connects dunimys runi rmys) (connects dmysram rmys rram) (connects dramhal rram rhal) (connects dmyspdp rmys rpdp) (connects dpdpclk rpdp rclk) (connects dmysclk rmys rclk) (connects dramclk rram rclk) (connects dclkril rclk rril) (connects dunimys rmys runi) (connects dmysram rram rmys) (connects dramhal rhal rram) (connects dmyspdp rpdp rmys) (connects dpdpclk rclk rpdp) (connects dmysclk rclk rmys) (connects dramclk rclk rram) (connects dclkril rril rclk) (statis dunimys open) (statis dmysram open) (statis dramhal open) (statis dmyspdp open) (statis dpdpclk open) (statis dmysclk open) (statis dramclk open) (statis dclkril closed) (is-type dunimys door) (is-type dmysram door) (is-type dramhal door) (is-type dmyspdp door) (is-type dpdpclk door) (is-type dmysclk door) (is-type dramclk door) (is-type dclkril door) (is-type runi room) (is-type rmys room) (is-type rram room) (is-type rhal room) (is-type rpdp room) (is-type rclk room) (is-type rril room) (is-type box1 object) (is-type box2 object) (is-type box3 object) (in-room robot rril) (in-room box1 rpdp) (in-room box2 rpdp) (in-room box3 rclk) (pushable box1) (pushable box2) (pushable box3) ) Goal state of move-boxes: (:and (next-to box1 box2)(next-to box2 box3)) Initial state of move-boxes-1: ((connects dunimys runi rmys) (connects dmysram rmys rram) (connects dramhal rram rhal) (connects dmyspdp rmys rpdp) (connects dpdpclk rpdp rclk) (connects dmysclk rmys rclk) (connects dramclk rram rclk) (connects dclkril rclk rril) (connects dunimys rmys runi) (connects dmysram rram rmys) (connects dramhal rhal rram) (connects dmyspdp rpdp rmys) (connects dpdpclk rclk rpdp) (connects dmysclk rclk rmys) (connects dramclk rclk rram) (connects dclkril rril rclk) (statis dunimys open) (statis dmysram open) (statis dramhal open) (statis dmyspdp open) (statis dpdpclk open) (statis dmysclk open) (statis dramclk open) (statis dclkril closed) (is-type dunimys door) (is-type dmysram door) (is-type dramhal door) (is-type dmyspdp door) (is-type dpdpclk door) (is-type dmysclk door) (is-type dramclk door) (is-type dclkril door) (is-type runi room) (is-type rmys room) (is-type rram room) (is-type rhal room) (is-type rpdp room) (is-type rclk room) (is-type rril room) (is-type box1 object) (is-type box2 object) (is-type box3 object) (in-room robot rril) (in-room box1 rpdp) (in-room box2 rpdp) (in-room box3 rclk) (pushable box1) (pushable box2) pushable box3)) Goal state of move-boxes-1: (:and (next-to box1 box2)(in-room box2 rclk)) Initial state of move-boxes-2: [by AG&LKS] ((connects dunimys runi rmys) (connects dmysram rmys rram) (connects dramhal rram rhal) (connects dmyspdp rmys rpdp) (connects dpdpclk rpdp rclk) (connects dmysclk rmys rclk) (connects dramclk rram rclk) (connects dclkril rclk rril) (connects dunimys rmys runi) (connects dmysram rram rmys) (connects dramhal rhal rram) (connects dmyspdp rpdp rmys) (connects dpdpclk rclk rpdp) (connects dmysclk rclk rmys) (connects dramclk rclk rram) (connects dclkril rril rclk) (statis dunimys open) (statis dmysram open) (statis dramhal open) (statis dmyspdp open) (statis dpdpclk open) (statis dmysclk open) (statis dramclk open) (statis dclkril closed) (is-type dunimys door) (is-type dmysram door) (is-type dramhal door) (is-type dmyspdp door) (is-type dpdpclk door) (is-type dmysclk door) (is-type dramclk door) (is-type dclkril door) (is-type runi room) (is-type rmys room) (is-type rram room) (is-type rhal room) (is-type rpdp room) (is-type rclk room) (is-type rril room) (is-type box1 object) (is-type box2 object) (is-type box3 object) (in-room robot rril) (in-room box1 rpdp) (in-room box2 rpdp) (in-room box3 rclk) (pushable box1) (pushable box2) (pushable box3)) Goal state of move-boxes-2: [by AG&LKS] (in-room box2 rclk) Initial state of move-boxes-a: [by AG&LKS] ((connects dunimys runi rmys) (connects dmysram rmys rram) (connects dramhal rram rhal) (connects dmyspdp rmys rpdp) (connects dpdpclk rpdp rclk) (connects dmysclk rmys rclk) (connects dramclk rram rclk) (connects dclkril rclk rril) (connects dunimys rmys runi) (connects dmysram rram rmys) (connects dramhal rhal rram) (connects dmyspdp rpdp rmys) (connects dpdpclk rclk rpdp) (connects dmysclk rclk rmys) (connects dramclk rclk rram) (connects dclkril rril rclk) (statis dunimys open) (statis dmysram open) (statis dramhal open) (statis dmyspdp open) (statis dpdpclk open) (statis dmysclk open) (statis dramclk open) (statis dclkril closed) (is-type dunimys door) (is-type dmysram door) (is-type dramhal door) (is-type dmyspdp door) (is-type dpdpclk door) (is-type dmysclk door) (is-type dramclk door) (is-type dclkril door) (is-type runi room) (is-type rmys room) (is-type rram room) (is-type rhal room) (is-type rpdp room) (is-type rclk room) (is-type rril room) (is-type box1 object) (is-type box2 object) (in-room robot rril) (in-room box1 rpdp) (in-room box2 rpdp) (pushable box1) (pushable box2)) Goal state of move-boxes-a: [by AG&LKS] (in-room box2 rclk) ----------------------------- Molgen domain [from UCPOP2.0] ----------------------------- (define (operator reverse-transcribe) :parameters (?x) :precondition (mRNA ?x) :effect (connected-cDNA-mRNA ?x)) (define (operator separate) :parameters (?x) :precondition (connected-cDNA-mRNA ?x) :effect (:and (single-strand ?x) (:not (connected-cDNA-mRNA ?x)))) (define (operator polymerize) :parameters (?x) :precondition (single-strand ?x) :effect (:and (hair-pin ?x) (:not (single-strand ?x)))) (define (operator digest) :parameters (?x) :precondition (hair-pin ?x) :effect (:and (double-strand ?x) (:not (hair-pin ?x)))) ;; steps for splicing DNA molecules (define (operator ligate) :parameters (?x ?y) :precondition (:neq ?x ?y) :effect (:and (:when (:and (double-strand ?y) (:eq ?x LINKER)) (cleavable ?y)) (:when (:and (cleaved ?x) (cleaved ?y) (:neq ?x LINKER)) (:and (contains ?x ?y) (cleavable ?y) (:not (cleaved ?x)) (:not (cleaved ?y)))))) (define (operator cleave) :parameters (?x) :precondition (cleavable ?x) :effect (:and (cleaved ?x) (:not (cleavable ?x)))) ;; Step for inserting a molecule into an organism (define (operator transform) :parameters (?x (bacterium ?y)) :precondition (:and (:neq ?x ?y) (cleavable ?x) ; molecule must be whole (accepts ?x ?y)) ; Is molecule accepted? :effect (:and (contains ?x ?y) (:not (cleavable ?x)))) ;; purify a culture with an antibiotic (define (operator screen) :parameters ((bacterium ?x) ?y (antibiotic ?z)) :precondition (:and (:neq ?x ?y) (:neq ?y ?z) (:neq ?x ?z) (resists ?z ?y)(contains ?y ?x)) :effect (pure ?x)) Initial state of rat-insulin: ((molecule insulin-gene) (molecule e-coli-exosome) (molecule junk-exosome) (molecule linker) (bacterium e-coli) (bacterium junk) (antibiotic antibiotic-1) (mRNA insulin-gene) (cleavable e-coli-exosome) (cleavable junk-exosome) (accepts junk-exosome junk) (accepts e-coli-exosome e-coli) (resists antibiotic-1 e-coli-exosome)) Goal state of rat-insulin: (:exists (bacterium ?y) (:exists (molecule ?x) (:and (contains insulin-gene ?x) (contains ?x ?y) (pure ?y)))) ----------------------------- Monkey domain [from UCPOP2.0] ----------------------------- (define (operator GO-TO) :parameters (?x ?y) :precondition (:and (:neq ?y ?x) (on-floor) (at monkey ?y)) :effect (:and (at monkey ?x) (:not (at monkey ?y)))) (define (operator CLIMB) :parameters (?x) :precondition (:and (at box ?x) (at monkey ?x)) :effect (:and (onbox ?x) (:not (on-floor)))) (define (operator PUSH-BOX) :parameters (?x ?y) :precondition (:and (:neq ?y ?x) (at box ?y) (at monkey ?y) (on-floor)) :effect (:and (at monkey ?x) (:not (at monkey ?y)) (at box ?x) (:not (at box ?y)))) ;; getting bananas (define (operator GET-KNIFE) :parameters (?y) :precondition (:and (at knife ?y) (at monkey ?y)) :effect (:and (hasknife) (:not (at knife ?y)))) (define (operator GRAB-BANANAS) :parameters (?y) :precondition (:and (hasknife) (at bananas ?y) (onbox ?y)) :effect (hasbananas)) ;; getting water (define (operator PICKGLASS) :parameters (?y) :precondition (:and (at glass ?y) (at monkey ?y)) :effect (:and (hasglass) (:not (at glass ?y)))) (define (operator GETWATER) :parameters (?y) :precondition (:and (hasglass) (at waterfountain ?y) (at monkey ?y) (onbox ?y)) :effect (haswater)) Initial state of monkey-test1: ((location p1)(location p2)(location p3)(location p4) (at monkey p1)(on-floor)(at box p2)(at bananas p3) (at knife p4)) Goal state of moneky-test1: (hasbananas) Initial state of monkey-test2: ((location p1) (location p2)(location p3)(location p4)(location p6) (at monkey p1)(on-floor)(at box p2)(at bananas p3)(at knife p4) (at waterfountain p3)(at glass p6)) Goal state of moneky-test1: (:and (hasbananas) (haswater)) ----------------------------- Office domain [from UCPOP2.0] ----------------------------- (define (operator move) :parameters (?b ?l ?m) :precondition (:and (briefcase ?b) (:neq ?m ?l) (at ?b ?l)) :effect (:and (at ?b ?m) (:not (at ?B ?l)) (:forall (?x) (:when (:and (object ?x) (in ?x ?b)) (:and (at ?x ?m) (:not (at ?x ?l))))))) (define (operator take-out) :parameters (?x ?b) :precondition (in ?x ?b) :effect (:not (in ?x ?b))) (define (operator put-in) :parameters (?x ?b ?l) :precondition (:and (:neq ?x ?B) (at ?x ?l) (at ?B ?l) (briefcase ?b)) :effect (in ?x ?b)) (define (operator print-check-for) :parameters (?p ?c) :precondition (:and (person ?p) (new-object ?c)) :effect (:and (object ?c) (check ?c) (at ?c office) (written-for ?p ?c))) (define (fact (new-object ?x)) (when (variable:variable? ?x) (list (setb ?x (gensym "obj-"))))) Initial state of Office5: ((place home) (place office) (person sam) (person sue) (object dict) (object b) (briefcase b) (at B home) (at Dict home)) Goal state of Office5: (:and (:forall (object ?x) (at ?x home)) (:forall (person ?p) (:exists (object ?c) (:and (check ?c) (written-for ?p ?c))))) Initial state of Office6: [by AG&LKS] ((place home) (place office) (person sam) (person sue) (person alan) (person smith) (object dict) (object b) (briefcase b) (at B home) (at Dict home)) Goal state of Office6: [by AG&LKS] (:and (:forall (object ?x) (at ?x home)) (:forall (person ?p) (:exists (object ?c) (:and (check ?c) (written-for ?p ?c))))) ------------------------------------------------------------------ ART-#est-#clob [from Kambhampati, Knoblock, & Yang's AIJ95-paper] ------------------------------------------------------------------ The square brackets (not part of the syntax) indicate parts to be included only for $i < n_{+}$ ($\#_{est}$); the braces (not part of the syntax) indicate parts to be included only for $0 < i < n_{-}$ ($\#_{clob}$). Replace i by 0, ..., 9 in the following two operators: (define (operator Ai1) (define (operator Ai2) :parameters () :parameters () :precondition ((Ii)) :precondition ((Pi)) :effect (:and (Pi) [(Ii+1)] :effect (:and (Gi) [(Pi+1)] {(:not (Ii-1))})) {(:not (Pi-1))})) Initial state: ((I0) (I1) (I2) (I3) (I4) (I5) (I6) (I7) (I8) (I9)) Goal state: (and (G0) (G1) (G2) (G3) (G4) (G5) (G6) (G7) (G8) (G9)) ------------------------------------------------------------------ Trains and T-trains (loosely based on TRAINS-93 world) [by AG&LKS] ------------------------------------------------------------------ (define (operator mv-engine) :parameters (?eng ?cityone ?citytwo ?track ?car) ; ?car is a "hidden" parameter :precondition (:and (engine ?eng) (at ?eng ?cityone) (connects ?track ?cityone ?citytwo)) :effect (:and (at ?eng ?citytwo) (:not (at ?eng ?cityone)) (when (coupled ?eng ?car) (:and (at ?car ?citytwo) (:not (at ?car ?cityone)) )))) (define (operator ld-oranges) :parameters (?ors ?car ?city) :precondition (:and (oranges ?ors) (boxcar ?car) (empty ?car) (at ?ors ?city) (at ?car ?city) ) :effect (:and (:not (empty ?car)) (in ?ors ?car) (:not (at ?ors ?city))) ) (define (operator ld-bananas) :parameters (?bas ?car ?city) :precondition (:and (bananas ?bas) (boxcar ?car) (empty ?car) (at ?bas ?city) (at ?car ?city) ) :effect (:and (:not (empty ?car)) (in ?bas ?car) (:not (at ?bas ?city))) ) (define (operator ld-oj) :parameters (?oj ?car ?city) :precondition (:and (oj ?oj) (tanker-car ?car) (empty ?car) (at ?oj ?city) (at ?car ?city) ) :effect (:and (:not (empty ?car)) (in ?oj ?car) (:not (at ?oj ?city))) ) (define (operator make-oj) :parameters (?o ?fac ?city) :precondition (:and (oranges ?o) (oj-fac ?fac) (at ?o ?city) (at ?fac ?city) ) :effect (:and (oj ?o) (:not (oranges ?o))) ) (define (operator unload) :parameters (?comm ?car ?city) :precondition (:and (in ?comm ?car) (at ?car ?city)) :effect (:and (:not (in ?comm ?car)) (empty ?car) (at ?comm ?city)) ) (define (operator couple) :parameters (?eng ?car ?city) :precondition (:and (engine ?eng) (car ?car) (loose ?car) (at ?eng ?city) (at ?car ?city) ) :effect (:and (coupled ?eng ?car) (:not (loose ?car))) ) (define (operator uncouple) :parameters (?eng ?car) :precondition (coupled ?eng ?car) :effect (:and (loose ?car) (:not (coupled ?eng ?car))) ) ;; NOTE: ;; the initial state of Trains3 (T-Trains3) is the same as that of ;; Trains1 (T-Trains1) except that oj-fac1 and e3 are at Corning instead ;; of Elmira. The initial state of Trains2 is the same as that of Trains3 ;; except that the connections from Corning to Bath and from Dansville to ;; Corning are disabled (say, for maintenance). Initial state of Trains1: ((city avon) (city bath) (city corning) (city dansville) (city elmira) (track tr1) (track tr2) (track tr3) (track tr4) (track tr5) (connects tr1 avon bath) (connects tr1 bath avon) (connects tr2 bath corning) (connects tr2 corning bath) (connects tr3 avon dansville) (connects tr3 dansville avon) (connects tr4 dansville corning) (connects tr4 corning dansville) (connects tr5 corning elmira) (connects tr5 elmira corning) (engine e1) (engine e2) (engine e3) (car bc1) (car bc2) (car bc3) (car bc4) (car tc1) (boxcar bc1) (boxcar bc2) (boxcar bc3) (boxcar bc4) (tanker-car tc1) (oranges ors1) (bananas bas1) (oj-fac oj-fac1) (empty bc1) (empty bc2) (empty bc3) (empty bc4) (empty tc1) (loose bc1) (loose bc2) (loose bc3) (loose bc4) (loose tc1) (at e1 avon) (at bas1 avon) (at bc1 bath) (at bc2 bath) (at bc3 dansville) (at tc1 corning) (at ors1 corning) (at e2 elmira) (at e3 elmira) (at bc4 elmira) (at oj-fac1 elmira) ) Goal state of Trains1: (:exists (oranges ?x) (at ?x bath)) Initial state of Trains2: ((city avon) (city bath) (city corning) (city dansville) (city elmira) (track tr1) (track tr2) (track tr3) (track tr4) (track tr5) (connects tr1 avon bath) (connects tr1 bath avon) (connects tr2 bath corning) (connects tr4 corning dansville) (connects tr3 avon dansville) (connects tr3 dansville avon) (connects tr5 corning elmira) (connects tr5 elmira corning) (engine e1) (engine e2) (engine e3) (car bc1) (car bc2) (car bc3) (car bc4) (car tc1) (boxcar bc1) (boxcar bc2) (boxcar bc3) (boxcar bc4) (tanker-car tc1) (oranges ors1) (bananas bas1) (oj-fac oj-fac1) (empty bc1) (empty bc2) (empty bc3) (empty bc4) (empty tc1) (loose bc1) (loose bc2) (loose bc3) (loose bc4) (loose tc1) (at e1 avon) (at bas1 avon) (at bc1 bath) (at bc2 bath) (at bc3 dansville) (at tc1 corning) (at ors1 elmira) (at e2 elmira) (at e3 corning) (at bc4 elmira) (at oj-fac1 corning) ) Goal state of Trains2: (:exists (oj ?x) (at ?x dansville)) Initial state of Trains3: ((city avon) (city bath) (city corning) (city dansville) (city elmira) (track tr1) (track tr2) (track tr3) (track tr4) (track tr5) (connects tr1 avon bath) (connects tr1 bath avon) (connects tr2 bath corning) (connects tr2 corning bath) (connects tr3 avon dansville) (connects tr3 dansville avon) (connects tr4 dansville corning) (connects tr4 corning dansville) (connects tr5 corning elmira) (connects tr5 elmira corning) (engine e1) (engine e2) (engine e3) (car bc1) (car bc2) (car bc3) (car bc4) (car tc1) (boxcar bc1) (boxcar bc2) (boxcar bc3) (boxcar bc4) (tanker-car tc1) (oranges ors1) (bananas bas1) (oj-fac oj-fac1) (empty bc1) (empty bc2) (empty bc3) (empty bc4) (empty tc1) (loose bc1) (loose bc2) (loose bc3) (loose bc4) (loose tc1) (at e1 avon) (at bas1 avon) (at bc1 bath) (at bc2 bath) (at bc3 dansville) (at tc1 corning) (at ors1 elmira) (at e2 elmira) (at e3 corning) (at bc4 elmira) (at oj-fac1 corning) ) Goal state of Trains3 (:exists (oj ?x) (at ?x dansville)) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; T-Trains ("Typed" version of Trains) (define (operator mv-engine) :parameters (?eng ?cityone ?citytwo ?track ?car) ; ?car is a "hidden" parameter :precondition (:and (engine ?eng) (at ?eng ?cityone) (city ?cityone) (city ?citytwo) (track ?track) (connects ?track ?cityone ?citytwo)) :effect (:and (at ?eng ?citytwo) (:not (at ?eng ?cityone)) (when (:and (car ?car) (coupled ?eng ?car)) (:and (at ?car ?citytwo) (:not (at ?car ?cityone)) )))) (define (operator ld-oranges) :parameters (?ors ?car ?city) :precondition (:and (oranges ?ors) (boxcar ?car) (empty ?car) (city ?city) (at ?ors ?city) (at ?car ?city) ) :effect (:and (:not (empty ?car)) (in ?ors ?car) (:not (at ?ors ?city))) ) (define (operator ld-bananas) :parameters (?bas ?car ?city) :precondition (:and (bananas ?bas) (boxcar ?car) (empty ?car) (city ?city) (at ?bas ?city) (at ?car ?city) ) :effect (:and (:not (empty ?car)) (in ?bas ?car) (:not (at ?bas ?city))) ) (define (operator ld-oj) :parameters (?oj ?car ?city) :precondition (:and (oj ?oj) (tanker-car ?car) (empty ?car) (city ?city) (at ?oj ?city) (at ?car ?city) ) :effect (:and (:not (empty ?car)) (in ?oj ?car) (:not (at ?oj ?city))) ) (define (operator make-oj) :parameters (?o ?fac ?city) :precondition (:and (oranges ?o) (oj-fac ?fac) (city ?city) (at ?o ?city) (at ?fac ?city) ) :effect (:and (oj ?o) (:not (oranges ?o))) ) (define (operator unload) :parameters (?comm ?car ?city) :precondition (:and (comm ?comm) (car ?car) (city ?city) (in ?comm ?car) (at ?car ?city)) :effect (:and (:not (in ?comm ?car)) (empty ?car) (at ?comm ?city)) ) (define (operator couple) :parameters (?eng ?car ?city) :precondition (:and (engine ?eng) (car ?car) (loose ?car) (city ?city) (at ?eng ?city) (at ?car ?city) ) :effect (:and (coupled ?eng ?car) (:not (loose ?car))) ) (define (operator uncouple) :parameters (?eng ?car) :precondition (:and (engine ?eng) (car ?car) (coupled ?eng ?car)) :effect (:and (loose ?car) (:not (coupled ?eng ?car))) ) Initial state of T-Trains1: ((city avon) (city bath) (city corning) (city dansville) (city elmira) (track tr1) (track tr2) (track tr3) (track tr4) (track tr5) (connects tr1 avon bath) (connects tr1 bath avon) (connects tr2 bath corning) (connects tr2 corning bath) (connects tr3 avon dansville) (connects tr3 dansville avon) (connects tr4 dansville corning) (connects tr4 corning dansville) (connects tr5 corning elmira) (connects tr5 elmira corning) (engine e1) (engine e2) (engine e3) (car bc1) (car bc2) (car bc3) (car bc4) (car tc1) (boxcar bc1) (boxcar bc2) (boxcar bc3) (boxcar bc4) (tanker-car tc1) (oranges ors1) (bananas bas1) (oj-fac oj-fac1) (comm ors1) (comm bas1) (empty bc1) (empty bc2) (empty bc3) (empty bc4) (empty tc1) (loose bc1) (loose bc2) (loose bc3) (loose bc4) (loose tc1) (at e1 avon) (at bas1 avon) (at bc1 bath) (at bc2 bath) (at bc3 dansville) (at tc1 corning) (at ors1 corning) (at e2 elmira) (at e3 elmira) (at bc4 elmira) (at oj-fac1 elmira) ) Goal state of T-trains1: (:exists (oranges ?x) (at ?x bath)) Initial state of T-Trains2: ((city avon) (city bath) (city corning) (city dansville) (city elmira) (track tr1) (track tr2) (track tr3) (track tr4) (track tr5) (connects tr1 avon bath) (connects tr1 bath avon) (connects tr2 bath corning) (connects tr4 corning dansville) (connects tr3 avon dansville) (connects tr3 dansville avon) (connects tr5 corning elmira) (connects tr5 elmira corning) (engine e1) (engine e2) (engine e3) (car bc1) (car bc2) (car bc3) (car bc4) (car tc1) (boxcar bc1) (boxcar bc2) (boxcar bc3) (boxcar bc4) (tanker-car tc1) (oranges ors1) (bananas bas1) (oj-fac oj-fac1) (comm ors1) (comm bas1) (empty bc1) (empty bc2) (empty bc3) (empty bc4) (empty tc1) (loose bc1) (loose bc2) (loose bc3) (loose bc4) (loose tc1) (at e1 avon) (at bas1 avon) (at bc1 bath) (at bc2 bath) (at bc3 dansville) (at tc1 corning) (at ors1 elmira) (at e2 elmira) (at e3 corning) (at bc4 elmira) (at oj-fac1 corning) ) Goal state of T-Trains2: (:exists (oj ?x) (at ?x dansville)) Initial state of T-Trains3: ((city avon) (city bath) (city corning) (city dansville) (city elmira) (track tr1) (track tr2) (track tr3) (track tr4) (track tr5) (connects tr1 avon bath) (connects tr1 bath avon) (connects tr2 bath corning) (connects tr2 corning bath) (connects tr3 avon dansville) (connects tr3 dansville avon) (connects tr4 dansville corning) (connects tr4 corning dansville) (connects tr5 corning elmira) (connects tr5 elmira corning) (engine e1) (engine e2) (engine e3) (car bc1) (car bc2) (car bc3) (car bc4) (car tc1) (boxcar bc1) (boxcar bc2) (boxcar bc3) (boxcar bc4) (tanker-car tc1) (oranges ors1) (bananas bas1) (oj-fac oj-fac1) (comm ors1) (comm bas1) (empty bc1) (empty bc2) (empty bc3) (empty bc4) (empty tc1) (loose bc1) (loose bc2) (loose bc3) (loose bc4) (loose tc1) (at e1 avon) (at bas1 avon) (at bc1 bath) (at bc2 bath) (at bc3 dansville) (at tc1 corning) (at ors1 elmira) (at e2 elmira) (at e3 corning) (at bc4 elmira) (at oj-fac1 corning) ) Goal state of T-Trains3: (:exists (oj ?x) (at ?x dansville)) ---------------------------------------------------- Tile-world domain [by David Joslin & Martha Pollack] ---------------------------------------------------- (defvar *tw-carry-max* 4) ;; ?y is (+ ?x 1), but only within [0,*tw-carry-max*] (define (fact (add-one ?x ?y)) (let ((ret (cond ((and (variable? ?x) (variable? ?y)) :no-match-attempted) ((and (not (variable? ?x)) (not (variable? ?y))) (if (eq ?y (+ ?x 1)) '(nil) ;; already satisfied nil)) ;; impossible ((variable? ?x) (if (<= ?y 0) nil ;; x would be negative (list (setb ?x (- ?y 1))))) ;;`(((,?x ,(- ?y 1)))) ((variable? ?y) (if (>= ?x *tw-carry-max*) nil ;; y would be over the limit (list (setb ?y (+ ?x 1))))) ;;`(((,?y ,(+ ?x 1)))) (t (break "cannot happen"))))) ;;(format t "add-one ~a ~a returning ~a~%" ?x ?y ret) ret )) ;; when a tile is dropped into a hole, both disappear (define (operator drop-tile-in-hole) :parameters (?hole ?row ?col ?tile ?old-count ?new-count) :precondition (:and (hole-info ?hole ?row ?col ?tile) (agent-loc ?row ?col) (carrying ?tile) (add-one ?new-count ?old-count) ;; subtract (carry-count ?old-count)) :effects ((:effect (:and (filled-hole ?hole) (:not (hole-info ?hole ?row ?col ?tile)) (:not (carrying ?tile)) (not (carry-count ?old-count)) (carry-count ?new-count))))) ;; when we pick up a tile, delete tile-info so it can't be ;; picked up more than once (define (operator pickup-tile) :parameters (?tile ?row ?col ?old-count ?new-count ?max) :precondition (:and (tile-info ?tile ?row ?col) (agent-loc ?row ?col) (add-one ?old-count ?new-count) (carry-count ?old-count) (carry-max ?max)) :effects ((:effect (:and (:not (tile-info ?tile ?row ?col)) (carrying ?tile) (not (carry-count ?old-count)) (carry-count ?new-count))))) (define (operator go-to) :parameters (?oldrow ?oldcol ?row ?col) :precondition (agent-loc ?oldrow ?oldcol) :effects ((:effect (:and (:not (agent-loc ?oldrow ?oldcol)) (agent-loc ?row ?col))))) (defvar *tw-init* '(;; for each hole of each hole to be filled, generate: ;; (hole-info ) (hole-info H1 2 2 T1) (hole-info H2 2 3 T2) (hole-info H3 2 4 T3) (hole-info H4 11 7 T4) (hole-info H5 12 8 T5) (hole-info H6 11 8 T6) ;; for each tile not being carried, generate: ;; (tile-info ) (tile-info T1 7 8) (tile-info T2 8 4) (tile-info T3 17 7) (tile-info T4 7 9) (tile-info T5 3 14) (tile-info T6 11 9) (tile-info T7 12 2) (tile-info T8 5 8) ;; for each tile being carried, generate: ;; (carrying ) (carry-count 0) (carry-max 4) (agent-loc 10 10))) Initial state of tw-1: *tw-init* Goal state of tw-1: (filled-hole H1) Initial state of tw-2: *tw-init* Goal state of tw-2: (:and (filled-hole H1) (filled-hole H2)) Initial state of tw-3: *tw-init* Goal state of tw-3: (:and (filled-hole H1) (filled-hole H2) (filled-hole H2) ) Initial state of tw-4: *tw-init* Goal state of tw-4: (:and (filled-hole H1) (filled-hole H2) (filled-hole H3) (filled-hole H3) ) Initial state of tw-5: *tw-init* Goal state of tw-5: (:and (filled-hole H1) (filled-hole H2) (filled-hole H3) (filled-hole H3) (filled-hole H5) ) Initial state of tw-6: *tw-init* Goal state of tw-6: (:and (filled-hole H1) (filled-hole H2) (filled-hole H3) (filled-hole H3) (filled-hole H5) (filled-hole H6) )