Remove extraneous argmap argument; experiment with valiant
This commit is contained in:
parent
bb916c2ad3
commit
d49f9e4bf0
BIN
src/.DS_Store
vendored
BIN
src/.DS_Store
vendored
Binary file not shown.
BIN
src/propeller/.DS_Store
vendored
BIN
src/propeller/.DS_Store
vendored
Binary file not shown.
@ -25,11 +25,12 @@
|
|||||||
(def instructions
|
(def instructions
|
||||||
(vec (concat (for [i (range num-inputs)] (keyword (str "in" i)))
|
(vec (concat (for [i (range num-inputs)] (keyword (str "in" i)))
|
||||||
(take num-inputs
|
(take num-inputs
|
||||||
(cycle [:boolean_and
|
(cycle [:boolean_xor
|
||||||
:boolean_or
|
;:boolean_or
|
||||||
:boolean_not
|
;:boolean_not
|
||||||
:exec_if
|
;:exec_if
|
||||||
'close])))))
|
;'close
|
||||||
|
])))))
|
||||||
|
|
||||||
(defn error-function
|
(defn error-function
|
||||||
([argmap individual]
|
([argmap individual]
|
||||||
|
@ -156,19 +156,55 @@
|
|||||||
; :diploid true})
|
; :diploid true})
|
||||||
|
|
||||||
|
|
||||||
|
;(gp/gp {:instructions propeller.problems.valiant/instructions
|
||||||
|
; :error-function propeller.problems.valiant/error-function
|
||||||
|
; :max-generations 500
|
||||||
|
; :population-size 50
|
||||||
|
; :max-initial-plushy-size 1000
|
||||||
|
; :step-limit 2000
|
||||||
|
; :parent-selection :tournament
|
||||||
|
; :tournament-size 10
|
||||||
|
; :umad-rate 0.01
|
||||||
|
; :diploid-flip-rate 0.01
|
||||||
|
; :variation {:umad 0.9
|
||||||
|
; :diploid-flip 0.1
|
||||||
|
; }
|
||||||
|
; :elitism false
|
||||||
|
; :diploid true})
|
||||||
|
|
||||||
|
;(gp/gp {:instructions propeller.problems.valiant/instructions
|
||||||
|
; :error-function propeller.problems.valiant/error-function
|
||||||
|
; :max-generations 500
|
||||||
|
; :population-size 100
|
||||||
|
; :max-initial-plushy-size 1000
|
||||||
|
; :step-limit 2000
|
||||||
|
; :parent-selection :tournament
|
||||||
|
; :tournament-size 10
|
||||||
|
; :umad-rate 0.01
|
||||||
|
; :diploid-flip-rate 0.01
|
||||||
|
; :variation {:umad 0.9
|
||||||
|
; :diploid-flip 0.1
|
||||||
|
; }
|
||||||
|
; :elitism false
|
||||||
|
; :diploid true})
|
||||||
|
|
||||||
|
;;; below is when I switched to just xor
|
||||||
|
|
||||||
(gp/gp {:instructions propeller.problems.valiant/instructions
|
(gp/gp {:instructions propeller.problems.valiant/instructions
|
||||||
:error-function propeller.problems.valiant/error-function
|
:error-function propeller.problems.valiant/error-function
|
||||||
:max-generations 500
|
:max-generations 500
|
||||||
:population-size 500
|
:population-size 500
|
||||||
:max-initial-plushy-size 1000
|
:max-initial-plushy-size 50
|
||||||
:step-limit 2000
|
:step-limit 2000
|
||||||
:parent-selection :lexicase
|
:parent-selection :lexicase
|
||||||
:tournament-size 5
|
:tournament-size 2
|
||||||
:umad-rate 0.001
|
:umad-rate 0.01
|
||||||
:diploid-flip-rate 0.001
|
:diploid-flip-rate 0.01
|
||||||
:variation {:umad 0.5
|
:variation {:umad 0.5
|
||||||
:diploid-flip 0.5
|
:crossover 0.25
|
||||||
|
:diploid-flip 0.25
|
||||||
}
|
}
|
||||||
:elitism false
|
:elitism false
|
||||||
:diploid true})
|
:diploid true})
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
(defn diploid-crossover
|
(defn diploid-crossover
|
||||||
"Crosses over two individuals using uniform crossover. Pads shorter one."
|
"Crosses over two individuals using uniform crossover. Pads shorter one."
|
||||||
[plushy-a plushy-b argmap]
|
[plushy-a plushy-b]
|
||||||
(let [plushy-a (partition 2 plushy-a)
|
(let [plushy-a (partition 2 plushy-a)
|
||||||
plushy-b (partition 2 plushy-b)
|
plushy-b (partition 2 plushy-b)
|
||||||
shorter (min-key count plushy-a plushy-b)
|
shorter (min-key count plushy-a plushy-b)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user