/Genetic-Algorithm

Object Oriented Solution to the famous Traveling Salesman Problem in Java

Primary LanguageJava

Genetic-Algorithm

Object Oriented Solution to the famous Traveling Salesman Problem in Java Aimed to support every TSP File (Note: As of may 27th, its not finished yet)

Introduction

Made specially for my Computer Science Class (Algorithmen und Datenstrukturen/Algorithm and Datastructures) Designed to not just run one specific .tsp file but every one of them (by tweaking the code a little bit) Currently only in german, once its done i will translate everything in english too

What is the Traveling Salesman Problem? Wikipedia states as following:

The travelling salesman problem (also called the travelling salesperson problem or 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?

I chose to solve the problem through OOP because it was easier to visualize

How to Use

Currently, there are a couple of steps to do before the code runs

  1. Download any tsp file and just rename it to txt, copy it into the folder
  2. At the top of main.java, there are 5 codes you may not change. One line however is marked as a comment, but needs to be active on the first time you run the code (to initialize) Once the abstand.txt (distance) file has been created the line can be commented again to save resources.
  3. %%% Not finished yet

Issues

Please help this lil project by finding any bugs/problems etc