From 5c127ef21b71fc7bbe48bacb336fad207b239602 Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Sat, 25 Nov 2023 11:33:36 -0500 Subject: [PATCH] Add and strip :gene for bmx-umad --- src/propeller/genome.cljc | 3 ++- src/propeller/gp.cljc | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/propeller/genome.cljc b/src/propeller/genome.cljc index 7b72c88..6f29bb6 100755 --- a/src/propeller/genome.cljc +++ b/src/propeller/genome.cljc @@ -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 ([plushy argmap] (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) plushy) argmap))) \ No newline at end of file diff --git a/src/propeller/gp.cljc b/src/propeller/gp.cljc index f7bc440..e25644c 100644 --- a/src/propeller/gp.cljc +++ b/src/propeller/gp.cljc @@ -179,9 +179,11 @@ [argmap] (let [adjust-for-bmx (fn [args] - (let [prob (:bmx (:variation args)) + (let [prob-bmx (:bmx (:variation args)) + prob-bmx-umad (:bmx-umad (:variation 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)) args))) ;