 
 
 (def gcd-training-cases
-  "Produces a random sample of 100 training cases: some cases where the integer arguments are identical, some pairs of moderate integers (~10000) with nontrivial GCD values, some pairs of large integers (~10^8) with nontrivial GCD values, and some pairs of coprime integers with GCD=1"
+  "Produces a random sample of training cases: some cases where the integer arguments are identical, some pairs of moderate integers (~10000) with nontrivial GCD values, some pairs of large integers (~10^8) with nontrivial GCD values, some Very Large pairs, and some pairs of coprime integers with GCD=1"
   (into []
     (concat
       (repeatedly 5 #(identical-case (product-of-n-d-sided-dice 20 7)))
-      (repeatedly 30 #(nontrivial-gcd-training-case 7 7))
-      (repeatedly 50 #(nontrivial-gcd-training-case 20 7))
-      (repeatedly 15
-        #(gcd-coprime-case (product-of-n-d-sided-dice 7 7)))
+      (repeatedly 40 #(nontrivial-gcd-training-case 7 7))
+      (repeatedly 30 #(nontrivial-gcd-training-case 20 7))
+      (repeatedly 20 #(nontrivial-gcd-training-case 20 11))
+      (repeatedly 5
+        #(gcd-coprime-case (product-of-n-d-sided-dice 20 7)))
         )))
 
 

(def argmap
  "I literally have no idea what many of these things do. However, with the current settings, the first run I attempted did solve the problem to my satisfaction. YMMV."
  {:error-function (fn [individual]
                      (gcd-error-function
                        individual
                        gcd-training-cases
                        ))
   :atom-generators gcd-atom-generators
   :max-points 2000
   :max-genome-size-in-initial-program 500
   :evalpush-limit 2000
   :population-size 400
   :max-generations 5000
   :parent-selection :lexicase
   :genetic-operator-probabilities {:uniform-addition-and-deletion 0.5
                                    :alternation 0.5}
   :uniform-addition-and-deletion-rate [0.001 0.01 0.1]
   :alternation-rate [0.001 0.01 0.1]
   :alignment-deviation [0 1 10 100]
   :report-simplifications 0
   :final-report-simplifications 5000
   })

;; An evolved solution (simplified):
;;
;; (in2 in1 integer_mod in1 in1 integer_dup_items integer_mod integer_mod 53 integer_dup_items in1 integer_mod in2 integer_mod integer_mod 2 integer_dup_items integer_mod integer_swap 2 integer_dup_items integer_dec integer_dec integer_mod integer_swap 2 integer_dup_items 2 integer_dup_items integer_mod integer_mod 2 integer_dup_items integer_mod 2 integer_dup_items integer_mod integer_swap 2 integer_dup_items integer_dec integer_dec integer_mod integer_mod 2 integer_dup_items integer_mod 2 integer_dup_items integer_mod integer_swap 2 integer_dup_items integer_dec integer_dec integer_mod integer_mod 2 integer_dup_items integer_mod 2 integer_dup_items integer_mod 2 integer_dup_items integer_mod exec_dup_times ())

;; gcd.clj
;; Bill Tozier, bill@vagueinnovation.com
;; updated February 24, 2020
;;
;; This is code for finding algorithms which return the greatest common
;;   divisor (GCD) of a pair of integer arguments. See the Wikipedia
