Clean up boolean mul problems, still experimental and not consistent with one another
This commit is contained in:
parent
037baf9b2e
commit
98d9c1f13e
@ -31,9 +31,6 @@
|
|||||||
(assoc product-bits (keyword (str "c" bit-index)) this-bit)
|
(assoc product-bits (keyword (str "c" bit-index)) this-bit)
|
||||||
(- remainder (* (if this-bit 1 0) pow2))))))))
|
(- remainder (* (if this-bit 1 0) pow2))))))))
|
||||||
|
|
||||||
#_(target-function false true false false false true)
|
|
||||||
#_(target-function true true true true true)
|
|
||||||
|
|
||||||
(def train-and-test-data
|
(def train-and-test-data
|
||||||
(let [bools [false true]]
|
(let [bools [false true]]
|
||||||
{:train (for [a2 bools
|
{:train (for [a2 bools
|
||||||
@ -106,7 +103,6 @@
|
|||||||
[:output :c0]
|
[:output :c0]
|
||||||
(state/peek-stack state :boolean)))))
|
(state/peek-stack state :boolean)))))
|
||||||
|
|
||||||
|
|
||||||
(def-instruction
|
(def-instruction
|
||||||
:c5
|
:c5
|
||||||
^{:stacks [:boolean :output]}
|
^{:stacks [:boolean :output]}
|
||||||
@ -227,8 +223,6 @@
|
|||||||
:c1 ;; defined here
|
:c1 ;; defined here
|
||||||
:c0 ;; defined here
|
:c0 ;; defined here
|
||||||
|
|
||||||
;; BOOLEAN TAGGING?
|
|
||||||
|
|
||||||
;; Recommended by Kalkreuth et al: BUFa, NOTa, AND, OR, XOR, NAND, NOR, XNOR
|
;; Recommended by Kalkreuth et al: BUFa, NOTa, AND, OR, XOR, NAND, NOR, XNOR
|
||||||
;:boolean_bufa ;; defined here
|
;:boolean_bufa ;; defined here
|
||||||
;:boolean_nota ;; defined here
|
;:boolean_nota ;; defined here
|
||||||
@ -309,35 +303,16 @@
|
|||||||
:max-initial-plushy-size 100
|
:max-initial-plushy-size 100
|
||||||
:step-limit 10000
|
:step-limit 10000
|
||||||
:parent-selection :lexicase
|
:parent-selection :lexicase
|
||||||
:downsample? true
|
:downsample? false
|
||||||
:ds-function :case-rand
|
:ds-function :case-rand
|
||||||
:downsample-rate 0.1
|
:downsample-rate 0.1
|
||||||
;:parent-selection :tournament
|
|
||||||
;:parent-selection :motley-batch-lexicase
|
|
||||||
;:max-batch-size [1 2 4 8 16 32 64 128 256]
|
|
||||||
;:tournament-size 5
|
|
||||||
:umad-rate 0.01
|
:umad-rate 0.01
|
||||||
;:ah-umad-min 0.01
|
:ah-umad-min 0.001
|
||||||
;:ah-umad-max 0.5
|
:ah-umad-max 0.5
|
||||||
;:ah-umad-mean 0.05
|
:ah-umad-mean 0.01
|
||||||
;:umad-rate [1/2
|
:variation {:ah-umad 0.9
|
||||||
; 1/4 1/4
|
:umad 0
|
||||||
; 1/8 1/8 1/8
|
:autoconstructive-crossover 0.1}
|
||||||
; 1/16 1/16 1/16 1/16
|
|
||||||
; 1/32 1/32 1/32 1/32 1/32
|
|
||||||
; 1/64 1/64 1/64 1/64 1/64 1/64
|
|
||||||
; 1/128 1/128 1/128 1/128 1/128 1/128 1/128
|
|
||||||
; 1/256 1/256 1/256 1/256 1/256 1/256 1/256 1/256]
|
|
||||||
;:alternation-rate [1 1/2 1/4 1/8 1/16 1/32 1/64 1/128 1/256]
|
|
||||||
;:alignment-deviation [0 1 2 4 8 16 32 64 128]
|
|
||||||
:variation {:ah-umad 0
|
|
||||||
:umad 0.5
|
|
||||||
:autoconstructive-crossover 0.5
|
|
||||||
:alternation 0
|
|
||||||
:reproduction 0
|
|
||||||
:tail-aligned-crossover 0}
|
|
||||||
;:replacement-rate 0.01
|
|
||||||
:elitism false
|
|
||||||
:single-thread-mode false
|
:single-thread-mode false
|
||||||
:autoconstructive-crossover-enrichment 10}
|
:autoconstructive-crossover-enrichment 10}
|
||||||
(apply hash-map (map #(if (string? %) (read-string %) %) args)))))
|
(apply hash-map (map #(if (string? %) (read-string %) %) args)))))
|
||||||
|
@ -33,9 +33,6 @@
|
|||||||
(assoc product-bits (keyword (str "c" bit-index)) this-bit)
|
(assoc product-bits (keyword (str "c" bit-index)) this-bit)
|
||||||
(- remainder (* (if this-bit 1 0) pow2))))))))
|
(- remainder (* (if this-bit 1 0) pow2))))))))
|
||||||
|
|
||||||
#_(target-function false true false false false true false false)
|
|
||||||
#_(target-function true true true true true true true true)
|
|
||||||
|
|
||||||
(def train-and-test-data
|
(def train-and-test-data
|
||||||
(let [bools [false true]]
|
(let [bools [false true]]
|
||||||
{:train (for [a3 bools
|
{:train (for [a3 bools
|
||||||
@ -60,12 +57,6 @@
|
|||||||
[:output :c7]
|
[:output :c7]
|
||||||
(state/peek-stack state :boolean)))))
|
(state/peek-stack state :boolean)))))
|
||||||
|
|
||||||
#_(interpreter/interpret-program
|
|
||||||
'(:set-c7) (assoc state/empty-state :output {:c7 :unset}) 1000)
|
|
||||||
|
|
||||||
#_(interpreter/interpret-program
|
|
||||||
'(true :set-c7) (assoc state/empty-state :output {:c7 :unset}) 1000)
|
|
||||||
|
|
||||||
(def-instruction
|
(def-instruction
|
||||||
:set-c6
|
:set-c6
|
||||||
^{:stacks [:boolean :output]}
|
^{:stacks [:boolean :output]}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user