From 0a32938c2b27c289659fc4cefe7a74ded3a60fe8 Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Fri, 8 Dec 2023 18:39:13 -0500 Subject: [PATCH] Add and delete gaps in :bmx, not just :bmx-umad --- src/propeller/variation.cljc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/propeller/variation.cljc b/src/propeller/variation.cljc index 3ebfbad..b2ffef7 100644 --- a/src/propeller/variation.cljc +++ b/src/propeller/variation.cljc @@ -214,8 +214,11 @@ The function `new-individual` returns a new individual produced by selection and (selection/select-parent pop argmap)) plushy1 (:plushy parent1) plushy2 (:plushy parent2) - bmx-exchange-rate (utils/onenum (or (:bmx-exchange-rate argmap) 0.5))] - (bmx plushy1 plushy2 bmx-exchange-rate)) + bmx-exchange-rate (utils/onenum (or (:bmx-exchange-rate argmap) 0.5)) + gap-change-prob (utils/onenum (:bmx-gap-change-probability argmap))] + (-> (bmx plushy1 plushy2 bmx-exchange-rate) + (uniform-gap-addition gap-change-prob) + (uniform-gap-deletion gap-change-prob))) ; :umad ;; uniform mutation by addition and deletion, see uniform-deletion for the ;; adjustment that makes this size neutral on average