 
 
 
+

                            (if (empty? (rest (:history ind)))
                              (vec (repeat (count (:errors ind)) 1000000))
                              (vec (for [case-history (apply map list (:history ind))]
                                     (if (<= (first case-history) error-threshold)
                                       0 ;; solved, improvement doesn't matter
                                       (let [improvements (mapv (fn [[newer-error older-error]]
                                                                  (let [imp (- older-error newer-error)]

                                         (if (<= sum 0)
                                           1.0E100
                                           ;(* (first case-history) (/ 1.0 sum))
                                           ; arbitrating error ties with improvement 
                                           (+ (first case-history) (- 1.0 sum))
                                           ; (mostly) arbitrating improvement ties with error
                                           ;(+ (first case-history) (* 1000 (/ 1.0 sum)))
                                           )))))))
                          (= cat :reproductive-fidelity)
                          (let [g (:genome ind)]
