;; ======================================================================================= ;; Bucket Problem 1: To find a plan to deliver a small amount water to destination ;; in the fastest way, that is, to pick any bucket and choose a path ;; considering the distance as well as the flow-rate of the tap on the path ;; ;; A possible plan is ;; 1. pick up bucket 1 (actually any bucket) at SL ;; 2. go to L2 ;; 3. arrive at L2 ;; 4. put down bucket 1 at L2 ;; 5. turn tap 2 on bucket 1 ;; 6. pick up bucket 1 (now 1.5 gallons on bucket 1) ;; 7. go to DL ;; 8. arrive at DL ;; 9. deliver ;; ======================================================================================= (define (problem p-1-bucket) (:domain Buckets) (:requirements :adl :time :fluents :continuous-effects) (:objects SL - location L1 - location L2 - location L3 - location DL - location TAP1 - tap TAP2 - tap TAP3 - tap BUCKET1 - bucket BUCKET2 - bucket BUCKET3 - bucket AGENT1 - agent ) (:init (at AGENT1 SL) (at BUCKET1 SL) (at BUCKET2 SL) (at BUCKET3 SL) (at TAP1 L1) (at TAP2 L2) (at TAP3 L3) (= (flow_rate TAP1) 0.1) (= (flow_rate TAP2) 0.15) (= (flow_rate TAP3) 0.2) (= (walking_speed AGENT1) 5) (= (capacity BUCKET1) 2) (= (capacity BUCKET2) 3) (= (capacity BUCKET3) 4) (= (distance SL L1) 10) (= (distance SL L2) 20) (= (distance SL L3) 30) (= (distance DL L1) 60) (= (distance DL L2) 65) (= (distance DL L3) 70) (= (distance L1 SL) 10) (= (distance L2 SL) 20) (= (distance L3 SL) 30) (= (distance L1 DL) 60) (= (distance L2 DL) 65) (= (distance L3 DL) 70) (= (amount_of_water SL) 0) (= (amount_of_water DL) 0) (= (amount_of_water L1) 0) (= (amount_of_water L2) 0) (= (amount_of_water L3) 0) (= (distance_to_walk AGENT1 SL) 0) (= (distance_to_walk AGENT1 DL) 0) (= (distance_to_walk AGENT1 L1) 0) (= (distance_to_walk AGENT1 L2) 0) (= (distance_to_walk AGENT1 L3) 0) (= (level BUCKET1) 0) (= (level BUCKET2) 0) (= (level BUCKET3) 0) (connected SL L1) (connected SL L2) (connected SL L3) (connected L1 SL) (connected L2 SL) (connected L3 SL) (connected L1 DL) (connected L2 DL) (connected L3 DL) (connected DL L1) (connected DL L2) (connected DL L3) ) (:goal (and (>= (amount_of_water DL) 1.5) (<= ?total-time 27)) ;; with 9 steps ) )