I’m using a genetic algorithm (GA) to optimise a traveling salesman problem (TSP). My problem is how I calculate the fitness of an individual.
Obviously solutions with shorter routes are fitter but how exactly do I assign a fitness value without knowing what the shortest possible route and longest possible route is to determine where my solution fits in that range?
I’m using a genetic algorithm (GA) to optimise a traveling salesman problem (TSP). My
Share
Having fitness equals to path length is fine. Keep in mind that in genetic algorithms the fitness is only used for selecting individuals: consequently with usual selection procedures the scale does not matter, only the rank does.
Examples of implementation:
More subtleties (2001 – Swarm Intelligence – Kennedy & Eberhart – page 249):