Tao Lin, Chengfei Yue, Ziran Liu, Xibin Cao
Long-horizon task : Four-Tier Tower of Hanoi
goal: [(on block_y block_b),(on block_b block_g),
(on block_g block_r),(on block_r area_3)]
Total number of subtasks executed: 79
Completion time : 7 minutes and 30 seconds
Task: reverse
goal: [(on block_r block_g),(on block_g block_b),
(on block_b floor)]
Nominal plan is generated by GPT-4.
Task: reverse with moving blocks and obstacle
goal: [(on block_r block_g),(on block_g block_b),
(on block_b floor)]
Nominal plan is generated by GPT-4.
User Prompt
‘Predicates’ describe the state of robots and objects
‘Action’ describes the robot's operational skills, condition represents the current state that needs to be satisfied before executing this skill, and effect represents the change in the current state after executing the skill.
(:predicates
(Stackable ?o1 ?o2)
(HandEmpty)
(Holding ?o)
(CanMove)
(Free ?o)
(GripperOn ?o)
(On ?o1 ?o2)
(:action move_free
:parameters (?o)
:precondition (and (HandEmpty) (CanMove))
:effect (and (not (CanMove)) (GripperOn ?o)))
(:action move_holding
:parameters (?o1 ?o2)
:precondition (and (CanMove) (Holding ?o1))
:effect (and (GripperOn ?o2) (not (CanMove))))
(:action pick
:parameters (?o1 ?o2)
:precondition (and (GripperOn ?o1)
(HandEmpty)
(Free ?o1)
(On ?o1 ?o2))
:effect (and (CanMove)
(Free ?o2)
(not (Free ?o1))
(not (GripperOn ?o1))
(not (HandEmpty))
(not (On ?o1 ?o2)))
)
(:action place
:parameters (?o1 ?o2)
:precondition (and (GripperOn ?o2))
(Stackable ?o1 ?o2)
(Free ?o2)
)
:effect (and (HandEmpty) (CanMove)
(On ?o1 ?o2)
(not (Free ?o2))
(Free ?o1))
)
******************
Here is an example
I want to flip the order of two stacked blocksinitial state:
(On block1 floor) ,(On block2 block1),
(Free block2), (HandEmpty),
(Stackable block1 block2) ,( Stackable block1 floor),
(Stackable block2 block1) ,( Stackable block2 floor),
--------
goal state:
(On block1 block2) ,(On block2 floor)
--------
results:
[(move_free block2), (pick block2 block1), (move_hold block2 floor), (place block2 floor),
(move_free block1), (pick block1 floor), (move_hold block1 block2), (place block1 block2)]
*******************
Please complete the following task and provide the corresponding operation sequence. I recommend you to think step by step, reason about the changes in the intermediate state, check if the precondition is met, and if you can reach the goal state. However, do not give me the thought process, just print the results.
initial state:
(On block1 floor) ,(On block2 block1) ,(On block3 block2),
(Free block3) (HandEmpty)
(Stackable block1 block2) ,(Stackable block1 block3) ,(On block1 floor),
(Stackable block2 block1) ,(Stackable block2 block3) ,(On block2 floor),
(Stackable block3 block1) ,(Stackable block3 block2) ,(On block3 floor)
--------
goal state:
(On block1 block2) ,(On block2 block3) ,(On block3 floor)
GPT Output
Based on the provided PDDL domain and problem instances, here is the corresponding operation sequence to achieve the goal state:
(move_free block3)
(pick block3 block2)
(move_holding block3 floor)
(place block3 floor)
(move_free block2)
(pick block2 block1)
(move_holding block2 block3)
(place block2 block3)
(move_free block1)
(pick block1 floor)
(move_holding block1 block2)
(place block1 block2)
This sequence of actions should transition the initial state to the goal state as specified.
Task: rearrange
goal: all red blocks on red area (Genera purpose)