Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. (define (domain waiting)
  2. (:requirements :adl )
  3.  
  4. (:types
  5. waiter
  6. location
  7. plate
  8. customer
  9. ;; Fill in additional types here
  10. )
  11.  
  12. (:constants
  13. ;; You should not need to add any additional constants
  14. Agent - waiter
  15. BUFF - location
  16. )
  17.  
  18. (:predicates
  19. ;; Example:
  20. ;; (Contains ?x - object ?c - container)
  21. (HoldingPlate ?x - waiter ?p - plate)
  22. (Adjacent ?a - location ?b - location)
  23. (HasFood ?p - plate)
  24. (Served ?c - customer)
  25. (At ?o - object ?l - location)
  26. )
  27.  
  28. ;;;; Action Template - Delete and fill in own actions ;;;;
  29.  
  30. ;(:action dummy-action
  31. ; :parameters (?obj - object)
  32. ; :precondition (and
  33. ; (dummy-pred-1 ?obj)
  34. ; (dummy-pred-2 ?obj)
  35. ; )
  36. ; :effect (and
  37. ; (not (dummy-pred-1 ?obj))
  38. ; (dummy-pred-3 ?obj)
  39. ; )
  40. ;)
  41.  
  42. (:action Pick-Up-Plate
  43. :parameters (?x - waiter ?p - plate ?l - location)
  44. :precondition (and
  45. (not (HoldingPlate ?x ?p))
  46. (At ?x ?l)
  47. (At ?p ?l)
  48. )
  49. :effect (and
  50. (HoldingPlate ?x ?p)
  51. (not(At ?p ?l))
  52. )
  53. )
  54.  
  55. (:action Hand-Over-Plate
  56. :parameters (?x - waiter ?p - plate ?l - location ?c - customer)
  57. :precondition (and
  58. (HoldingPlate ?x ?p)
  59. (At ?x ?l)
  60. (At ?c ?l)
  61. (At ?p ?l)
  62. )
  63. :effect (and
  64. (not(HoldingPlate ?x ?p))
  65. (Served ?c)
  66. )
  67. )
  68.  
  69. (:action Fill
  70. :parameters (?x - waiter ?p - plate)
  71. :precondition (and
  72. (HoldingPlate ?x ?p)
  73. (not(HasFood ?p))
  74. (At ?x BUFF)
  75. )
  76. :effect (and
  77. (HasFood ?p)
  78. )
  79. )
  80.  
  81. (:action Move
  82. :parameters (?x - waiter ?from - location ?to - location)
  83. :precondition (and
  84. (At ?x ?from)
  85. (not (= ?from ?to))
  86. (Adjacent ?from ?to)
  87. )
  88. :effect (and
  89. (not (At ?x ?from))
  90. (At ?x ?to)
  91. )
  92. )
  93.  
  94. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement