sp {performance*init-data
   :o-support
   (state <s> ^superstate nil
              ^io.input-link <il>
              -^performance)
    (<il> ^score <score>
         ^clock <clock>)
-->
    (<s> ^performance <p>) 
    (<p> ^prev-score <score>
         ^clock <clock>)}

sp {compute*reward
    (state <s> ^superstate nil
               ^io <io>
               ^performance <p>)
    (<io> ^reward <r>
          ^input-link.score <score>)
    (<p> ^prev-score <old-score>)
-->
    (<r> ^battle (- <score> <old-score>))}

sp {performance*update-data
   :o-support 
   (state <s> ^superstate nil
               ^io.input-link <il>
	     ^performance <p>)
    (<il> ^score <score>
          ^clock <clock>)
   -(<p> ^clock <clock>)
    (<p> ^prev-score)
-->
    (<s> ^performance <p> -
         ^performance <p-new>)
    (<p-new> ^prev-score <score>
             ^clock <clock>)
   # (tcl |puts $fileId | <score>) 
    # [expr double(| <score> |) / | <n> |]|)
}
