Skip to content

Commit

Permalink
Print solution and simplified plushies and programs
Browse files Browse the repository at this point in the history
  • Loading branch information
lspector committed Nov 24, 2023
1 parent 91adcbf commit 9820645
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/propeller/gp.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9820645

Please sign in to comment.