kamil271e / double-tsp

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

Greedy reconstruction for degenerated cycles #39

Closed kamil271e closed 3 months ago

kamil271e commented 3 months ago

In this issue, I propose a specific solution to the reconstruction challenge that arises during the implementation of evolutionary algorithms.

The idea is outlined as follows:

Following certain perturbation operations (or their equivalent in genetic programming), the vector typically containing all vertices within a circle would be divided into what we'll refer to as "paths." Each path would consist of a vector with a minimum size of 2 (or possibly 1, depending on further considerations) - representing the initial cycle. Subsequently, we would iteratively apply the nearest neighbor heuristic to each path, attaching the closest vertex to the given path. If a vertex is already assigned to a different path (associated with the appropriate cycle), the paths would be combined to form a new, longer path. This iterative process would continue until both cycles are fully reconstructed.