kamil271e / double-tsp

Assorted heuristics for solving a modified Traveling Salesperson Problem (TSP) combinatorial challenge.
0 stars 1 forks source link

Implementing a simple version of the recombination algorithm #42

Closed unbreaking-V closed 4 months ago

unbreaking-V commented 4 months ago

Recombination Algorithm:

  1. Take two random parents
  2. Find edges that do not occur in the second parent
  3. Remove them from the cycle, also remove the vertices that have no more edges from the cycle
  4. Connect the remaining vertices, which occur in both parents, to each other
  5. Apply the regret or nearest neighbor algorithm to restore the cycle