Go backward to Proposal of the operator to perform the task.
Go up to Encoding A Task in Soar.
Go forward to Problem space proposal for subgoal.
Subgoal creation for operator application
=========================================
The build-tower operator must be applied in a subgoal, where the individual
blocks can be moved to build the tower. Once the build-tower operator has
been selected, there are no productions to apply it directly and a no-change
impasse will arise.
Soar> watch 0
Soar> d 1
4: ==>G: G2 (operator no-change)
When the subgoal is created, it has a collection of augmentations that define
the type of impasse. Using print (see Section See print on page
See print), the complete structure of the goal object can be displayed:
Soar> p g2
(G2 ^quiescence t ^choices none ^impasse no-change ^attribute operator
^object G1 ^type goal)
Once the subgoal has been created, productions can fire to elaborate the goal
with a name and the desired state taken from the operator. The name for the
goal provides a symbol that can be tested by other productions that are
specific to the goal. Instead of testing the name, the productions could
just as well test that the goal is a no-change for the build-tower operator;
however, it is much simpler to just test the name. The refinement of the
goal with the desired state makes it possible to have productions that are
independent of the exact type of impasse (in this case operator no-change)
and just test the ^desired augmentation of the goal. For example, a
production with means-ends knowledge to select operators in the subgoal can
compare the desired state to the current state without ever testing the type
of impasse.
(sp operator-no-change*elaborate*goal*build-tower
(goal <g> ^object <sg> ^impasse no-change ^attribute operator)
(goal <sg> ^operator
(^name build-tower ^desired-state <ds>))
-->
(<g> ^desired <ds> ^name build-tower))
This production demonstrates the used of a structured value where the
attributes of the operator are given as the value of the operator
augmentation, without using an additional variable (see Section
See Structured value notation on page See Structured value notation).