Guest User

Blocks World (PDDL)

a guest
Sep 3rd, 2016
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. ; Source http://www.plg.inf.uc3m.es/ipc2011-learning/attachments/Domains/blocksworld.pddl
  2.  
  3. (define (domain blocksworld)
  4. (:requirements :strips :typing)
  5. (:types block)
  6. (:predicates (on ?x - block ?y - block)
  7. (ontable ?x - block)
  8. (clear ?x - block)
  9. (handempty)
  10. (holding ?x - block)
  11. )
  12.  
  13. (:action pick-up
  14. :parameters (?x - block)
  15. :precondition (and (clear ?x) (ontable ?x) (handempty))
  16. :effect
  17. (and (not (ontable ?x))
  18. (not (clear ?x))
  19. (not (handempty))
  20. (holding ?x)))
  21.  
  22. (:action put-down
  23. :parameters (?x - block)
  24. :precondition (holding ?x)
  25. :effect
  26. (and (not (holding ?x))
  27. (clear ?x)
  28. (handempty)
  29. (ontable ?x)))
  30.  
  31. (:action stack
  32. :parameters (?x - block ?y - block)
  33. :precondition (and (holding ?x) (clear ?y))
  34. :effect
  35. (and (not (holding ?x))
  36. (not (clear ?y))
  37. (clear ?x)
  38. (handempty)
  39. (on ?x ?y)))
  40. (:action unstack
  41. :parameters (?x - block ?y - block)
  42. :precondition (and (on ?x ?y) (clear ?x) (handempty))
  43. :effect
  44. (and (holding ?x)
  45. (clear ?y)
  46. (not (clear ?x))
  47. (not (handempty))
  48. (not (on ?x ?y))))
  49.  
  50. )
Advertisement
Add Comment
Please, Sign In to add comment