This project solves the Shortest Path Problem using Ant Colony Optimization algorithm.
- Download the entire project
- Extract the files
- Open the index.html file
- Create Nodes by clicking on the canvas [The first node is the source node]
- Enter Weights between each nodes
- Set the following parameters :
- Destination Node (by default 1)
- Number of Ants (by default 10)
- Pheromone Rate (by default 50)
- Evaporation Rate (by default 20%)
- To run the algorithm continuously, click Run Algorithm
- To run the algorithm one iteration at a time, click Step by step
The path with the most prominent shade of red is the shortest path
You can modify the Pheromone Rate and Evaporation Rate parameters while the algorithm is running to see the corresponding changes on the canvas
p5.js
M. Dorigo and T. Stützle, Ant Colony Optimization, The MIT Press, Cambridge, 2004