Skip to content
/ raco Public

Visualizing Traveling Salesman Problem solutions

License

Notifications You must be signed in to change notification settings

fesmjke/raco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raco - is application to visualize a TSP solving algorithms

General

The travelling salesman problem (TSP) asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?".

About the project

This project is primarily focused on tackling the traveling salesman problem (TSP) through the application of ant colony optimization, while also providing visualizations of the problem-solving process.

However, it has expanded its scope to encompass a broader investigation into various algorithms and optimizations related to the TSP.

As a result, the project has evolved into a comprehensive collection of different algorithms and optimizations, all aimed at visualizing and addressing the challenges posed by the TSP.

What is used in this project

  • Rust
  • raylib-rs is a Rust binding for raylib 3.5.

Installation and usage

Before usage make sure that you have installed CMake

  1. Download project:

git clone https://github.com/fesmjke/raco.git

  1. Build project:

cargo build

This will install dependencies and build raylib (using CMake).

  1. Start application:

cargo run

Todo

  • Solutions:
    • Exact algorithm:
      • Brute-Force
    • Approximation algorithm:
      • Nearest Neighbor (NN)
      • Christofides algorithm
    • Simulation:
      • Simulated annealing
      • Ant colony optimization
    • Optimization:
      • Random swapping
      • 2-opt improvement
      • k-opt improvement

Examples

Nearest Neighbor

Nearest Neighbor algorithm example

Ant colony optimization

Ant colony optimization algorithm example

Note

Code in this project is not optimal and may be buggy

About

Visualizing Traveling Salesman Problem solutions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages