How to use Put random points by clicking on the canvas below. Then click the Calculate button to compute a solution to the Traveling Salesman Problem.
Information

This single page application allows you to interactively add points on the canvas by clicking in the rectangle. Once a set of points is defined, you can click the Calculate button to compute a solution to the Traveling Salesman Problem.

The solver implements a Biased Random Key Genetic Algorithm. Algoritm parameters are hardcoded in the source code. The population size is 100, the elite set size is 20, the mutant (random) set is 10, uniform crossover with bias 0.7 is used. The number of generations is set to 1000.

This single page application was implemented in Scala 3 and compiled to JavaScript using Scala.js. The source code is available on https://github.com/jbytecode/brkga.scalajs , by Mehmet Hakan Satman, April 2026.