

A solution to the blocks world problem is a sequence of actions that allows us to start from an initial state and end up to a goal state. The cost of each action(moving a block) is 1. The initial and the goal state are described by the exact position of each block. There is only one action available for the agent to solve the problem : either place a block that doesn't have other blocks stacked on top of it on another block with the same behaviour, or on the table. Each block is placed on another block or on the table(free block).

Let's say that we have a number of uniform blocks(cubes) and they can all be placed on a table. The blocks world is one of the most famous planning domains in artificial intelligence. Solution to the blocks world problem(AI) using Python(version 2.7)
