fizz buzz, gcd, and luhn added

This commit is contained in:
Shuzo Katayama 2021-07-14 14:55:45 -04:00
parent 883840a564
commit a32b3263c5

View File

@ -16,7 +16,7 @@
"Reports information each generation."
[pop generation argmap]
(let [best (first pop)]
(println {:generation generation
(clojure.pprint/pprint {:generation generation
:best-plushy (:plushy best)
:best-program (genome/plushy->push (:plushy best) argmap)
:best-total-error (:total-error best)
@ -28,8 +28,6 @@
:average-total-error (float (/ (reduce + (map :total-error pop)) (count pop)))})
(println)))
;; clojure.pprint/pprint
(defn gp
"Main GP loop."
[{:keys [population-size max-generations error-function instructions