anchor.diff:    (:documentation "This function uses the standard backprogation of
     error method to train the neural network on the given sample set
     within the given constraints. Training is achieved when the target
  -  error reaches a level that is equal to or below the given
  -  target-mse value, within the given number of iterations. The
  -  function returns t if training is achieved and nil otherwise. If
  -  training is not achieved, the caller can call again to train for
  -  additional iterations. If randomize-weights is set to true, then the
  -  function starts training from scratch. This function accepts
  -  callback parameters that allow the function to periodically report
  -  on the progress of training.")
  +  error reaches a level that is equal to or below the given target-mse
  +  value, within the given number of iterations. The function returns t
  +  if training is achieved and nil otherwise. If training is not
  +  achieved, the caller can call again to train for additional
  +  iterations. If randomize-weights is set to true, then the function
  +  starts training from scratch. This function accepts callback
  +  parameters that allow the function to periodically report on the
  +  progress of training. t-net is a list of alternating input and
  +  output lists, where each input/output list pair represents a single
  +  training vector.  Here's an example for the exclusive-or problem:
  +  '((0 0) (1) (0 1) (0) (1 0) (0) (1 1) (1))")
     (:method ((net t-net)
               (t-set list)
               &key 
  -            (target-mse 0.08)
  -            (max-iterations 10000)
  -            (report-frequency 1000)
  -            (report-function #'default-report-function)
  -            (status-function #'default-status-function)
  -            (logger-function nil)
  -            (randomize-weights nil))
  +              (target-mse 0.08)
  +              (max-iterations 10000)
  +              (report-frequency 1000)
  +              (report-function #'default-report-function)
  +              (status-function #'default-status-function)
  +              (logger-function nil)
  +              (randomize-weights nil)
  +              (annealing nil))
       (declare (float target-mse)
                (integer max-iterations report-frequency)
                (function report-function status-function))
  
positive.code: (defgeneric randomize-weights (object &key)
    (:method ((neuron t-neuron) &key max min)
      (declare (float max min))
      (loop for cx in (cxs neuron) do
           (setf (weight cx) (+ (random (- max min)) min))
           (setf (delta cx) 0))
      neuron)
    (:method ((layer t-layer) &key max min)
      (declare (float max min))
  
negative.code:                          :net (net layer))
            (neuron-array layer)))))
  
  (defun bound-sigmoid (neuron)
    (declare (t-neuron neuron))
    (let ((input (input neuron)))
      (cond
        ((> input 50.0) 1.0)
        ((< input -50.0) 0.0)
        (t (/ 1.0 (1+ (exp (- input))))))))
  
  (defun bound-sigmoid-derivative (neuron)
    (declare (t-neuron neuron))
    (* (output neuron) (- 1 (output neuron))))
  
  (defun rectified-linear (neuron)
    (max 0 (input neuron)))
  
  (defun rectified-linear-derivative (neuron)
    (let ((output (output neuron)))
      (if (< output 0) 0 output)))
  
  (defclass t-net ()
    ((topology :reader topology :initarg :topology
  