Go backward to English description.
Go up to Support of Preferences.
Go forward to Multiple Agents.
Examples
========
The simplest examples are where membership in the transitive closure is
explicit in the production. The first set of examples assume no transitive
closure memberships outside of what is represented in the production.
(sp Operator-Application-1
(goal <g> ^state <s> ^operator <o>)
(<o> ^some augmentation)
-->
(<s> ^added augmentation +)) ;this gets O-support from the OA rules
(sp Operator-Modification-1
(goal <g> ^state <s> ^operator <o>)
(<s> ^some augmentation)
-->
(<o> ^added augmentation +)) ;this gets O-support from the OM rules
(sp Operator-Modification-2
(goal <g> ^state <s> )
(goal <g> ^operator <o> +)
(<s> ^some augmentation)
-->
(<o> ^added augmentation +)) ;this gets O-support from the OM rules
(sp Operator-Creation-1
(goal <g> ^state <s> )
(<s> ^some augmentation)
-->
(goal <g> ^operator <o> +)
(<o> ^added augmentation +)) ;this gets O-support from the OC rules
(sp Mixed-Operator-Application-Operator-Modification-1
(goal <g> ^state <s> ^operator <o>)
(<s> ^some augmentation)
(<o> ^some augmentation)
-->
(operator <o> ^added augmentation +) ;gets O-support from OM rules
(<s> ^added augmentation +)) ;this gets O-support from the OA rules
(sp Mixed-Operator-Application-Operator-Creation-1
(goal <g> ^state <s> ^operator <o>)
(<s> ^some augmentation)
(<o> ^some augmentation)
-->
(goal <g> ^operator <o2> +)
(<o2> ^added augmentation +) ;this gets O-support from the OC rules
(<s> ^added augmentation +)) ;this gets O-support from the OA rules
One can construct more complex examples showing how the transitive closure
works. Assume that the following WMEs are in working memory.
(g1 state s2)
(g1 operator o1)
(g1 temp t1)
(object t1 subitem t2)
(s2 item-1 i3)
(s2 item-2 i6)
(i3 subitem i4)
(i6 subitem i7)
(o1 subject i4)
(o1 subject-2 s5)
(sp Operator-Modification-and-Operator-Application-TC-1
(goal <g> ^state <s> ^operator <o>)
(<o> ^subject <subject>)
-->
(<subject> ^added aug +)) ;This gets O-support from the OM & OA rules
;;
;; The preference gets O-support because the only binding available for
;; <subject> is i4 which is in the TC of both the state and operator.
;; Thus we are testing something off the state and off the operator
;; and modifying something in the TC of the state and operator.
;;
(sp Operator-Modification-and-Operator-Application-TC-2
(goal <g> ^state <s> ^operator <o>)
(<s> ^item-1 <item-1>)
(<item-1> ^subitem <subject>)
-->
(<subject> ^added aug +)) ;This gets O-support from the OM & OA rules
;;
;; Basically the same reasoning as the previous example.
;;
(sp Operator-Modification-TC-1
(goal <g> ^state <s> ^operator <o>)
(<o> ^subject <subject> ^subject-2 <su2>)
-->
(<su2> ^added aug +)) ;This gets O-support from the OM rules
;;
;; We satisfy the first predicate of both the OM and OA rules but
;; since we are only modifying something in the TC of the operator
;; The preference only receives support from Operator Modification.
;;
(sp Operator-Modification-TC-2
(goal <g> ^state <s> ^operator <o>)
(goal <g> ^temp <temp1>)
(<temp1> ^subitem <temp2)
(<o> ^subject <subject> ^subject-2 <su2>)
-->
(<su2> ^added <temp1>) ;This gets O-support from the OM rules
(<temp2> ^added foo))) ;This gets O-support from the OM rules
;;
;; We satisfy the first predicate of both the OM and OA rules but
;; since we are only modifying something in the TC of the operator
;; The preferences only receives support from Operator Modification.
;; The second preference is in the TC of the operator when the TC is
;; considered over both WM and the Right Hand Side of the production.
;;
Other Notes:
* O-support is only given to preferences in the Transitive closure of the
firing goal, and is withdrawn when the firing goal terminates. The
firing goal is defined to be the lowest goal in the goal stack that is
matched explictly by the instantiation.