Don't call identity on error function

This commit is contained in:
Lee Spector 2021-07-13 18:20:31 -04:00
parent 4954ac3a5f
commit ec65f959f2

View File

@ -23,23 +23,20 @@
;; Creates problems ;; Creates problems
(require (symbol (str "propeller.problems." (first args)))) (require (symbol (str "propeller.problems." (first args))))
(gp/gp (gp/gp
(update-in (merge
(merge {:instructions (eval-problem-var (first args) "instructions")
{:instructions (eval-problem-var (first args) "instructions") :error-function (eval-problem-var (first args) "error-function")
:error-function (eval-problem-var (first args) "error-function") :max-generations 500
:max-generations 500 :population-size 500
:population-size 500 :max-initial-plushy-size 100
:max-initial-plushy-size 100 :step-limit 200
:step-limit 200 :parent-selection :lexicase
:parent-selection :lexicase :tournament-size 5
:tournament-size 5 :umad-rate 0.1
:umad-rate 0.1 :variation {:umad 0.5 :crossover 0.5}
:variation {:umad 0.5 :crossover 0.5} :elitism false
:elitism false :PSB2-path ""
:PSB2-path "" :PSB2-problem (clojure.string/replace (first args) #"PSB2." "")}
:PSB2-problem (clojure.string/replace (first args) #"PSB2." "")} (apply hash-map
(apply hash-map (map #(if (and (string? %) (not (.contains % "/"))) (read-string %) %)
(map #(if (and (string? %) (not (.contains % "/"))) (read-string %) %) (rest args))))))
(rest args))))
[:error-function]
identity)))