/ant-colony-optimization

Simple implementation of Ant Colony Optimization algorithm written in python3

Primary LanguagePythonMIT LicenseMIT

Ant Colony Optimization

Simple implementation of Ant Colony Optimization algorithm written in python3. Ant Colony Optimization is a probabilistic technique for solving computational problems which can be reduced to finding good paths through graphs.

Getting Started

Prerequisites

  • Install Numpy
pip install numpy
  • Generate your matrix. See distance_matrix.txt for example. To generate random distance matrix run:
from aco import gen_matrix
matrix = gen_matrix(40)
np.savetxt('distance_matrix.txt', matrix, fmt='%g', delimiter=' ')
  • Tweak constants in aco.py
  • Run
python aco.py

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details