Skip to content

Uses Ant Colony Optimization to solve the shortest path problem

Notifications You must be signed in to change notification settings

AnirbanMukherjeeXD/ant-colony-optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ant Colony Optimization

This project solves the Shortest Path Problem using Ant Colony Optimization algorithm.

Usage

Launching

  • Download the entire project
  • Extract the files
  • Open the index.html file

OR
Open this link

Setup

  • 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%)

Algorithm

  • To run the algorithm continuously, click Run Algorithm
  • To run the algorithm one iteration at a time, click Step by step

Result

The path with the most prominent shade of red is the shortest path

Modify parameters

You can modify the Pheromone Rate and Evaporation Rate parameters while the algorithm is running to see the corresponding changes on the canvas

Technology

p5.js

Reference

M. Dorigo and T. Stützle, Ant Colony Optimization, The MIT Press, Cambridge, 2004

About

Uses Ant Colony Optimization to solve the shortest path problem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published