Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lazocoder/ant-colony-optimization-for-the-traveling-salesman-problem
A population based stochastic algorithm for solving the Traveling Salesman Problem.
https://github.com/lazocoder/ant-colony-optimization-for-the-traveling-salesman-problem
aco ant ant-colony-optimization traveling-salesman tsp
Last synced: 3 months ago
JSON representation
A population based stochastic algorithm for solving the Traveling Salesman Problem.
- Host: GitHub
- URL: https://github.com/lazocoder/ant-colony-optimization-for-the-traveling-salesman-problem
- Owner: LazoCoder
- Created: 2017-02-11T03:24:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-14T04:48:49.000Z (almost 8 years ago)
- Last Synced: 2023-03-08T10:27:49.139Z (almost 2 years ago)
- Topics: aco, ant, ant-colony-optimization, traveling-salesman, tsp
- Language: Java
- Size: 52.7 KB
- Stars: 21
- Watchers: 1
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ant-Colony-Optimization-for-the-Traveling-Salesman-Problem
A population based stochastic algorithm for solving the Traveling Salesman Problem.![alt-tag](Sample/sample_run.gif)
Output:
```
Mac:AntColonyTSP Laki$ java Main
------------------ANT COLONY OPTIMIZATION------------------
Use the parameter '-p' for custom settings.
Otherwise the default values will be:
Ants per epoch: 100
Epochs: 100
Evaporation Rate: 0.1
Alpha (pheromone impact): 1
Beta (distance impact): 5
Best Tour: 20 -> 10 -> 4 -> 15 -> 14 -> 18 -> 17 -> 22 -> 11 -> 19 -> 25 -> 7 -> 23 -> 27 -> 8 -> 24 -> 16 -> 13 -> 1 -> 28 -> 6 -> 12 -> 9 -> 5 -> 21 -> 2 -> 29 -> 26 -> 3 -> 20
Evaluation: 9566
-------------------------COMPLETE--------------------------
```## Usage
Navigate to the folder containing Main.class.
To run it with the default parameters:
```
java Main
```
To run it with custom parameters:
```
java Main -p
```