anchor.diff:  ;;;
   (defun genetic-algorithm-grab-n-best (ga nbest num-copies population)
       ;; add the required amount of copies of the n most fittest to the supplied vector
  -    (do ()
  -        ((= nbest 0))
  -        (decf nbest)
  -        (dotimes (i num-copies)
  -            (vector-push-extend (aref (genetic-algorithm-population ga) 
  -                    (- (1- (genetic-algorithm-population-size ga)) nbest)) population))))
  +    (dotimes (i num-copies)
  +        (let ((nbest nbest))
  +            (do ()
  +                ((= nbest 0))
  +                (decf nbest)
  +                (vector-push-extend (aref (genetic-algorithm-population ga)
  +                                          (- (1- (genetic-algorithm-population-size ga)) nbest)) population)))))
   
   ;;;
   ;;; given parents and storage for the offspring this method performs
  
positive.code:             (when (>= fitness-so-far slice)
                  (return-from genetic-algorithm-get-chromo-roulette 
                      (aref (genetic-algorithm-population ga) i))))
          chosen))
  
  ;;;
  ;;; mutates a chromosome by perturbing its weights by an amount not greater than *max-perturbation*
  
negative.code:             (incf (aref chromosomes i) (* (random-clamped) *max-perturbation*)))))
      
  (defun genetic-algorithm-epoch (ga old-population)
      (setf (genetic-algorithm-population ga) (sort old-population #'< :key #'genome-fitness)) ; sort needed for elitism
      
      ;; reset the appropriate variables
      (genetic-algorithm-reset ga)
  