/TSP-with-Genetic-Algorithm

Desktop application built with PySide6 to solve the Traveling Salesman Problem (TSP) using a Genetic Algorithm

Primary LanguagePythonMIT LicenseMIT

Traveling Salesman Problem Solver

Table of Contents

Overview

This desktop application is built with PySide6 to solve the Traveling Salesman Problem (TSP) using a Genetic Algorithm. The app provides an intuitive interface for users to input their data and find an optimal solution to the TSP.

Features

  • Genetic Algorithm: The app employs a Genetic Algorithm to find an optimal solution to the TSP.
  • Interactive Interface: Users can easily input their TSP data and visualize the results through the interactive graphical interface.
  • Configurable Parameters: The Genetic Algorithm parameters are configurable, allowing users to experiment with different settings.
  • Result Visualization: The app displays the optimized route and relevant statistics to help users understand the solution.

Screenshots

Screenshot 1

Screenshot 2

Screenshot 3

Installation

Prerequisites

Steps

  1. Clone the repository:

    git clone https://github.com/Alibakhshov/TSP-with-Genetic-Algorithm.git
  2. Navigate to the project directory:

    cd TSP-with-Genetic-Algorithm
  3. Install the required dependencies:

    pip install -r requirements.txt

Usage

  1. Run the application:

    python main.py
  2. Choose the matrix size and click on the "Ok" button to generate a random distance matrix.

  3. Input the matrix values and select the starting node.

  4. Click on the "Run" button to start the Genetic Algorithm.

Contributing

If you'd like to contribute to this project, please follow the Contribution Guidelines.

License

This project is licensed under the MIT License.