Blocks World

Facts

     Two stacks of blocks on the floor:

                   D
             A     X
             B     E
             C     F
          -------------

Knowledge Base

RULE MOVE-DIRECTLY
    IF   the goal is to move block I on top of block J and
         block I is the top block in its stack and
         block J is the top block in its stack,
    THEN move block I on top of block J

RULE MOVE-TO-FLOOR
    IF   the goal is to move block J to the floor and
         block J is the top block in its stack,
    THEN move block block J to the floor

RULE CLEAR-UPPER-BLOCK
    IF   the goal is to move block I and
         block I is not the top block in its stack and
         block J is on top of block I,
    THEN the goal is to move block J to the floor

RULE CLEAR-LOWER-BLOCK
    IF   the goal is to move another block on top of block I and
         block I is not the top block in its stack and
         block J is on top of block I,
    THEN the goal is to move block J to the floor