Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crossover operation in genetic algorithm for TSP

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 I perform the crossover operation over my genomes?

Where can I find implementations of my problem in C#?

like image 288
AndreyAkinshin Avatar asked Oct 09 '09 14:10

AndreyAkinshin


People also ask

What is the best algorithm to solve TSP?

To solve the TSP using the Brute-Force approach, you must calculate the total number of routes and then draw and list all the possible routes. Calculate the distance of each route and then choose the shortest one—this is the optimal solution. This method breaks a problem to be solved into several sub-problems.

What is crossover operator in genetic algorithm?

In genetic algorithms and evolutionary computation, crossover, also called recombination, is a genetic operator used to combine the genetic information of two parents to generate new offspring.

How does genetic algorithm solve TSP?

Genetic Algorithm which is a very good local search algorithm is employed to solve the TSP by generating a preset number of random tours and then improving the population until a stop condition is satisfied and the best chromosome which is a tour is returned as the solution.

What are different types of crossover in genetic algorithm?

Crossover operators can be classified into three types, asexual, sexual and multi-recombination. Asexual means that an offspring is generated from one parent, Sexual means two parents produce one or two children, and then Multi-Recombination where more than two parents are used to produce one or more offspring.


1 Answers

You should check "Genetic Algorithm Solution of the TSP Avoiding Special Crossover and Mutation" by Gokturk Ucoluk. It gives an overview of the special crossover operators for permutations and proposes a clever representation of permutations that works well with standard crossover (i.e. crossing over two permutations always produces two permutations).

The key insight is to represent the permutation as its inversion sequence, i.e. for each element i, store in a[i] how many elements larger than i are to the left of i in the permutation. Unlike the direct representation, the only constraint on a[i] is local, i.e. a[i] cannot be larger than N - i. This means that simple crossover of two valid inversion sequences always produces two valid inversion sequences - no need for special handling of repeating elements.

like image 176
Rafał Dowgird Avatar answered Sep 18 '22 18:09

Rafał Dowgird