About blocks-world:
About blocks-world-goals:
Contents
- Package blocks-world
- Package blocks-world-goals
A picture of the world
The block objects represent a world that "looks" like this:/----\ ^ /---------\ ^ | b4 | / \ | | / \ \____/ /_w7_\ | | / \ /----\ /----\ | | / \ /--------\ /^\ | b1 | | b2 | | b3 | / \ | b6 | (l8 ) \____/ \____/ \_________/ /_w5__\ \________/ \./ +-----------------------------------------------------------+ | | +-----------------------------------------------------------+
Example
In the initial configuration, where all blocks have been placed directly on the table (not shown), put-on will move the objects like this:BLOCKS-WORLD> (put-on b1 b2) Move hand to pick up B1 at location (1 2). Grasp B1. Removing support relations between B1 and TABLE. Move B1 to top of B2 at location (2 2). Adding support relations between B1 and B2. Ungrasp B1. T
The different kinds of blocks
Movable blocks than can be moved onto load supporting blocks. Using multiple inheritance, there are also blocks that can do both.Subclasses of basic-block characterize different kinds of objects, and have different properties.
They all have a name, given as block-name and in the examples from the book, a global variable of that name is used to refer to them.
Since this chapter is an explanation of CLOS, no specific constructor function is defined, and users may call make-instance directly.
This class is mixed into most blocks, except for the wedge and the ball.
This class is mixed into all blocks except for the table.
Block properties
Slot readers:- instance -- a basic-block
In the examples from the book, a global variable of this name is used to refer to instance.
- instance -- a basic-block
The position of a block is specified as a list of its x and y coordinates, where the first axis runs along the table, and the second axis points upwards towards the hand.
Together with the block's width and height, the position determines which parts of the world this block occupies. No other objects can be placed to an overlapping position.
- instance -- a basic-block
The size of a block is specified as width and height, and determines which parts of the world this block occupies. No other objects can be placed to an overlapping position.
- instance -- a basic-block
The size of a block is specified as width and height, and determines which parts of the world this block occupies. No other objects can be placed to an overlapping position.
- instance -- a basic-block
All blocks except for the table sit on top of another block, which supports them.
- instance -- a load-bearing-block
Concrete block classes
These are the blocks found in our world:The entire rest of the world sits on this table. The table itself cannot be moved.
For each world, this class is meant to be a singleton.
Because this block has a flat top, it supports other blocks.
Because this block doesn't have a flat top, it cannot support other blocks.
Because this block doesn't have a flat top, it cannot support other blocks.
The hand
The hand is movable. It can hold at most one block.- instance -- a hand
The position of a hand is specified as a list of its x and y coordinates, where the first axis runs along the table, and the second axis points upwards towards the hand.
- instance -- a hand
Other functions in blocks-world
- object -- a movable-block
- support -- a basic-block
This function maintains the slots block-supported-by and block-support-for.
- support -- a load-bearing-block
Removes all blocks support is supporting.
- object -- a movable-block
- support -- a basic-block
- object -- a movable-block
Makes sure to ungrasp the block currently grasped by the hand, if any.
- object -- a movable-block
- support -- a basic-block
Takes all necessary actions to make space available.
- object -- a movable-block
- support -- a load-bearing-block
- object -- a movable-block
- support -- a basic-block
Prints the steps taken and returns T or prints an error message and returns nil.
- object -- a movable-block
This function maintains the slots block-supported-by and block-support-for.
- object -- a movable-block
Returns t if successful, or nil if the hand didn't hold this block.
Lots of undocumented functions
I was too lazy to document this package, which is why all its functions have a big fat "undocumented" warning.This package's page also looks rather empty and sad.
Other functions in blocks-world-goals
No documentation string. Possibly unimplemented or incomplete.
No documentation string. Possibly unimplemented or incomplete.
No documentation string. Possibly unimplemented or incomplete.
No documentation string. Possibly unimplemented or incomplete.
No documentation string. Possibly unimplemented or incomplete.
No documentation string. Possibly unimplemented or incomplete.
No documentation string. Possibly unimplemented or incomplete.
Other macros in blocks-world-goals
No documentation string. Possibly unimplemented or incomplete.
No documentation string. Possibly unimplemented or incomplete.
Other classes in blocks-world-goals
No documentation string. Possibly unimplemented or incomplete.
Other variables in blocks-world-goals
No documentation string. Possibly unimplemented or incomplete.
Index of exported symbols
blocks-world-goals: | *current-node*, variable (undocumented) |
blocks-world: | add-support, function |
blocks-world-goals: | attach-action, function (undocumented) |
blocks-world-goals: | attach-parent, function (undocumented) |
blocks-world: | ball, class |
blocks-world: | basic-block, class |
blocks-world: | block-height, function |
blocks-world: | block-name, function |
blocks-world: | block-position, function |
blocks-world: | block-support-for, function |
blocks-world: | block-supported-by, function |
blocks-world: | block-width, function |
blocks-world: | brick, class |
blocks-world: | clear-top, function |
blocks-world-goals: | define-history-method, macro (undocumented) |
blocks-world-goals: | find-action, function (undocumented) |
blocks-world: | get-rid-of, function |
blocks-world: | get-space, function |
blocks-world: | grasp, function |
blocks-world: | hand, class |
blocks-world: | hand-grasping, function |
blocks-world: | hand-name, function |
blocks-world: | hand-position, function |
blocks-world: | load-bearing-block, class |
blocks-world: | make-space, function |
blocks-world: | movable-block, class |
blocks-world: | move, function |
blocks-world-goals: | node, class (undocumented) |
blocks-world-goals: | node-action, function (undocumented) |
blocks-world-goals: | node-children, function (undocumented) |
blocks-world-goals: | node-parent, function (undocumented) |
blocks-world: | put-on, function |
blocks-world: | remove-support, function |
blocks-world-goals: | show-simple-tree, function (undocumented) |
blocks-world: | table, class |
blocks-world-goals: | tell-why, macro (undocumented) |
blocks-world: | ungrasp, function |
blocks-world: | wedge, class |