From 98206458d8da64a18fd844689441359aacab53e0 Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Fri, 24 Nov 2023 18:41:39 -0500 Subject: [PATCH] Print solution and simplified plushies and programs --- src/propeller/gp.cljc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/propeller/gp.cljc b/src/propeller/gp.cljc index 6fdd558..42fd861 100644 --- a/src/propeller/gp.cljc +++ b/src/propeller/gp.cljc @@ -122,12 +122,16 @@ (<= (:total-error best-individual) solution-error-threshold))) (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 (:total-error (error-function argmap (:testing-data argmap) best-individual))}) (when (:simplification? argmap) (let [simplified-plushy (simplification/auto-simplify-plushy (:plushy best-individual) error-function argmap)] (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)) false) (cleanup)