Skip to content

crylent/AI_TSP

Repository files navigation

Travelling Salesman Solver

My practical work on Basics of AI. This program can find the shortest closed loop in the user-defined graph using Ant Colony Optimization or Simulated Annealing algorithm.

Examples

ACO example SA example

Usage

Click anywhere on the canvas to add a node. After you placed multiple nodes, you can connect any pair of them by clicking one and then another. You will be prompted to enter length of the path.

To remove any node, right click it and choose the "Remove Node" option. To change length of any path, left click it.

When graph is finished, choose "Ant Colony Optimization" or "Simulated Annealing", edit parameters if need and click "Start Optimization". Program will build and display the best found closed loop (if it exists) and its length.

You can save your graph as .gnw file and use it later.