From ec65f959f270bfc4327e0b509ff41368ab9a5ba3 Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Tue, 13 Jul 2021 18:20:31 -0400 Subject: [PATCH] Don't call identity on error function --- src/propeller/core.cljc | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/propeller/core.cljc b/src/propeller/core.cljc index db08439..a95e928 100755 --- a/src/propeller/core.cljc +++ b/src/propeller/core.cljc @@ -23,23 +23,20 @@ ;; Creates problems (require (symbol (str "propeller.problems." (first args)))) (gp/gp - (update-in - (merge - {:instructions (eval-problem-var (first args) "instructions") - :error-function (eval-problem-var (first args) "error-function") - :max-generations 500 - :population-size 500 - :max-initial-plushy-size 100 - :step-limit 200 - :parent-selection :lexicase - :tournament-size 5 - :umad-rate 0.1 - :variation {:umad 0.5 :crossover 0.5} - :elitism false - :PSB2-path "" - :PSB2-problem (clojure.string/replace (first args) #"PSB2." "")} - (apply hash-map - (map #(if (and (string? %) (not (.contains % "/"))) (read-string %) %) - (rest args)))) - [:error-function] - identity))) \ No newline at end of file + (merge + {:instructions (eval-problem-var (first args) "instructions") + :error-function (eval-problem-var (first args) "error-function") + :max-generations 500 + :population-size 500 + :max-initial-plushy-size 100 + :step-limit 200 + :parent-selection :lexicase + :tournament-size 5 + :umad-rate 0.1 + :variation {:umad 0.5 :crossover 0.5} + :elitism false + :PSB2-path "" + :PSB2-problem (clojure.string/replace (first args) #"PSB2." "")} + (apply hash-map + (map #(if (and (string? %) (not (.contains % "/"))) (read-string %) %) + (rest args)))))) \ No newline at end of file