Soar Tutorial - the Cognitive Systems Group
Soar Tutorial - the Cognitive Systems Group
Soar Tutorial - the Cognitive Systems Group
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
42<br />
waterjug*apply*operator*remove*old*lastoperator*pour<br />
If <strong>the</strong> task is waterjug and a pour operator is selected and lastoperator<br />
does not have <strong>the</strong> same name and filljug, <strong>the</strong>n remove <strong>the</strong> lastoperator.<br />
sp {waterjug*apply*operator*remove*lastoperator*pour<br />
(state ^name waterjug<br />
^operator <br />
^lastoperator )<br />
( ^name pour<br />
^filljug <br />
^emptyjug )<br />
( ^name pour<br />
^filljug <br />
^emptyjug )<br />
><br />
( ^lastoperator )}<br />
Once you add <strong>the</strong>se rules, add rules that avoid applying an operator that undoes <strong>the</strong> previous operator<br />
(you should write <strong>the</strong>se yourself).<br />
waterjug*select*operator*avoid*inverse*fill<br />
If <strong>the</strong> task is waterjug and <strong>the</strong> last operator is empty <strong>the</strong>n avoid a fill.<br />
waterjug*select*operator*avoid*inverse*empty<br />
If <strong>the</strong> task is waterjug and <strong>the</strong> last operator is fill <strong>the</strong>n avoid an empty.<br />
waterjug*select*operator*avoid*inverse*pour<br />
If <strong>the</strong> task is waterjug and <strong>the</strong> last operator is pour from one jug <strong>the</strong>n<br />
avoid a pour <strong>the</strong> opposite way.<br />
sp {waterjug*select*operator*avoid*inverse*fill<br />
(state ^name waterjug<br />
^operator +<br />
^lastoperator )<br />
( ^name fill ^filljug )<br />
( ^name empty ^emptyjug )<br />
><br />
( ^operator <br />
( ^operator <br />
( ^operator