Reproduction


\begin{algorithmic}
{\sffamily\mdseries\upshape
\STATE Randomly pick a solution ...
...and swap their position
\STATE Return the newly created path
}
\end{algorithmic}

Notice that no verification is done on the validity of the newly created path. The fact that the population may contain invalid solutions implies a slight modification to the genetic algorithm: when the maximum number of generations is reached an additional test has to be done: the path to be returned as a result must be the shortest valid path within the population.



Dominik Zindel 2007-07-04