Only one block may be moved at a time: it may either be placed on the table or placed atop another block. The goal is to build one or more vertical stacks of blocks.
The algorithm is similar to a set of wooden blocks of various shapes and colors sitting on a table. The blocks world is a planning domain in artificial intelligence. Toy problem in artificial intelligence research