Print solution and simplified plushies and programs

This commit is contained in:
Lee Spector 2023-11-24 18:41:39 -05:00
parent 91adcbf089
commit 98206458d8

View File

@ -122,12 +122,16 @@
(<= (:total-error best-individual) (<= (:total-error best-individual)
solution-error-threshold))) solution-error-threshold)))
(do (prn {:success-generation generation}) (do (prn {:success-generation generation})
(prn {:successful-plushy (:plushy best-individual)})
(prn {:successful-program (genome/plushy->push (:plushy best-individual) argmap)})
(prn {:total-test-error (prn {:total-test-error
(:total-error (error-function argmap (:testing-data argmap) best-individual))}) (:total-error (error-function argmap (:testing-data argmap) best-individual))})
(when (:simplification? argmap) (when (:simplification? argmap)
(let [simplified-plushy (simplification/auto-simplify-plushy (:plushy best-individual) error-function argmap)] (let [simplified-plushy (simplification/auto-simplify-plushy (:plushy best-individual) error-function argmap)]
(prn {:total-test-error-simplified (prn {:total-test-error-simplified
(:total-error (error-function argmap (:testing-data argmap) {:plushy simplified-plushy}))}))) (:total-error (error-function argmap (:testing-data argmap) {:plushy simplified-plushy}))})
(prn {:simplified-plushy simplified-plushy})
(prn {:simplified-program (genome/plushy->push simplified-plushy argmap)})))
(if dont-end false true)) (if dont-end false true))
false) false)
(cleanup) (cleanup)