https://github.com/johnberroa/ant-colony-optimization
A Python implementation of the Ant Colony Optimization algorithm for generating solutions to such problems as the Traveling Salesman Problem.
https://github.com/johnberroa/ant-colony-optimization
Last synced: 10 months ago
JSON representation
A Python implementation of the Ant Colony Optimization algorithm for generating solutions to such problems as the Traveling Salesman Problem.
- Host: GitHub
- URL: https://github.com/johnberroa/ant-colony-optimization
- Owner: johnberroa
- Created: 2018-10-10T17:13:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-08T22:39:03.000Z (over 7 years ago)
- Last Synced: 2025-04-12T08:45:47.000Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 93.8 KB
- Stars: 27
- Watchers: 0
- Forks: 18
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ant Colony Optimization
A Python implementation of the Ant Colony Optimization algorithm for generating solutions to such tasks as the Traveling Salesman Problem
## Example Usage
```python
problem = some_distance_matrix
optimizer = AntColonyOptimizer(ants=10, evaporation_rate=.1, intensification=2, alpha=1, beta=1,
beta_evaporation_rate=0, choose_best=.1)
best = optimizer.fit(problem, 100)
optimizer.plot()
```
## Example Plot

###### Now 20x faster than my first attempt!