 ; Define the argmap
 (def argmap
   {:error-function (make-shopping-list-error-function-from-cases (first shopping-list-train-and-test-cases)
-                                                                   (second shopping-list-train-and-test-cases))
+                                                                 (second shopping-list-train-and-test-cases))
    :atom-generators shopping-list-atom-generators
    :max-points 2000
    :max-genome-size-in-initial-program 250

;; random element of the set.
(def shopping-list-data-domains
  [[(list [[50.00] [100.00]]
          [[5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73 5.73]
          [59.19 91.24 25.93 16.18 24.65 61.96 67.91 43.87 36.23 34.30 96.27 69.25 73.78 0.52 8.91 39.18 79.67 64.22 14.15 52.44]]
          [[25.43 43.22 23.42 42.09 25.70] [0.00 0.00 0.00 0.00 0.00]]
          [[0.01 0.01 0.01 0.01 0.01 0.01 0.01] [85.77 43.99 22.78 34.14 34.12 8.54 11.03]]
          [[9.99 9.99 9.99 9.99 9.99 9.99 9.99 9.99 9.99 9.99] [33.65 33.65 33.65 33.65 33.65 33.65 33.65 33.65 33.65 33.65]]) 5 0]
   [(fn [] (shopping-list-input (inc (lrand-int 20)))) 195 2000]
   ])

;;Can make Shopping List test data like this:


; Atom generators
(def shopping-list-atom-generators
  (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.0
         100.0
         (fn [] (* (lrand) 100)) ; float ERC [0, 100]
         ) ; constants
   {:proportion-inputs 0.15
    :proportion-constants 0.05}))

(defn shopping-list-input
  "Makes a Shopping List input vector of length len."
  [len]
  (vector (vec (repeatedly len #(round-to-n-decimal-places (* (rand) 50) 2)))
          (vec (repeatedly len #(round-to-n-decimal-places (* (rand) 100) 2)))))

;; 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
