I\'m trying to solve the Travelling Salesman Problem (TSP) with Genetic algorithm. My genome is a permutation of a vertex in graph (path for salesman).
How should
"Crossover" in genetic algorithms just refers to an arbitrary way of mixing two "genetic sequences", each of which represents a particular solution to a problem (how a sequence maps to a solution is up to you). So, for example, say you have a population that consists of the following two sequences:
AAAAAAAAAA
BBBBBBBBBB
One way to recombine these two "parent" sequences is to randomly pick a crossover point (say, position 3), resulting in these two "child" sequences:
AAABBBBBBB
BBBAAAAAAA
Or, you could randomly pick two crossover points (say, 3 and 8), resulting in these two sequences:
AAABBBBBAA
BBBAAAAABB
For fun and extra variability, you can also introduce the possibility of occasional point mutations:
AAABBBABAA
BBBAAAAABB
There aren't really any hard-and-fast rules regarding how you implement crossover in a genetic algorithm, just as there aren't really any hard-and-fast rules governing Evolution in the biological world. Whatever works, works.