SMOLNET PORTAL home about changes
(uiop:define-package :binry-hop/updaters
 (:export #:iterate-memories)
 (:mix :binry-hop/util :cl)
 (:nicknames :hop-updaters))

(in-package :binry-hop/updaters)

(defun iterate-memories (array memory-rereader polynomial) "
closure (idx) -> bit array updated at idx
Minimises current energy at an idx by iterating through
memory-rereader (see it and make-rectified-polynomial)
Note that your method of picking idxes factors into
the Lyapunov condition that guarantees convergence.  "
 (lambda (idx)
  (loop for (memory looped) = (funcall memory-rereader)
   while (not looped)
   when memory
   sum (diff-diff-signs idx array memory polynomial)
   into energy-minimises finally 
   (setf (aref array idx) (s2b energy-minimises))
   (return (values array)))))
Response: text/plain
Original URLgopher://tilde.institute/0/~screwtape/binry-hop/src/updaters.lisp
Content-Typetext/plain; charset=utf-8