Advertisement
patryk

SI - 14.10 Zadanie w domu

Oct 9th, 2015
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. ############################################
  2. ##### Plik dziedziny
  3.  
  4. (define
  5. (domain world-of-blocks)
  6. (:requirements :adl)
  7. (:predicates
  8. (on-top ?x ?y)
  9. (on-floor ?x)
  10. (clear ?x)
  11. (raised ?x)
  12. )
  13.  
  14. ;----- RAISING OPERATORS -----
  15.  
  16. (:action podnies-z-paczki
  17. :parameters (?x ?y)
  18. :precondition
  19. (and
  20. (clear ?x)
  21. (on-top ?x ?y)
  22. (not (exists (?z) (raised ?z)))
  23. )
  24. :effect
  25. (and
  26. (raised ?x)
  27. (not (on-top ?x ?y))
  28. (clear ?y)
  29. )
  30. )
  31.  
  32. (:action podnies-z-podlogi
  33. :parameters (?x)
  34. :precondition
  35. (and
  36. (clear ?x)
  37. (on-floor ?x)
  38. (not (exists (?z) (raised ?z)))
  39. )
  40. :effect
  41. (and
  42. (raised ?x)
  43. (not (on-floor ?x))
  44. )
  45. )
  46.  
  47.  
  48.  
  49. ; ----- LOWERING OPERATORS -----
  50.  
  51. (:action opusc-na-paczke
  52. :parameters (?x ?y)
  53. :precondition
  54. (and
  55. (raised ?x)
  56. (clear ?y)
  57. )
  58. :effect
  59. (and
  60. (not (clear ?y))
  61. (on-top ?x ?y)
  62. (not (raised ?x))
  63. )
  64. )
  65.  
  66. (:action opusc-na-podloge
  67. :parameters (?x)
  68. :precondition
  69. (and
  70. (raised ?x)
  71. )
  72. :effect
  73. (and
  74. (on-floor ?x)
  75. (not (raised ?x))
  76. )
  77. )
  78.  
  79. )
  80.  
  81. ############################################
  82. ##### Konfiguracja 1
  83.  
  84. (:init
  85. (clear c)
  86. (on-top c b)
  87. (on-top b a)
  88. (on-floor a)
  89. (clear e)
  90. (on-top e d)
  91. (on-floor d)
  92. )
  93. (:goal
  94. (and
  95. (clear d)
  96. (on-top d b)
  97. )
  98. )
  99.  
  100. #############################################
  101. ##### Konfiguracja 2
  102.  
  103. (:init
  104. (clear c)
  105. (on-top c b)
  106. (on-top b a)
  107. (on-floor a)
  108. (clear e)
  109. (on-top e d)
  110. (on-floor d)
  111. )
  112. (:goal
  113. (and
  114. (clear a)
  115. (clear b)
  116. (clear c)
  117. (clear d)
  118. (clear e)
  119. (on-floor a)
  120. (on-floor b)
  121. (on-floor c)
  122. (on-floor d)
  123. (on-floor e)
  124. )
  125. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement