https://github.com/thomasjungblut/antcolonyopt
Ant Colony Optimization for TSP problems
https://github.com/thomasjungblut/antcolonyopt
Last synced: 2 months ago
JSON representation
Ant Colony Optimization for TSP problems
- Host: GitHub
- URL: https://github.com/thomasjungblut/antcolonyopt
- Owner: thomasjungblut
- License: apache-2.0
- Created: 2015-03-13T22:35:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-17T16:16:41.000Z (over 10 years ago)
- Last Synced: 2025-04-15T05:52:19.104Z (2 months ago)
- Language: Java
- Homepage: https://blog.thomasjungblut.com/
- Size: 172 KB
- Stars: 8
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ant Colony Optimization for TSP problems
This repository contains an implementation for solving TSP problems with the famous meta-heuristics ACO (Ant Colony Optimization).
It runs several agents (Ants) through a weighted random walk until it converges to a (hopefully) good minimum.This features a fully multi-threaded (and lock-free) implementation of ACO and contains a GridSearch to optimize the hyper parameters for a problem.
The repository includes the Berlin52 problem, but can be adapted to virtually every TSP file [from the University of Heidelberg's TSP group](http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95/tsp/).The throughput on my machine (i7-5820k @ 3.3ghz and ddr4 RAM) is roughly 13 agents per millisecond (or ~1 agent per logical core per millisecond) and it scales linearly with more cores.
For more details, consult [Wikipedia](http://en.wikipedia.org/wiki/Ant_colony_optimization_algorithms) or [my blog post from 2011](http://codingwiththomas.blogspot.co.uk/2011/08/ant-colony-optimization-for-tsp.html).
Initially this was a prototype for a paper in Software Engineering (second semester undergraduation).
Since Google Code closed it's gates, I decided to rewrite major parts and port it to Java 8- although for the most part, it should work with Java 6 without major modifications.Build
-----To build locally, you will need at least Java 8 to build this library.
You can simply build with:
> mvn clean package installThe created jars contains debuggable code + sources.