From d318d702ed903ce28d37ce9d0ecabd88fef3db2b Mon Sep 17 00:00:00 2001 From: Lee Spector Date: Thu, 14 Dec 2023 19:11:26 -0800 Subject: [PATCH] Pass argmap to bmx --- src/propeller/variation.cljc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/propeller/variation.cljc b/src/propeller/variation.cljc index 5b4f400..2b4622b 100644 --- a/src/propeller/variation.cljc +++ b/src/propeller/variation.cljc @@ -175,7 +175,7 @@ The function `new-individual` returns a new individual produced by selection and (defn bmx "Crosses over two plushies using best match crossover (bmx)." - [plushy-a plushy-b rate max-distance] + [plushy-a plushy-b rate max-distance argmap] (let [a-genes (utils/extract-genes plushy-a) b-genes (utils/extract-genes plushy-b)] (flatten @@ -235,7 +235,7 @@ The function `new-individual` returns a new individual produced by selection and bmx-exchange-rate (utils/onenum (or (:bmx-exchange-rate argmap) 0.5)) gap-change-prob (utils/onenum (:bmx-gap-change-probability argmap)) max-distance (utils/onenum (:bmx-maximum-distance argmap))] - (-> (bmx plushy1 plushy2 bmx-exchange-rate max-distance) + (-> (bmx plushy1 plushy2 bmx-exchange-rate max-distance argmap) (uniform-gap-addition gap-change-prob) (uniform-gap-deletion gap-change-prob))) ; @@ -260,7 +260,7 @@ The function `new-individual` returns a new individual produced by selection and plushy2 (:plushy parent2) bmx-exchange-rate (utils/onenum (or (:bmx-exchange-rate argmap) 0.5)) max-distance (utils/onenum (:bmx-maximum-distance argmap))] - (bmx plushy1 plushy2 bmx-exchange-rate max-distance)) + (bmx plushy1 plushy2 bmx-exchange-rate max-distance argmap)) (uniform-gap-addition gap-change-prob) (uniform-gap-deletion gap-change-prob) (uniform-addition (:instructions argmap) umad-rate)