Go backward to The action side.
Go up to The action side.
Go forward to Production Action.
Creating preferences
....................
Below are the 13 types of preferences as they can appear in the actions of a
production (<G1>, <OP1>, and <op2> are variables):
(<G1> ^operator <OP1>) acceptable
(<G1> ^operator <OP1> +) acceptable
(<G1> ^operator <OP1> !) require
(<G1> ^operator <OP1> ~) prohibit
(<G1> ^operator <OP1> -) reject
(<G1> ^operator <OP1> > <op2>) better
(<G1> ^operator <OP1> < <op2>) worse
(<G1> ^operator <OP1> >) best
(<G1> ^operator <OP1> <) worst
(<G1> ^operator <OP1> =) unary indifferent
(<G1> ^operator <OP1> = <op2>) binary indifferent
(<G1> ^operator <OP1> &) unary parallel
(<G1> ^operator <OP1> & <op2>) binary parallel
(<G1> ^operator <OP1> @) reconsider
As shown in the following example, productions create preferences.
Logically, all creations in a single production occur in parallel and all
satisfied production instantiations fire in parallel, with the changes to
working memory made after all preferences from the productions have been
collected.
(sp blocks*propose*operator*move-block*destination
(goal <g> ^problem-space.name block-world ^state <s>)
(<s> ^object-dynamic <blockA-dyn> { <> <blockA-dyn> <blockB-dyn>})
(<blockA-dyn> ^object-static (<blocka> ^type block)
^clear yes -^ontop <blockb>)
(<blockB-dyn> ^object-static <blockb> ^clear yes)
-->
(<o> ^name move-block ^moving-block <blocka> ^destination <blockb>)
(<g> ^operator <o> +))
All of the identifiers used in preferences created in the a production's
actions must be linked directly or indirectly to a goal context. In the
example, <o> is linked via the acceptable preference for the operator
augmentation, and all of its substructure, such as ^$moving block <blocka>,
is linked via augmentations of <o>. If identifiers of the actions are not
linked, a warning is printed when the production is compiled.
A variable that appears only in the action side, such as <o>, will
automatically be bound to an identifier that begins with the first letter of
that variable (e.g., <o> might be bound to o234). This symbol is guaranteed
to be unique and it will be used for all occurrences of the variable in the
action side.