Merge adjacent gaps
This commit is contained in:
parent
435eb59371
commit
0b2024ec6e
@ -180,11 +180,12 @@ The function `new-individual` returns a new individual produced by selection and
|
|||||||
b-genes (utils/extract-genes plushy-b)]
|
b-genes (utils/extract-genes plushy-b)]
|
||||||
(flatten
|
(flatten
|
||||||
(interpose :gap
|
(interpose :gap
|
||||||
(mapv (fn [g]
|
(remove empty?
|
||||||
(if (< (rand) rate)
|
(mapv (fn [g]
|
||||||
(apply min-key #(bmx-distance g %) b-genes)
|
(if (< (rand) rate)
|
||||||
g))
|
(apply min-key #(bmx-distance g %) b-genes)
|
||||||
a-genes)))))
|
g))
|
||||||
|
a-genes))))))
|
||||||
|
|
||||||
(defn new-individual
|
(defn new-individual
|
||||||
"Returns a new individual produced by selection and variation of
|
"Returns a new individual produced by selection and variation of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user