From b88ff01526bf0f88be5f9c7dc10d8ba680d1c291 Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Wed, 11 Oct 2023 19:27:26 -0400 Subject: [PATCH] Strip :vary and :protect if using :ah-umad --- src/propeller/genome.cljc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/propeller/genome.cljc b/src/propeller/genome.cljc index f44b899..c9591fe 100755 --- a/src/propeller/genome.cljc +++ b/src/propeller/genome.cljc @@ -22,6 +22,9 @@ They hold the genetic material for an `individual`. In the initial population, w ([plushy] (plushy->push plushy {})) ([plushy argmap] (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 + (filter (complement #{:vary :protect}) plushy) + plushy) opener? #(and (vector? %) (= (first %) 'open))] ;; [open ] marks opens (loop [push () ;; iteratively build the Push program from the plushy plushy (mapcat #(let [n (get instructions/opens %)]