   [code per-num-perturb-probability sd]
   (postwalklist (fn [item]
                   (if (and (float? item)
-                        (< (rand) per-num-perturb-probability))
+                        (< (lrand) per-num-perturb-probability))
                     (perturb-with-gaussian-noise sd item)
                     item))
     code))

  [tree]
  (if (seq? tree)
    (if (> (lrand) @global-node-selection-leaf-probability)
      (second (rand-nth (filter #(seq? (first %)) (map #(list %1 %2) (all-items tree) (iterate inc 0)))))
      (let [indexed-leaves (filter #(not (seq? (first %))) (map #(list %1 %2) (all-items tree) (iterate inc 0)))]
        (if (empty? indexed-leaves) 0 (second (rand-nth indexed-leaves)))))
    0))

(defn choose-node-index-by-tournament

             evalpush-limit evalpush-time-limit node-selection-method node-selection-leaf-probability
             node-selection-tournament-size pop-when-tagging gaussian-mutation-probability 
             gaussian-mutation-per-number-mutation-probability gaussian-mutation-standard-deviation
	     reuse-errors problem-specific-report use-single-thread random-seed]
      :or {error-function (fn [p] '(0)) ;; pgm -> list of errors (1 per case)
           error-threshold 0
           population-size 1000
           max-points 50
           atom-generators (concat @registered-instructions
                                   (list 
                                    (fn [] (lrand-int 100))
                                    (fn [] (lrand))))
           max-generations 1001
           mutation-probability 0.4
           mutation-max-points 20
