Go backward to An example task---The Blocks World.
Go up to Encoding a task in the PSCM.
Go forward to PSCM trace of Blocks World.
Blocks World knowledge
----------------------
Below is the task implementation knowledge for the Blocks World. Each piece
of task knowledge is labeled with TK for later reference.
1. *Propose the task.*
TK1: For the top problem space, we need to propose an operator to
perform a specific task such as taking the current configuration of
blocks on the table and achieving a desired state that has a tower with
block A on top of block B and B on top of C. We will call that operator
build-tower.
2. *Terminate the task.*
TK2: The operator for performing the task can be terminated when the
current state matches the desired state of the operator (the blocks are
correctly stacked).
3. *Propose the problem space.*
TK3: The problem space delimits the operators that should be used at the
current stage of working on the task. The Blocks World is simple enough
so that only a single problem space, blocks-world, is required.
4. *Propose the initial state.*
TK4: The states are configurations of blocks on the table. Inasmuch as
the task is to be implemented by actually moving blocks in an external
environment, the initial state will contain the objects of the current
state of the top-level goal. That state contains the system's
perception of the external environment including the configuration of
blocks.
5. *Propose operators to transform a state.*
TK5: In the Blocks World, there is only one legal operator: the operator
that moves a block from some location to the top of a block or to the
table. This operator, move-block, is instantiated once for each clear
block that can be moved and each location to which it can be moved.
In this example, only operators that can apply to the current state are
proposed. There is no restriction in Soar that prevents creating other
operators. For example, to use means-ends analysis, it is useful to
generate operators based on the goal, such as operators to move block B
on top of block C.
6. *Apply an operator to transform a state.*
TK6: The operator that moves a block changes two characteristics of the
state. The block that was moved is no longer on top of the object that
was supporting it (namely, another block or the table), and it is now on
top of either another block or the table. Refinement may create new
knowledge of the transformed state, such as the inference that the block
from which a block was moved is clear.
Below are examples of possible search control heuristics for selecting
operators in the Blocks World.
1. SK1: Prefer an operator that moves a block into its desired position
over an operator that does not move a block into its desired position.
2. SK2: If there are two operators that move blocks into their desired
position in the same tower, prefer the operator whose block in the
desired state is lower in the tower.
3. SK3: Avoid moving a block on top of another block if that is not its
desired location.
4. SK4: If there are two operators that move blocks into their desired
position in different towers, select between them indifferently.