anchor.diff:        (quote tree))))
   
   (defun replace-subtree (tree nth-list replacement)
  +  "Replaces one subtree with another, using the
  +  generated nth-list."
     (if (and (is-tree (cdr tree)) nth-list replacement)
       (macrolet
         ((macro-nth (atree list-nth)
  
positive.code: ;; Pranav Ravichandran <me@onloop.net>
  
  (defun get-arity (primitive-alist func)
    (cadr (assoc func primitive-alist)))
  
  (defun pick-random (inlist)
    (nth (random (length inlist)) inlist))
  
  (defun generate-program-tree (primitive-alist action-list conditional-list max-tree-depth)
    (let* ((toss (fair-coin 50))
           (toss2 (fair-coin 50))
           (pick (if toss
  
negative.code:     tree))
  
  (defun crossover (mother father)
    "Picks a random subtree from the father and the mother,
    and replaces the subtree of the mother with the subtree
    of the father."
    (let* ((father-st (pick-random-subtree father))
           (mother-st-acc (pick-random-subtree mother father-st))
           (mother-st (replace-subtree mother mother-st-acc father-st)))
      mother-st))
  
  (defun copy-population (fitness-alist &optional (percentage 10) (program-count 7))
    "Copies a set of programs directly from one generation to another."
    (loop for s-count upto (* (length fitness-alist) (/ percentage 100)) collect
          (tournament-selection fitness-alist program-count)))
  
  (defun crossover-population (fitness-alist &optional (percentage 90) (program-count 7))
    "Copies a set of programs from one generation to another using crossovers."
    (loop for s-count upto (* (length fitness-alist) (/ percentage 100)) collect
          (let ((mother (tournament-selection fitness-alist program-count))
                (father (tournament-selection fitness-alist program-count)))
  