Advertisement
Guest User

AI T2

a guest
Sep 12th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;; 4 Op-blocks world
  3. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  4.  
  5. (define (domain BLOCKS)
  6. (:requirements :strips)
  7. (:predicates (on ?x ?y)
  8. (ontable ?x)
  9. (clear ?x)
  10. )
  11.  
  12. (:action table-stack
  13. :parameters (?x ?y)
  14. :precondition (and (clear ?x) (ontable ?x) (clear ?y))
  15. :effect
  16. (and (not (ontable ?x))
  17. (not (clear ?y))
  18. (on ?x ?y)))
  19.  
  20. (:action stack-table
  21. :parameters (?x ?y)
  22. :precondition (and (clear ?x) (on ?x ?y))
  23. :effect
  24. (and ;(clear ?x)
  25. (ontable ?x)
  26. (clear ?y)
  27. (not(on ?x ?y)))
  28. )
  29. (:action stack-stack
  30. :parameters (?x ?y ?z)
  31. :precondition (and (clear ?x) (on ?x ?y) (clear ?z))
  32. :effect
  33. (and
  34. (not (clear ?z))
  35. ;(clear ?x)
  36. (clear ?y)
  37. (not (on ?x ?y))
  38. (on ?x ?z))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement