Advertisement
Guest User

Untitled

a guest
Oct 16th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. (define (domain coffee-robot-domain)
  2. (:predicates
  3. (move ?l ?l)
  4. (room ?r)
  5. (at-room ?l)
  6. (door ?l)
  7. (pickup ?c ?l)
  8. (coffee ?c)
  9. (move-coffee ?l)
  10. (deliver ?c ?l)
  11. (has-coffee ?c)
  12. (person ?p)
  13. ;;(free ?h)
  14. )
  15.  
  16. (:action move-room
  17. :parameters (?cr ?d)
  18. :precondition (and (room ?cr) (door ?d) (move ?cr ?d) (at-room ?cr) )
  19. :effect (and (at-room ?d)
  20. (not (at-room ?cr)) ))
  21.  
  22.  
  23. (:action open-door
  24. :parameters (?d ?tr )
  25. :precondition (and (room ?tr) (door ?d) (move ?d ?tr) (at-room ?d))
  26. :effect (and (at-room ?tr)
  27. (not (at-room ?d))))
  28.  
  29. (:action pickup-coffee
  30. :parameters (?cfe ?cr)
  31. :precondition (and (room ?cr) (coffee ?cfe) (at-room ?cr) )
  32. :effect (and (pickup ?cfe ?cr) (has-coffee ?cfe)) )
  33.  
  34. (:action move-room-with-coffee
  35. :parameters (?cfe ?cr ?tr)
  36. :precondition (and (room ?cr) (room ?tr) (coffee ?cfe) (move ?cr ?tr) (has-coffee ?cfe) (move-coffee ?cr))
  37. :effect (and (move-coffee ?tr) (has-coffee ?cfe)
  38. (not (move-coffee ?cr)) ))
  39.  
  40. (:action deliver
  41. :parameters (?cfe ?cr ?p)
  42. :precondition (and (room ?cr) (coffee ?cfe) (move-coffee ?cr) (person ?p) (has-coffee ?cfe) )
  43. :effect (and (deliver ?cfe ?cr)
  44. (not (has-coffee ?cfe))) )
  45.  
  46.  
  47.  
  48. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement