This Java project implements various algorithms to solve the Traveling Salesman Problem (TSP), including Random Solution, Nearest Neighbor (End and Any Position), and Greedy Cycle. Node data (coordinates and costs) are read from a CSV file.
lab1
├── Main1.java
├── Main2.java
├── tsp
│ ├── RandomSolution.java
│ ├── NearestNeighborEnd.java
│ ├── NearestNeighborAnyPosition.java
│ ├── GreedyCycle.java
| ├── Greedy2Regret.java
│ └── GreedyWeighted.java
└── util
│ ├── CSVReader.java
│ └── DistanceMatrix.java
└── output
├── best_paths.csv
├── destance_matrix.csv
└── results.csv
- JDK 8 or higher
-
Clone the repository:
git clone https://github.com/senketsutsu/Evolutionary-computation.git -
Run Main.java to execute the algorithms. The output will display each algorithm's minimum, maximum, and average costs.