For example, if the user attempts to stack one block on another and one of the blocks is not clear, neither rule applies and, in the absence of additional rules, the semantics of operation definitions implies that the state remains unchanged. Note that, if any of the conditions is not true, these operation definitions by themselves do not say what happens. If, on the other hand, the robot attempts to stack one block on another and the first block is on the table and clear and the second block is clear, then afterward the first block is no longer on the table, the second block is no longer clear, and the first block is resting on the second block. If the robot attempts to unstack one block from another and the first block is clear and the first block is resting on the second block, then in the next state, the first block is no longer on the second, the first block is on the table, and the second block is clear. Using this vocabulary, we can describe the effects of these actions using the operation definitions shown below. In order to talk about events, we using the constant u to refer to the act of removing one block from another, and we use the constant s to refer to the act of stacking one block on another. We use the unary predicate table to state that a block is resting on the table. We use the unary predicate clear to a block has no other blocks on top of it. We use the binary predicate on to express the fact that one block in directly on another. And once again, we use various predicates to describe the state of our world. If a block is clear and on the table and there is another block that is clear, the robot can pick up the first block and stack it on the second block.Īs in our earlier formalization, we name our blocks with five symbols ( a, b, c, d, e), with one symbol for each of the five blocks in the scene. For example, if a block is clear and on another block, the robot can unstack the block and place it on the table. Now, let's consider a dynamic variation of this world, one in which there is a robot that can modify the state of the world by performing various actions. Here block C is on block A, block A is on block B, and block D is on block E. One state of the Blocks World is shown below.
As a more complex example, once again consider the Blocks World.