Add :vary and :protect when using ah-umad
This commit is contained in:
parent
3ccd5542ea
commit
037baf9b2e
@ -148,6 +148,15 @@
|
||||
n (:autoconstructive-crossover-enrichment args)]
|
||||
(if (and prob (> prob 0))
|
||||
(update args :instructions concat (repeat (or n 1) :gene))
|
||||
args)))
|
||||
;
|
||||
adjust-for-ah-umad
|
||||
(fn [args]
|
||||
(let [prob (:ah-umad (:variation args))
|
||||
n (:ah-umad-enrichment args)]
|
||||
(if (and prob (> prob 0))
|
||||
(update args :instructions concat (flatten (repeat (or n 1) [:vary :protect])))
|
||||
args)))]
|
||||
(gp-loop (-> argmap
|
||||
(adjust-for-autoconstructive-crossover)))))
|
||||
(adjust-for-autoconstructive-crossover)
|
||||
(adjust-for-ah-umad)))))
|
Loading…
x
Reference in New Issue
Block a user