Add variable umad (vumad) genetic operator; mul3 parameter experiments
This commit is contained in:
parent
b49ced0567
commit
aeae30d0d4
@ -173,13 +173,13 @@
|
||||
:boolean_nand ;; defined here
|
||||
:boolean_nor ;; defined here
|
||||
:boolean_xnor ;; defined here
|
||||
:boolean_dup
|
||||
:boolean_swap
|
||||
:boolean_rot
|
||||
:boolean_pop
|
||||
:exec_pop
|
||||
:exec_dup
|
||||
'close
|
||||
;:boolean_dup
|
||||
;:boolean_swap
|
||||
;:boolean_rot
|
||||
;:boolean_pop
|
||||
;:exec_pop
|
||||
;:exec_dup
|
||||
;'close
|
||||
true
|
||||
false))
|
||||
|
||||
@ -238,13 +238,13 @@
|
||||
:parent-selection :lexicase
|
||||
;:parent-selection :tournament
|
||||
:tournament-size 5
|
||||
:umad-rate 0.1
|
||||
;:variation {:umad 1}
|
||||
:diploid true
|
||||
:variation {:diploid-umad 0.8
|
||||
:diploid-uniform-silent-replacement 0.1
|
||||
:diploid-flip 0.1}
|
||||
:replacement-rate 0.1
|
||||
:diploid-flip-rate 0.1
|
||||
:umad-rate 0.01
|
||||
:variation {:vumad 1}
|
||||
;:diploid true
|
||||
;:variation {:diploid-umad 0.8
|
||||
; :diploid-uniform-silent-replacement 0.1
|
||||
; :diploid-flip 0.1}
|
||||
;:replacement-rate 0.1
|
||||
;:diploid-flip-rate 0.1
|
||||
:elitism false}
|
||||
(apply hash-map (map #(if (string? %) (read-string %) %) args)))))
|
||||
|
@ -229,6 +229,12 @@ The function `new-individual` returns a new individual produced by selection and
|
||||
(uniform-deletion after-addition effective-addition-rate))
|
||||
; Adds and deletes instructions in the parent genome with the same rate
|
||||
|
||||
:vumad ;; variable umad: :umad-rate is interpreted as max, actual uniform 0-max
|
||||
(let [rate (rand (:umad-rate argmap))]
|
||||
(-> (:plushy (selection/select-parent pop argmap))
|
||||
(uniform-addition (:instructions argmap) rate)
|
||||
(uniform-deletion rate)))
|
||||
|
||||
:uniform-addition
|
||||
(-> (:plushy (selection/select-parent pop argmap))
|
||||
(uniform-addition (:instructions argmap) (:umad-rate argmap)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user