...
the above defines a template macro isAvailable
that accepts one argument, for example, if the argument topic
is the variable tt
, the template generates the expression: exists(m3,question(t,?),or(!known(answered('other',m3)),!known(answered('self',m3))))
The system also supports event macros to provide a simple way to define random options for system actions:
Anchor | ||||
---|---|---|---|---|
|
<eventmacro left=“OKAY” right=“or(AI_alrightA,backchannel.okay_confirm,AI_mhmC,AI_alrightE,AI_mhmE,AI_uhhuhE)”/>
this macro defines a system speech act called "OKAY" that could be verbalized as any of the 5 speech act listed.
The reward definition file:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<goals> <goal id="simple" desc="the basic reward" value= "10"/> <goal id="quick" desc="reward for something more important" value= "30"/> ... </goals> |
...
The ELSE
block is optional.
Anchor | ||||
---|---|---|---|---|
|
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Network flavorCheese { #topic: set.flavor #entrance condition: system initiative #condition: and(state=='start',type=='cheese',known(sugar)) #reentrance option: statement.back system: question.cake.flavor { { user: statement.flavor.chocolate #action: flavor='chocolate' } OR { user: statement.flavor.lemon #action: flavor='lemon' } OR { user: statement.flavor.amaretto system: apology.flavor #action: clarifyFlavors=true #action: swapout } } DO #action: state='done' #goal: simple } |
...
Line 8 is a system edge that brings as to a node with 3 outgoing edges defined by the 2 ORs. The use of OR should be read as follow this edge if you can, OR this, OR this.... For simple system actions that do not require different information state updates, an event macro would be easier to use.
If one needs to specify a complex sub-tree instead of just a simple edge with no effects, one should surround the block of text defining that sub-tree with curly brackets to define its scope unambiguously. You can see the use of curly brackets for scoping at line 9, and then for the three blocks of code that defines the three arguments of the ORs.
...