sp {elaborate*task*tanksoar
   (state <s> ^superstate nil)
   -->
   (<s> ^name tanksoar)}

sp {elaborate*top-state*top-state
  (state <s> ^name tanksoar)
-->
  (<s> ^top-state <s>)}

sp {elaborate*state*energy*low
   (state <s> ^name tanksoar
              ^io.input-link.energy <= 200)
   -->
   (<s> ^missiles-energy low)}

sp {elaborate*state*missiles*low
   (state <s> ^name tanksoar
              ^io.input-link.missiles 0)
   -->
   (<s> ^missiles-energy low)}

## These are used in retreat/move.soar
sp {elaborate*sidestep-directions
   (state <s> ^name tanksoar)
   -->
   (<s> ^side-direction <sd>)
   (<sd> ^forward right left  
         ^backward right left
         ^right forward backward 
         ^left forward backward)}


sp {elaborate*directions
    (state <s> ^superstate nil)
    -->
    (<s> ^direction-map <dm>)
    (<dm> ^north <north>
          ^south <south>
          ^west <west>
          ^east <east>)
    (<north> ^right east  ^left west  ^backward south ^forward north)
    (<south> ^right west  ^left east  ^backward north ^forward south)
    (<west>  ^right north ^left south ^backward east  ^forward west)
    (<east>  ^right south ^left north ^backward west  ^forward east)}

