AntColonyTsp
Ant colony to solve travelling salesman
Installation
Add this line to your application's Gemfile:
gem 'ant_colony_tsp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ant_colony_tsp
Usage
AntColonyTsp::AntColonyTsp.new.search([[565,575],[25,185]], 100, 10, 0.1, 2.5, 0.1, 0.9)
100 - max iterations
10 - number of ants
0.1 - decay
2.5 - heur
0.1 - local pheromone
0.9 - greedy
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request