diff --git a/src/propeller/gp.cljc b/src/propeller/gp.cljc index 2c2afb2..d6b6578 100644 --- a/src/propeller/gp.cljc +++ b/src/propeller/gp.cljc @@ -37,6 +37,11 @@ :average-total-error (float (/ (reduce + (map :total-error pop)) (count pop)))}) (println))) +(defn cleanup + [] + #?(:clj (shutdown-agents)) + nil) + (defn gp "Main GP loop." [{:keys [population-size max-generations error-function instructions @@ -110,13 +115,13 @@ (prn {:total-test-error-simplified (:total-error (error-function argmap (:testing-data argmap) (hash-map :plushy simplified-plushy)))}))) (if dont-end false true)) false) - nil + (cleanup) ;; (and (not downsample?) (>= generation max-generations)) - nil + (cleanup) ;; (and downsample? (>= evaluations (* max-generations population-size (count indexed-training-data)))) - nil + (cleanup) ;; :else (recur (inc generation) (+ evaluations (* population-size (count training-data)) ;every member evaluated on the current sample @@ -136,5 +141,4 @@ (if (zero? (mod generation ds-parent-gens)) (downsample/update-case-distances rep-evaluated-pop indexed-training-data indexed-training-data ids-type (/ solution-error-threshold (count indexed-training-data))) ; update distances every ds-parent-gens generations indexed-training-data) - indexed-training-data)))) - #?(:clj (shutdown-agents)))) \ No newline at end of file + indexed-training-data)))))) \ No newline at end of file diff --git a/src/propeller/problems/boolean/mul3.cljc b/src/propeller/problems/boolean/mul3.cljc index a510d97..80c05d5 100644 --- a/src/propeller/problems/boolean/mul3.cljc +++ b/src/propeller/problems/boolean/mul3.cljc @@ -315,8 +315,8 @@ ;:max-batch-size [1 2 4 8 16 32 64 128 256] ;:tournament-size 5 ;:umad-rate 0.09 - :ah-umad-protection 10 ;; ah-umad - :ah-umad-rate 0.1 ;; ah-umad + :ah-umad-protection 100 ;; ah-umad + :ah-umad-rate 0.01 ;; ah-umad ;:umad-rate [1/2 ; 1/4 1/4 ; 1/8 1/8 1/8