   (println @penn-fitness-cases)
   (println ";;******************************"))
 
+(defn cycle-to-longest
+  [& sequences]
+  (let [max-count (apply max (map count sequences))]
+    (vec (apply concat (map #(take max-count (cycle %)) sequences)))))
+
 (def penn-atom-generators
-  (vec (concat (distinct (mapv :target (:all-train @penn-fitness-cases))) ;; classes, for output
-               (list (tag-instruction-erc [:exec :integer :float :boolean :string] 1000)
-                     (tagged-instruction-erc 1000)
-                     (fn [] (lrand-int 1000))
-                     (fn [] (lrand 1)))
-               (for [n (map inc 
-                            (range (count (:inputs (first (:train @penn-fitness-cases))))))]
-                 (symbol (str "in" n)))
-               (registered-for-stacks [:exec :integer :float :boolean :string]))))
+  (cycle-to-longest (concat (distinct (mapv :target (:all-train @penn-fitness-cases))) ;; classes, for output
+                            (list (tag-instruction-erc [:exec :integer :float :boolean :string] 1000)
+                                  (tagged-instruction-erc 1000)
+                                  (fn [] (lrand-int 1000))
+                                  (fn [] (lrand 1))))
+                    (for [n (map inc 
+                                 (range (count (:inputs (first (:train @penn-fitness-cases))))))]
+                      (symbol (str "in" n)))
+                    (registered-for-stacks [:exec :integer :float :boolean :string])))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Main call

    (println "Total number of data lines:" (count lines))
    (mapv #(mapv read-string %) lines)))

(def training-proportion 0.5) ;; proportion of training cases to use each generation

(defn define-fitness-cases
  "Returns a map with two keys: train and test. Train maps to a

   ;                                 ;*** [:alternation :uniform-mutation] 0.4
   ;                                 :genesis 0.1 ;***
   ;                                 }
   ;:genetic-operator-probabilities {:uniform-addition-and-deletion 0.45
   ;                                 :uniform-combination-and-deletion 0.45
   ;                                 :genesis 0.1}
   :genetic-operator-probabilities {:uniform-addition-and-deletion 0.9
                                    :uniform-combination-and-deletion 0.1}
   :uniform-addition-and-deletion-rate [0.1 0.01] ;[1/16 1/32 1/64 1/128]
   :uniform-combination-and-deletion-rate 1 ;[1 1/2 1/4 1/8]
   :alternation-rate 0.01
   :alignment-deviation 10
   :uniform-mutation-rate 0.01
