CS 4341 Homework #1 Solutions
Part 1.
As below, "O" stands for safe point, "X" for unsafe one.
3 O O O O
2 X X O X
1 X O X X
0 O O O O
0 1 2 3
Part 2.
__________1___________
v |
3 O----4---->O----2---->O O
^__________|__3_______|
|
__|
2 O | O |-6-->O-- O
5 | |
| | 7
1 O |>O----- O | O
|
v-------11------------| |
0 O O----10--->O<|---8---->O
^______________________|
9
0 1 2 3
(PUT_ON A B
(AND (GET_SPACE A B)
(GRASP A
(CLEAR-TOP A
(GET-RID-OF C
(PUT-ON C TABLE
(AND (GET-SPACE C TABLE)
(GRASP C
(CLEAR-TOP C
(GET-RID-OF D
(PUT-ON D TABLE
(AND (GET-SPACE D TABLE)
(GRASP D)
(MOVE D TABLE)
(UNGRASP D)
)
)
)
)
)
(MOVE C TABLE)
(UNGRASP C)
)
)
)
)
)
(MOVE A B)
(UNGRASP A)
)
)
Part 2.
* To clear the top of C.
* To clear the top of A.
* To put onto B.
* Get rid of C.
* Put C on TABLE.
Part 3.
* When there is space on the TABLE, and the top of D is clear.
* When there is space on the TABLE, and the top of C is clear.
* When there is space on B, the top of A is clear, and A is held
by the robot hand.
CS 4341 Home Page