next up previous
Next: Drive Collections: Some Things Up: BOD Reactive Plans Previous: Action Patterns: Some Things

Competences: Some Things Depend on Context

A sequence is not equivalent to the process of chaining a set of productions, where each element's precondition is set to the fire its action as a consequence of the outcome of the prior element. Besides the possibility of optimizing away the step of checking preconditions, a sequence includes an additional piece of control state. Its elements may also occur in different orders in other contexts, and there is no ambiguity if more than one sequence's element fires in a perceptually equivalent context.

The advantage of productions of course is that, within the confines of a particular context, they allow for flexible behavior. A competence combines the advantages of both productions and sequences. Here is an example of the above sequence rewritten as a competence:


\begin{displaymath}
\mbox{(have hunger) } \Rightarrow
\left\uparrow
\left\langle...
...ox{ get a banana}\nonumber
\end{array} \right\rangle \right.
\end{displaymath}  

Rather than encoding a temporal ordering, a competence encodes a prioritization. Priority increases in the direction of the vertical arrow on the left. Under this plan, if the monkey is handed a peeled banana, she'll eat it. If she has a whole banana, she'll peel it. Otherwise, she'll try to get a banana. When the goal has been achieved, or if none of the elements can fire, the competence terminates.

This sort of structure could lead to looping, for example if another, larger monkey kept taking the banana away after our agent had peeled it but before she could eat it. To allow termination in this circumstance, competence elements not only have priorities and preconditions, but also (optional) retry limits. When an element has reached its retry limit, it will no longer fire.


next up previous
Next: Drive Collections: Some Things Up: BOD Reactive Plans Previous: Action Patterns: Some Things
Joanna J. Bryson 2005-07-08