From bef1c112fff97e7c58107e4e1dac23a4065eb2cc Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Sun, 7 Jun 2020 16:37:02 -0400 Subject: [PATCH] Print diversity and lengths --- src/propeller/gp.clj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/propeller/gp.clj b/src/propeller/gp.clj index 345ae64..afe1e09 100644 --- a/src/propeller/gp.clj +++ b/src/propeller/gp.clj @@ -14,6 +14,8 @@ (println "Best total error:" (:total-error best)) (println "Best errors:" (:errors 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))) (defn gp