Sharing of my labs carried out during the TDDC17 course at Linköping University.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

task1_pb1.pddl 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. ;; TDDC17 - Lab 4
  2. ;; S.'s W. problem 1
  3. ;; Last modification: 2020-10-04
  4. ;; Problem description
  5. ;; The first problem has three rooms, connect by doors as discribed below:
  6. ;; -------------------------------------------------------------------------
  7. ;; | | | |
  8. ;; | | | |
  9. ;; | light switch 1 -|- light switch2 |- light switch3 |
  10. ;; | | | |
  11. ;; | --- | door2 |
  12. ;; | | | door1 shakey | |
  13. ;; | --- (wide) | |
  14. ;; | box | | |
  15. ;; | | door3 |
  16. ;; | | (wide) |
  17. ;; | r1 | r2 | r3 |
  18. ;; -------------------------------------------------------------------------
  19. ;; Shakey must find four small objects distributed in the three rooms and bring
  20. ;; them back to the first room. All lights are off initially. The box allowing
  21. ;; Shakey to turn on the lights is in the first room.
  22. ;; Our problem1 definition
  23. (define (problem pb1)
  24. (:domain shakey)
  25. (:objects
  26. ;; Our three rooms
  27. r1 - room
  28. r2 - room
  29. r3 - room
  30. ;; The box
  31. box1 - object
  32. ;; The four small objects
  33. small1 - object
  34. small2 - object
  35. small3 - object
  36. small4 - object
  37. ;; The two Shakey's grippers
  38. right - gripper
  39. left - gripper
  40. )
  41. (:init
  42. ;; Init position
  43. ;; At the beginning, Shakey is in room 2.
  44. (position r2)
  45. ;; Init connections (as discribed above).
  46. (connected_wide r1 r2)
  47. (connected_wide r2 r1)
  48. (connected_wide r2 r3)
  49. (connected_wide r3 r2)
  50. (connected r1 r2)
  51. (connected r2 r1)
  52. (connected r2 r3)
  53. (connected r3 r2)
  54. ;; Init object positions
  55. (in box1 r1)
  56. (is_big box1)
  57. (in small1 r1)
  58. (in small2 r2)
  59. (in small3 r3)
  60. (in small4 r3)
  61. ;; Init light (light nowhere)
  62. ;;(not (light r1))
  63. ;;(not (light r2))
  64. ;;(not (light r3))
  65. ;; Init gripper
  66. (is_empty right)
  67. (is_empty left)
  68. )
  69. ;; The goal is to have all four objects in the room 1.
  70. (:goal
  71. (and (in small1 r1)
  72. (in small2 r1)
  73. (in small3 r1)
  74. (in small4 r1))
  75. )
  76. )