Imagine a salesman who needs to visit multiple cities. The goal is to find the shortest possible route that visits each city exactly once and returns to the starting city. This is known as the Travelling Salesman Problem (TSP).
This app uses a genetic algorithm to approximate a solution to the TSP. Genetic algorithms are inspired by natural selection. They work by creating a population of random solutions, evaluating their fitness (in this case, the total distance of the route), and then breeding new solutions based on the best-performing ones.
You can customize the simulation using the following parameters:
By adjusting these parameters, you can experiment with different conditions and observe how the genetic algorithm finds solutions.
This video is a good introduction: Genetic Algorithms Explained By Example - Kie Codes
© Dan Tait - dotslashdan.com