Note that informed downsampling is now enabled by default; add comments to gp argument defaults

This commit is contained in:
Lee Spector 2024-01-07 12:11:08 -05:00
parent 81ef86d4ee
commit 3ae7123cd8

View File

@ -52,29 +52,31 @@
"Returns argmap with any unspecified values filled with defaults." "Returns argmap with any unspecified values filled with defaults."
[argmap] [argmap]
(let [defaults (let [defaults
{:bmx-exchange-rate 0.5 {:bmx-exchange-rate 0.5 ; for bmx, the rate at which genes will be exchanged
:bmx-gene-length-limit 10 :bmx-gene-length-limit 10 ; for bmx, the maximum length of a gene
:bmx-gap-change-probability 0.001 :bmx-gap-change-probability 0.001 ; for bmx, the mutation rate for gaps
:bmx-complementary? false :bmx-complementary? false ; for bmx, whether mates selected using reverse case sequence of first parent
:dont-end false :dont-end false ; if true, keep running until limit regardless of success
:downsample? true :downsample? true ; wether to use downsampling
:ds-function :case-maxmin :ds-function :case-maxmin ; :case-rand, case-maxmin, case-maxmin-auto
:downsample-rate 0.05 :downsample-rate 0.05 ; proportion of data used in downsample
:ds-parent-rate 0.01 :ds-parent-rate 0.01 ; proportion of parents used to evaluate case distances
:ds-parent-gens 10 :ds-parent-gens 10 ; generations between computation of parent distances
:error-function (fn [& args] (println "ERROR FUNCTION NOT PROVIDED")) :error-function (fn [& args] (println "ERROR FUNCTION NOT PROVIDED")) ; must provide
:ids-type :solved ; :solved or :elite or :soft :ids-type :solved ; type of informed downsampling, :solved or :elite or :soft
:max-initial-plushy-size 100 :instructions ["INSTRUCTIONS NOT PROVIDED"] ; must be provided
:max-generations 1000 :max-initial-plushy-size 100 ; the maximum size of genomes in initial population
:parent-selection :lexicase :max-generations 1000 ; generation limi when downsampling is not used, adjusted by downsampling
:population-size 1000 :parent-selection :lexicase ; see options in variation.cljc
:single-thread-mode false :population-size 1000 ; the size of the GP ppopulation
:solution-error-threshold 0 :single-thread-mode false ; if true, don't use multithreading
:step-limit 1000 :solution-error-threshold 0 ; maximum total error for solutions
:testing-data [] :step-limit 1000 ; limit of Push interpreter steps in a Push program evaluation
:training-data [] :testing-data [] ; must be provided unless there is no testing data
:umad-rate 0.1 :training-data [] ; must be provided
:variation {:umad 1}} :umad-rate 0.1 ; addition rate (from which deletion rate will be derived) for UMAD
:variation {:umad 1} ; genetic operators and probabilities for their use, which should sum to 1
}
defaulted (merge defaults argmap)] defaulted (merge defaults argmap)]
(merge defaulted ; use the map below to include derived values in argmap (merge defaulted ; use the map below to include derived values in argmap
{:bmx? (some #{:bmx :bmx-umad} (keys (:variation defaulted)))}))) {:bmx? (some #{:bmx :bmx-umad} (keys (:variation defaulted)))})))