Add and strip :gene for bmx-umad
This commit is contained in:
parent
770dfe74b1
commit
5c127ef21b
@ -49,7 +49,8 @@ They hold the genetic material for an `individual`. In the initial population, w
|
|||||||
;; call plushy->push-internal with possibly-preprocessed plushy
|
;; call plushy->push-internal with possibly-preprocessed plushy
|
||||||
([plushy argmap]
|
([plushy argmap]
|
||||||
(plushy->push-internal (if (or (> (or (:ah-umad (:variation argmap)) 0) 0) ;; must strip :vary and :protect
|
(plushy->push-internal (if (or (> (or (:ah-umad (:variation argmap)) 0) 0) ;; must strip :vary and :protect
|
||||||
(> (or (:bmx (:variation argmap)) 0) 0)) ;; must strip :gene
|
(> (or (:bmx (:variation argmap)) 0) 0) ;; must strip :gene
|
||||||
|
(> (or (:bmx-umad (:variation argmap)) 0) 0)) ;; must strip :gene
|
||||||
(filter (complement #{:vary :protect :gene}) plushy)
|
(filter (complement #{:vary :protect :gene}) plushy)
|
||||||
plushy)
|
plushy)
|
||||||
argmap)))
|
argmap)))
|
@ -179,9 +179,11 @@
|
|||||||
[argmap]
|
[argmap]
|
||||||
(let [adjust-for-bmx
|
(let [adjust-for-bmx
|
||||||
(fn [args]
|
(fn [args]
|
||||||
(let [prob (:bmx (:variation args))
|
(let [prob-bmx (:bmx (:variation args))
|
||||||
|
prob-bmx-umad (:bmx-umad (:variation args))
|
||||||
n (:bmx-enrichment args)]
|
n (:bmx-enrichment args)]
|
||||||
(if (and prob (> prob 0))
|
(if (or (and prob-bmx (> prob-bmx 0))
|
||||||
|
(and prob-bmx-umad (> prob-bmx-umad 0)))
|
||||||
(update args :instructions concat (repeat (or n 1) :gene))
|
(update args :instructions concat (repeat (or n 1) :gene))
|
||||||
args)))
|
args)))
|
||||||
;
|
;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user