This commit is contained in:
Ryan Boldi 2023-10-15 22:55:02 -04:00
commit ce71c6d49f
2 changed files with 6 additions and 6 deletions

View File

@ -51,16 +51,13 @@
(defn gp (defn gp
"Main GP loop." "Main GP loop."
[{:keys [population-size max-generations error-function instructions [{:keys [population-size max-generations error-function instructions
max-initial-plushy-size solution-error-threshold mapper ds-parent-rate ds-parent-gens dont-end ids-type downsample?] max-initial-plushy-size solution-error-threshold ds-parent-rate ds-parent-gens dont-end ids-type downsample?]
:or {solution-error-threshold 0.0 :or {solution-error-threshold 0.0
dont-end false dont-end false
ds-parent-rate 0 ds-parent-rate 0
ds-parent-gens 1 ds-parent-gens 1
ids-type :solved ; :solved or :elite or :soft ids-type :solved ; :solved or :elite or :soft
downsample? false downsample? false}
;; The `mapper` will perform a `map`-like operation to apply a function to every individual
;; in the population. The default is `map` but other options include `mapv`, or `pmap`.
mapper #?(:clj pmap :cljs map)}
:as argmap}] :as argmap}]
;; ;;
(prn {:starting-args (update (update argmap :error-function str) :instructions str)}) (prn {:starting-args (update (update argmap :error-function str) :instructions str)})

View File

@ -307,6 +307,9 @@
:max-initial-plushy-size 100 :max-initial-plushy-size 100
:step-limit 1000 :step-limit 1000
:parent-selection :lexicase :parent-selection :lexicase
:downsample? true
:ds-function :case-rand
:downsample-rate 0.1
;:parent-selection :tournament ;:parent-selection :tournament
;:parent-selection :motley-batch-lexicase ;:parent-selection :motley-batch-lexicase
;:max-batch-size [1 2 4 8 16 32 64 128 256] ;:max-batch-size [1 2 4 8 16 32 64 128 256]
@ -314,7 +317,7 @@
;:umad-rate 0.09 ;:umad-rate 0.09
:ah-umad-protect-rate 0.001 ;; ah-umad :ah-umad-protect-rate 0.001 ;; ah-umad
:ah-umad-vary-rate 0.1 ;; ah-umad :ah-umad-vary-rate 0.1 ;; ah-umad
:ah-umad-tournament-size 2 ;; ah-umad :ah-umad-tournament-size 1 ;; ah-umad
;:umad-rate [1/2 ;:umad-rate [1/2
; 1/4 1/4 ; 1/4 1/4
; 1/8 1/8 1/8 ; 1/8 1/8 1/8