Print diversity and lengths

This commit is contained in:
Lee Spector 2020-06-07 16:37:02 -04:00
parent c8e096e9c3
commit bef1c112ff

View File

@ -14,6 +14,8 @@
(println "Best total error:" (:total-error best)) (println "Best total error:" (:total-error best))
(println "Best errors:" (:errors best)) (println "Best errors:" (:errors best))
(println "Best behaviors:" (:behaviors best)) (println "Best behaviors:" (:behaviors best))
(println "Genotypic diversity:" (float (/ (count (distinct (map :plushy pop))) (count pop))))
(println "Average genome length:" (float (/ (reduce + (map count (map :plushy pop))) (count pop))))
(println))) (println)))
(defn gp (defn gp