   calculates the strength for each member of the population, and assocs it into the individual."
   [keys population]
   (map
-    #(assoc % :strength (pareto/dominated-count keys population %))
+    #(assoc % :spea2-strength (pareto/dominated-count keys population %))
     population))
 
 (defn- calculate-raw-fitness

        ;; so we can efficiently find the nearest neighbours.
        coords (map (partial coords-from-individual [k1 k2]) population)
        tree (kdtree/build-tree coords)]
    (map #(assoc % :density
                   (calculate-density
                     (kth-nearest-distance tree k (coords-from-individual [k1 k2] %))))
         population)))

(defn calculate-fitnesses
  [keys population]
  (map #(assoc % :fitness (+ (:raw-fitness %) (:density %)))
       (->> population
            (calculate-densities keys)
            (calculate-raw-fitnesses keys))))
  The smaller this fitness measure the better."
  [keys population i]
  (let [dominators (pareto/dominator-set keys population i)]
    (apply + (map :spea2-strength dominators))))


(defn- calculate-raw-fitnesses
  "Calculates raw fitnesses for each individual in a population and assocs it into the individual's
  under the :spea2-raw-fitness key"
  [keys population]
  (let [counted-pop (calculate-strength keys population)]
    (map
      #(assoc % :spea2-raw-fitness (calculate-raw-fitness keys counted-pop %))
      population)))

(defn coords-from-individual
  "Get the individuals coordinates in objective space as a vector."
