Fix naming clash in new-individual
This commit is contained in:
parent
f8bdacc388
commit
509c22b79c
@ -35,7 +35,7 @@
|
|||||||
#_(genome/plushy->push
|
#_(genome/plushy->push
|
||||||
(genome/make-random-plushy (get-stack-instructions #{:float :integer :exec :boolean}) 20))
|
(genome/make-random-plushy (get-stack-instructions #{:float :integer :exec :boolean}) 20))
|
||||||
|
|
||||||
(gp/gp {:instructions propeller.problems.software.number-io/instructions
|
#_(gp/gp {:instructions propeller.problems.software.number-io/instructions
|
||||||
:error-function propeller.problems.software.number-io/error-function
|
:error-function propeller.problems.software.number-io/error-function
|
||||||
:max-generations 500
|
:max-generations 500
|
||||||
:population-size 500
|
:population-size 500
|
||||||
@ -46,3 +46,30 @@
|
|||||||
:umad-rate 0.1
|
:umad-rate 0.1
|
||||||
:variation {:umad 0.5 :crossover 0.5}
|
:variation {:umad 0.5 :crossover 0.5}
|
||||||
:elitism false})
|
:elitism false})
|
||||||
|
|
||||||
|
#_(gp/gp {:instructions propeller.problems.simple-regression/instructions
|
||||||
|
:error-function propeller.problems.simple-regression/error-function
|
||||||
|
:max-generations 500
|
||||||
|
:population-size 500
|
||||||
|
:max-initial-plushy-size 100
|
||||||
|
:step-limit 200
|
||||||
|
:parent-selection :tournament
|
||||||
|
:tournament-size 5
|
||||||
|
:umad-rate 0.01
|
||||||
|
:variation {:umad 1.0
|
||||||
|
:crossover 0.0}
|
||||||
|
:elitism false})
|
||||||
|
|
||||||
|
(gp/gp {:instructions propeller.problems.simple-regression/instructions
|
||||||
|
:error-function propeller.problems.simple-regression/error-function
|
||||||
|
:max-generations 500
|
||||||
|
:population-size 500
|
||||||
|
:max-initial-plushy-size 100
|
||||||
|
:step-limit 200
|
||||||
|
:parent-selection :tournament
|
||||||
|
:tournament-size 5
|
||||||
|
:umad-rate 0.1
|
||||||
|
:variation {:umad 1.0
|
||||||
|
:crossover 0.0}
|
||||||
|
:elitism false})
|
||||||
|
|
||||||
|
@ -84,21 +84,21 @@
|
|||||||
[xover add del] (if (:diploid argmap)
|
[xover add del] (if (:diploid argmap)
|
||||||
[diploid-crossover diploid-uniform-addition diploid-uniform-deletion]
|
[diploid-crossover diploid-uniform-addition diploid-uniform-deletion]
|
||||||
[crossover uniform-addition uniform-deletion])
|
[crossover uniform-addition uniform-deletion])
|
||||||
xover-rate (or (:crossover (:variation argmap)) 0)
|
xover-prob (or (:crossover (:variation argmap)) 0)
|
||||||
umad-rate (or (:umad (:variation argmap)) 0)
|
umad-prob (or (:umad (:variation argmap)) 0)
|
||||||
flip-rate (or (:flip (:variation argmap)) 0)]
|
flip-prob (or (:flip (:variation argmap)) 0)]
|
||||||
(cond
|
(cond
|
||||||
(< prob xover-rate)
|
(< prob xover-prob)
|
||||||
(xover (:plushy (selection/select-parent pop argmap))
|
(xover (:plushy (selection/select-parent pop argmap))
|
||||||
(:plushy (selection/select-parent pop argmap)))
|
(:plushy (selection/select-parent pop argmap)))
|
||||||
;
|
;
|
||||||
(< prob (+ xover-rate umad-rate))
|
(< prob (+ xover-prob umad-prob))
|
||||||
(del (add (:plushy (selection/select-parent pop argmap))
|
(del (add (:plushy (selection/select-parent pop argmap))
|
||||||
(:instructions argmap)
|
(:instructions argmap)
|
||||||
umad-rate)
|
(:umad-rate argmap))
|
||||||
umad-rate)
|
(:umad-rate argmap))
|
||||||
;
|
;
|
||||||
(< prob (+ xover-rate umad-rate flip-rate))
|
(< prob (+ xover-prob umad-prob flip-prob))
|
||||||
(diploid-flip (:plushy (selection/select-parent pop argmap)) flip-rate)
|
(diploid-flip (:plushy (selection/select-parent pop argmap)) flip-prob)
|
||||||
;
|
;
|
||||||
:else (:plushy (selection/select-parent pop argmap))))})
|
:else (:plushy (selection/select-parent pop argmap))))})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user