CROSSOVER
;;; In CROSSOVER we assume that PATH1 and PATH2
;;; are of the same length.
(defun crossover (individual1 individual2)
"Returns a new path resulting from
genetic crossover of PATH1 and PATH2.”
(let* ((path1 (get-path individual1))
(path2 (get-path individual2))
(where (random (length path1))) )
(cons (append (left-part path1 where)
(right-part path2 where) )