I read various things about this and understood the principle and concepts, however, none of the documents does not mention detailed information on how to calculate the suitability of a chromosome (which is a route) with the participation of neighboring cities (in the chromosome) that are not directly connected by an edge (on the chart).
For example, given chromosome 1 | 3 | 2 | 8 | 4 | 5 | 6 | 7, in which each gene represents the city index on the graph / map, how we calculate its suitability (i.e., the total sum of the distances traveled), if, say, there is no straight edge / connection between cities 2 and 8. We monitor what then a greedy algorithm for developing a route between 2 and 8 and add the distance from this route to the total?
This problem seems quite common when applying GA to TSP. Anyone who has done this before sharing their experiences. Thank you
source
share