Go backward to Object representation issues.
Go up to Object representation issues.
Go forward to Predicates.
Constants
.........
Constants allow productions to be sensitive to specific symbols. A
production can test two different aspects of a constant: it can test the
exact value of a constant, or it can test that a constant in one condition is
equal to another constant in another condition. When testing the exact value
of a constant, the constant must appear explicitly in the conditions of the
production. Therefore, the problem solving is dependent on that specific
value, and any chunk built to summarize the problem solving would correctly
contain that constant.
When testing the equality of two constants, the constant need not appear in
the production. Instead, the production can contain a variable that is
matched against both occurrences of the constant. Therefore, the problem
solving is independent of the specific values of the constants, being
dependent only on the fact that they are equal (or not equal). A chunk would
nevertheless include the specific constants because chunking determines
conditions based on the working memory elements and not the original
production conditions. The problem arises because the constant is being
overloaded with two functions: its specific value, and its equality relation
to other constants. The solution to this problem is to separate out the
"identity" of a constant from its specific value. This is done by
representing the constant using a Soar object (rather than just a symbol).
The identifier of the Soar object can be used for equality tests on the
constant (as the chunker variablizes object identifiers after back-tracing),
and the constant's specific value can be tested (and thus included in chunks)
by accessing it through its corresponding object.
To illustrate this point, consider two alternative representations of the
ontop relation that might be used in the Blocks World to signify that block A
is above block B. In the first case, the value of the ontop augmentations is
the name of the block (B). In the second case, the value of the augmentation
is the identifier of an object (represented by variables in the example) that
contains the name of the blocks.
Case 1: (<A> ^ontop B ^name A)
Case 2: (<A> ^ontop <B> ^name A)
(<B> ^name B)
Using the second representation, a production can test the equality of two
objects by testing only the identifier and not the name. During chunking,
the identifier is variablized so that only the equality test remains. One
difficulty with this approach is that it requires that all references to an
object use the same identifier. So, for example, in Case 2 as described
above, working memory might contain:
(A22 ^ontop B26 ^name A)
(B26 ^name B)
(where A22 and B26 are Soar-generated identifiers). Now if we wished to add
a block C which is left-of B, we must find and use B's identifier (B26).
This is done in a production by matching block B's object, with conditions in
the production as follows:
(<s> ^block-set.name B)
...
-->
(<s> ^block-set <C> + &)
(<C> ^name C ^left-of <B>)