From b40aff3d6d91f7355cda9c3f0121d5158c2226fd Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Wed, 6 Dec 2023 20:26:04 -0500 Subject: [PATCH] Don't allow uniform-deletion to delete :gap --- src/propeller/variation.cljc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/propeller/variation.cljc b/src/propeller/variation.cljc index fb37249..a1f1cd1 100644 --- a/src/propeller/variation.cljc +++ b/src/propeller/variation.cljc @@ -130,8 +130,10 @@ The function `new-individual` returns a new individual produced by selection and [plushy umad-rate] (if (zero? umad-rate) plushy - (remove (fn [_] (< (rand) - (/ 1 (+ 1 (/ 1 umad-rate))))) + (remove (fn [item] + (and (not= item :gap) + (< (rand) + (/ 1 (+ 1 (/ 1 umad-rate)))))) plushy))) (defn bmx