Research Article

A Hybrid Cellular Genetic Algorithm for the Traveling Salesman Problem

Algorithm 6

The pseudocode for genetic operations.
Genetic operations
Begin
 Input: An n-th order square matrix N composed of 0 and 1, cellular space,
 city coordinates: ,
 Calculate the total distance of each individual in the cellular space by Equation (2)
 for i = 1 to n2
  if
   Select the ith individual and the individual with smallest total distance among the 8 neighbors
   Crossover
   Mutation
   New the ith individual
  End if
 End for
 Output: New cellular space
End