Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. ;; Domain definition
  2. (define (domain weed-domain)
  3.  
  4. ;; Predicates: Properties of objects that we are interested in (boolean)
  5. (:predicates
  6. (STONER ?x) ; True if x is a stoner
  7. (WEED ?x) ; True if x is weed
  8. (JOINT ?x) ; True if x is a rolled joint
  9. (CAN-SMOKE ?x) ; True if x is a joint that can be used for smoking
  10. (CAN-ROLL ?x) ; True if x is weed that can be used for rolling
  11. (stoner-is-high ?x) ; True if stoner x is high as fuck
  12. (well-smoked-joint ?x) ; True if x is a joint and is fucking high as shit
  13. )
  14.  
  15. ;; Actions: Ways of changing the state of the world
  16.  
  17. ; Chef x can grab a tool y if they do not hold any tool yet and if the tool is free
  18. ; As a result they hold the tool, and the tool is not free any more
  19. ; Parameters:
  20. ; - x: the chef
  21. ; - y: the tool
  22. (:action roll-weed :parameters (?x ?y)
  23. :precondition (and (STONER ?x) (WEED ?y) (CAN-ROLL ?y))
  24. :effect (and (JOINT ?y) (not (WEED ?y)))
  25. )
  26.  
  27. ; Chef x can drop a tool y if they hold the tool
  28. ; As a result the chef stops holding the tool, and the tool becomes free
  29. ; Parameters:
  30. ; - x: the chef
  31. ; - y: the tool
  32. (:action smoke-joint :parameters (?x ?y)
  33. :precondition (and (STONER ?x) (JOINT ?y) (CAN-SMOKE ?y))
  34. :effect (and (stoner-is-high ?x) (not (CAN-SMOKE ?y)) (well-smoked-joint ?y))
  35. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement