diff --git a/src/propeller/core.cljc b/src/propeller/core.cljc index a95e928..59d1c7f 100755 --- a/src/propeller/core.cljc +++ b/src/propeller/core.cljc @@ -19,14 +19,10 @@ (println "Try, for example:") (println " lein run software.smallest") (System/exit 1)) - - ;; Creates problems (require (symbol (str "propeller.problems." (first args)))) (gp/gp (merge - {:instructions (eval-problem-var (first args) "instructions") - :error-function (eval-problem-var (first args) "error-function") - :max-generations 500 + {:max-generations 500 :population-size 500 :max-initial-plushy-size 100 :step-limit 200 @@ -37,6 +33,7 @@ :elitism false :PSB2-path "" :PSB2-problem (clojure.string/replace (first args) #"PSB2." "")} + (eval-problem-var (first args) "arglist") (apply hash-map (map #(if (and (string? %) (not (.contains % "/"))) (read-string %) %) (rest args)))))) \ No newline at end of file diff --git a/src/propeller/problems/simple_regression.cljc b/src/propeller/problems/simple_regression.cljc index 3f40580..cd56a97 100755 --- a/src/propeller/problems/simple_regression.cljc +++ b/src/propeller/problems/simple_regression.cljc @@ -71,4 +71,8 @@ :behaviors outputs :errors errors :total-error #?(:clj (apply +' errors) - :cljs (apply + errors)))))) \ No newline at end of file + :cljs (apply + errors)))))) + +(def arglist + {:instructions instructions + :error-function error-function}) \ No newline at end of file