liveBook · Manning

Adjacent swap mutation

As explained in Advanced Algorithms and Data Structures

Adjacent swap mutation modifies a tour by swapping vertices that are adjacent in the representation.

Adjacent swap mutation modifies a TSP tour by exchanging vertices that are next to each other in its representation. It is a small-range local-search operator used within mutation. section 18.2.4

Its practical trade-offs are:

  • It makes only a local change, so escaping local minima is harder than with mutation that swaps random vertex pairs. section 18.2.4
  • Experiments vary adjacent-swap probability alongside crossover and random-swap probability, measuring the resulting average tour cost. section 18.2.4

TSP mutation comparison

Mutation using adjacent swaps eventually plateaus more than the more effective random-pair mutation in the reported TSP experiments. section 18.2.4

Figure 18.16 How TSP population evolves when only mutations versus only crossover are enabled. Crossover-only evolution plateaus soon enough, while the mutation operator swapping random pairs is the most successful. On the x axis, there is the number of generations, while on the y axis is the cost of the tour.

Compare how mutation-only and crossover-only TSP populations evolve across generations and tour cost. section 18.2.4

How Advanced Algorithms and Data Structures covers it

How deep it goes
Explains the operator’s local-search behavior and performance trade-off, but does not detail implementation pseudocode.
Examples
Uses TSP evolution charts and operator-probability experiments reporting average best tour costs.
What it assumes
Assumes a tour representation and familiarity with TSP mutation and genetic-algorithm operators.
What you can do after
Apply it as a local mutation operator when optimizing a TSP tour.
How it connects
Connects TSP tours with genetic algorithms, mutation, crossover, random-swap mutation, and local minima.

This explainer was generated by Manning's knowledge graph from the text of Advanced Algorithms and Data Structures. The section links point to the parts of the book it draws on.