Giter VIP home page Giter VIP logo

ea_tsp's Introduction

How to solve TSP?

Implementation of Evolutionary Algorithm to solve famous Travelling Salesman Problem.

The code:

  • was written for Genetic Algorithms and Evolutionary Computing course at KU Leuven, 2020.
  • was considered among Top-15% best implementations for the competition among ~100 students.
  • was implemented to solve large TSP tasks (~1000 cities) within 5 minutes timeframe.

The full project report containing the details of implementation, comparison of results with respect to greedy heuristic solutions, and possible modifications can be accessed in report.pdf file. Implementation was initially constrained only to a single python file to allow for comparison on unseen datasets with respect to other students.

Directory tree

data
   |-- tour100.csv
   |-- tour29.csv
result
   |-- tsp_result.csv
solver
   |-- Reporter.py
   |-- solver.py
main.py
report.pdf

Directory content

  • data - directory containing two example datasets which include 29 and 100 cities.
  • solver - directory containing EA implementation and Reporter class.
  • result - directory containing solutions.

Requirements

numpy-1.19.2
python-3.7.10

Usage

After you clone this repo, go to its root directory and start the algorithm for one of the example datasets:

python main.py

ea_tsp's People

Contributors

esvazas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.