The game is about playing with a set of blocks where one needs to arrange the blocks into stacks. You will be asked to verify if a generated plan is correct or not.

[POSSIBLE ACTIONS]
Pick up a block
Unstack a block from on top of another block
Put down a block
Stack a block on top of another block

[RULES]
Only pick up or unstack one block at a time.
Only pick up or unstack a block if hand is empty.
Only pick up a block if the block is on the table and the block is clear. A block is clear if the block has no other blocks on top of it and if the block is not picked up.
Only unstack a block from on top of another block if the block being unstacked was really on top of the other block.
Only unstack a block from on top of another block if the block being unstacked is clear.
Once one picks up or unstacks a block, he/she is holding the block.
Only put down a block that one is holding.
Only stack a block on top of another block if one is holding the block being stacked.
Only stack a block on top of another block if the block onto which one is stacking is clear.
Once one puts down or stacks a block, the hand becomes empty.
Once one stacks a block on top of a second block, the second block is no longer clear.

[[EXAMPLE 1]]

[PLAN]
init state (each clause is a stack): yellow on red on orange on blue
goal: red on blue; yellow on orange

My plan is as follows:
unstack the yellow block from on top of the orange block
put down the yellow block
unstack the red block from on top of the orange block
stack the red block on top of the yellow block

[VERIFICATION]
(init state: yellow on red on orange on blue)
(partial goal: red on blue; yellow on orange)
unstack the yellow block from on top of the orange block --- is yellow clear? yes, is yellow right on top of orange? no, yellow on red, fail
(result: incorrect)

[[EXAMPLE 2]]

[PLAN]
init state (each clause is a stack): red on blue; yellow on orange
goal: orange on red; blue; yellow

My plan is as follows:
unstack the yellow block from on top of the orange block
put down the yellow block
unstack the red block from on top of the blue block
put down the red block
pick up the orange block
stack the orange block on top of the red block

[VERIFICATION]
(init state: red on blue; yellow on orange)
(partial goal: orange on red)
unstack the yellow block from on top of the orange block --- is yellow clear? yes; is yellow right on top of orange? yes, good --- new state is yellow on hand; red on blue; orange
put down the yellow block --- in hand is yellow, good --- new state is red on blue; orange; yellow
unstack the red block from on top of the blue block --- is red clear? yes; is red right on top of blue? yes, good --- new state is red on hand; blue; orange; yellow
put down the red block --- in hand is red, good --- new state is blue; orange; yellow; red
pick up the orange block --- orange is on the table and clear? yes, good --- new state is orange on hand; blue; yellow; red
stack the orange block on top of the red block --- orange is in hand? yes; red is clear? yes, good --- new state is orange on red; blue; yellow --- partial goal satisfied
(result: correct)

[[OTHER TIPS]]
Let's go over the rules again and see some of the examples where the generated plan fails to follow them

[TIP 1: OBJECT BEING STACKED NEEDS TO BE CLEAR]
Rule: Only stack a block on top of another block if the block onto which one is stacking is clear.
...new state is yellow; orange on blue; read
...pick up the yellow block --- yellow is on the table and clear? yes, good --- new state is yellow on hand; orange on blue; red
stack the yellow block on top of the blue block --- yellow is in hand? yes; blue is clear? no, orange on blue, bad

[TIP 2: CAREFULLY READ THE GOAL AND GENERATE THE PARTIAL GOAL]
...My goal is to have that the red block is on top of the orange block, the blue block is on top of the red block and the yellow block is on top of the blue block.
...(partial goal: red on orange on blue on yellow) --- bad, should instead be yellow on blue on red on orange

[TIP 2: CAREFULLY READ THE GOAL AND GENERATE THE PARTIAL GOAL]
...Your goal is to have that the red block is on top of the orange block, the blue block is on top of the red block and the yellow block is on top of the blue block.
...
(partial goal: yellow on blue on red on orange) - good

[TIP 3: DISTINGUISH PICK-UP AND UNSTACK]
Rule: Only pick up a block if the block is on the table and the block is clear.
...(init state: yellow on orange; red; blue)
(partial goal: red on blue on yellow on orange)
pick up the yellow block --- yellow is on the table and clear? no, yellow is on orange, should **unstack** instead.

[TIP 3: DISTINGUISH PICK-UP AND UNSTACK]
Rule: Only pick up a block if the block is on the table and the block is clear.
...(init state: blue on orange; red; yellow; orange)
(partial goal: red on blue on yellow on orange)
pick up the blue block --- blue is on the table and clear? no, blue is on orange, should **unstack** instead.

[TIP 4: OBJECT BEING PICKED UP NEEDS TO BE CLEAR]
Rule: Only pick up a block if the block is on the table and the block is clear. 
...new state is red in hand; yellow; orange on blue
...stack the red block on top of the yellow block --- red is in hand? yes; yellow is clear? yes, good --- new state is red on yellow; orange on blue
pick up the blue block --- blue is on the table and clear? no, blue is under orange, bad

[TIP 5: DO NOT WRITE CLEAR IN INIT STATE OR INTERMEDIATE STEPS]
Use, e.g., orange; blue; red; yellow, instead of orange clear, ...

[[CURRENT PROBLEM]]