Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (domain coffee-robot-domain)
- (:predicates
- (move ?l ?l)
- (room ?r)
- (at-room ?l)
- (door ?l)
- (pickup ?c ?l)
- (coffee ?c)
- (move-coffee ?l)
- (deliver ?c ?l)
- (has-coffee ?c)
- (person ?p)
- ;;(free ?h)
- )
- (:action move-room
- :parameters (?cr ?d)
- :precondition (and (room ?cr) (door ?d) (move ?cr ?d) (at-room ?cr) )
- :effect (and (at-room ?d)
- (not (at-room ?cr)) ))
- (:action open-door
- :parameters (?d ?tr )
- :precondition (and (room ?tr) (door ?d) (move ?d ?tr) (at-room ?d))
- :effect (and (at-room ?tr)
- (not (at-room ?d))))
- (:action pickup-coffee
- :parameters (?cfe ?cr)
- :precondition (and (room ?cr) (coffee ?cfe) (at-room ?cr) )
- :effect (and (pickup ?cfe ?cr) (has-coffee ?cfe)) )
- (:action move-room-with-coffee
- :parameters (?cfe ?cr ?tr)
- :precondition (and (room ?cr) (room ?tr) (coffee ?cfe) (move ?cr ?tr) (has-coffee ?cfe) (move-coffee ?cr))
- :effect (and (move-coffee ?tr) (has-coffee ?cfe)
- (not (move-coffee ?cr)) ))
- (:action deliver
- :parameters (?cfe ?cr ?p)
- :precondition (and (room ?cr) (coffee ?cfe) (move-coffee ?cr) (person ?p) (has-coffee ?cfe) )
- :effect (and (deliver ?cfe ?cr)
- (not (has-coffee ?cfe))) )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement