Skip to content

Commit

Permalink
Sanity check Vector Distance
Browse files Browse the repository at this point in the history
  • Loading branch information
thelmuth committed Jan 4, 2021
1 parent 8d899f0 commit cd95858
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/clojush/problems/software/benchmarks_v2/vector_distance.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 11,23 @@

; Atom generators
(def vector-distance-atom-generators
(concat (list
;;; end constants
;;; end ERCs
(tag-instruction-erc [:integer :boolean :exec :float :vector_float] 1000)
(tagged-instruction-erc 1000)
;;; end tag ERCs
'in1
'in2
;;; end input instructions
)
(registered-for-stacks [:integer :boolean :exec :float :vector_float])))
(make-proportional-atom-generators
(concat
(registered-for-stacks [:integer :boolean :exec :float :vector_float])
(list (tag-instruction-erc [:integer :boolean :exec :float :vector_float] 1000) ; tags
(tagged-instruction-erc 1000)))
(list 'in1
'in2) ; inputs
(list []
0) ; constants
{:proportion-inputs 0.15
:proportion-constants 0.05}))

(defn vector-distance-input
"Makes a Vector Distance input vector of length len."
[len]
(vector (vec (repeatedly len #(- (* (rand) 200) 100))) (vec (repeatedly len #(- (* (rand) 200) 100)))))
(vector (vec (repeatedly len #(- (* (rand) 200) 100)))
(vec (repeatedly len #(- (* (rand) 200) 100)))))

;; A list of data domains for the problem. Each domain is a vector containing
;; a "set" of inputs and two integers representing how many cases from the set
Expand Down

0 comments on commit cd95858

Please sign in to comment.