Strip :gene when using :autoconstructive-crossover
This commit is contained in:
parent
84be0de491
commit
f9f1a9e22b
@ -22,8 +22,9 @@ They hold the genetic material for an `individual`. In the initial population, w
|
|||||||
([plushy] (plushy->push plushy {}))
|
([plushy] (plushy->push plushy {}))
|
||||||
([plushy argmap]
|
([plushy argmap]
|
||||||
(let [plushy (if (:diploid argmap) (map first (partition 2 plushy)) plushy)
|
(let [plushy (if (:diploid argmap) (map first (partition 2 plushy)) plushy)
|
||||||
plushy (if (> (or (:ah-umad (:variation argmap)) 0) 0) ;; strip :vary and :protect if using :ah-umad
|
plushy (if (or (> (or (:ah-umad (:variation argmap)) 0) 0) ;; must strip :vary and :protect
|
||||||
(filter (complement #{:vary :protect}) plushy)
|
(> (or (:autoconstructive-crossover (:variation argmap)) 0) 0)) ;; must strip :gene
|
||||||
|
(filter (complement #{:vary :protect :gene}) plushy)
|
||||||
plushy)
|
plushy)
|
||||||
opener? #(and (vector? %) (= (first %) 'open))] ;; [open <n>] marks opens
|
opener? #(and (vector? %) (= (first %) 'open))] ;; [open <n>] marks opens
|
||||||
(loop [push () ;; iteratively build the Push program from the plushy
|
(loop [push () ;; iteratively build the Push program from the plushy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user