makefinks / travelingSalesMan-genetic-Algorithm

Repository from Github https://github.commakefinks/travelingSalesMan-genetic-AlgorithmRepository from Github https://github.commakefinks/travelingSalesMan-genetic-Algorithm

Genetic Algorithm TSP Problem

Algorithm

A genetic algorithm is used to determine the shortest route that uses all available nodes.

In each generation the fitness of each route is rated and the generation is sorted accordingly. The Elite, the routes with the highest fitness, are used as parents to make children with similar routes. Depending on the probability of mutation, a copy of a child is added that differs from its origin by 2 nodes. (mutation)

Visualisation

Bildschirmfoto 2022-10-06 um 15 19 22

Best route:     White
Best route Generation zero: Gray
Yellow graph: fitness history

About


Languages

Language:Java 100.0%