lspector / Clojush

The Push programming language and the PushGP genetic programming system implemented in Clojure.
http://hampshire.edu/lspector/push.html
Eclipse Public License 1.0
331 stars 92 forks source link

Minor bug in auto-simplify-plush function #297

Closed theaksaini closed 4 years ago

theaksaini commented 4 years ago

The first input to translate-plush-genome-to-push-program should be a map containing only the genome to be translated {:genome new-genome}. A snippet from the relevant function.

(let [new-genome (apply-simplification-step-to-genome genome simplification-step-probabilities)
              new-program (translate-plush-genome-to-push-program (assoc ind :genome new-genome)
                                                                  {:max-points (* 10 (count genome))})
              new-errors (:errors (error-function {:program new-program}))]
          (if (and (= new-errors errors)
                   (<= (count-points new-program) (count-points program)))
            (recur (inc step) new-genome new-program new-errors)
            (recur (inc step) genome program errors)))))))

https://github.com/lspector/Clojush/blob/34cc8581200777da0ae50d20fb3bb503eff47da7/src/clojush/simplification.clj#L215