Introduction To Ant Colony Optimization - GeeksforGeeks
Introduction To Ant Colony Optimization - GeeksforGeeks
Background:
▲
Open In App
Ant Colony Optimization technique is purely inspired from the foraging
behaviour of ant colonies, first introduced by Marco Dorigo in the 1990s.
Ants are eusocial insects that prefer community survival and sustaining
rather than as individual species. They communicate with each other
using sound, touch and pheromone. Pheromones are organic chemical
compounds secreted by the ants that trigger a social response in
members of same species. These are chemicals capable of acting like
hormones outside the body of the secreting individual, to impact the
behaviour of the receiving individuals. Since most ants live on the ground,
they use the soil surface to leave pheromone trails that may be followed
(smelled) by other ants.
Ants live in community nests and the underlying principle of ACO is to
observe the movement of the ants from their nests in order to search for
food in the shortest possible path. Initially, ants start to move randomly in
search of food around their nests. This randomized search opens up
multiple routes from the nest to the food source. Now, based on the
quality and quantity of the food, ants carry a portion of the food back with
necessary pheromone concentration on its return path. Depending on
these pheromone trials, the probability of selection of a specific path by
the following ants would be a guiding factor to the food source. Evidently,
this probability is based on the concentration as well as the rate of
evaporation of pheromone. It can also be observed that since the
evaporation rate of pheromone is also a deciding factor, the length of
each path can easily be accounted for.
Open In App
In the above figure, for simplicity, only two possible paths have been
considered between the food source and the ant nest. The stages can be
analyzed as follows:
1. Stage 1: All ants are in their nest. There is no pheromone content in the
environment. (For algorithmic design, residual pheromone amount can
be considered without interfering with the probability)
2. Stage 2: Ants begin their search with equal (0.5 each) probability along
each path. Clearly, the curved path is the longer and hence the time
taken by ants to reach food source is greater than the other.
3. Stage 3: The ants through the shorter path reaches food source earlier.
Now, evidently they face with a similar selection dilemma, but this time
due to pheromone trail along the shorter path already available,
probability of selection is higher.
4. Stage 4: More ants return via the shorter path and subsequently the
pheromone concentrations also increase. Moreover, due to
evaporation, the pheromone concentration in the longer path reduces,
decreasing the probability of selection of this path in further stages.
Therefore, the whole colony gradually uses the shorter path in higher
probabilities. So, path optimization is attained.
At each iteration, all ants are placed at source vertex Vs (ant colony).
Subsequently, ants move from Vs to Vd (food source) following step 1.
Next, all ants conduct their return trip and reinforce their chosen path
based on step 2.
Pseudocode:
Procedure AntColonyOptimization:
Initialize necessary parameters and pheromone trials;
while not termination do:
Generate ant population;
Calculate fitness values associated with each ant;
Find best solution through selection methods;
Update pheromone trial;
end while
end procedure
References:
https://www.ics.uci.edu/~welling/teaching/271fall09/antcolonyopt.pdf
Open In App
Are you passionate about data and looking to make one giant leap into
your career? Our Data Science Course will help you change your game
and, most importantly, allow students, professionals, and working adults
to tide over into the data science immersion. Master state-of-the-art
methodologies, powerful tools, and industry best practices, hands-on
projects, and real-world applications. Become the executive head of
industries related to Data Analysis, Machine Learning, and Data
Visualization with these growing skills. Ready to Transform Your Future?
Enroll Now to Be a Data Science Expert!
Similar Reads
Open In App
Multivariate Optimization - Gradient and Hessian
In a multivariate optimization problem, there are multiple variables that act
as decision variables in the optimization problem. z = f(x1, x2, x3.....xn) So,…
3 min read
Article Tags :
Company Explore
About Us Job-A-Thon Hiring Challenge
Legal Hack-A-Thon
Careers GfG Weekly Contest
In Media Offline Classes (Delhi/NCR)
Contact Us DSA in JAVA/C++
Advertise with us Master System Design
GFG Corporate Solution Master CP
Placement Training Program GeeksforGeeks Videos
Geeks Community
Open In App
Languages DSA
Python Data Structures
Java Algorithms
C++ DSA for Beginners
PHP Basic DSA Problems
GoLang DSA Roadmap
SQL DSA Interview Questions
R Language Competitive Programming
Android Tutorial
DSA/Placements Development/Testing
DSA - Self Paced Course JavaScript Full Course
DSA in JavaScript - Self Paced Course React JS Course
DSA in Python - Self Paced React Native Course
C Programming Course Online - Learn C with Data Django Web Development Course
Structures Complete Bootstrap Course
Complete Interview Preparation Full Stack Development - [LIVE]
Master Competitive Programming JAVA Backend Development - [LIVE]
Core CS Subject for Interview Preparation Complete Software Testing Course [LIVE]
Mastering System Design: LLD to HLD Android Mastery with Kotlin [LIVE]
Tech Interview 101 - From DSA to System Design [LIVE]
DSA to Development [HYBRID]
Placement Preparation Crash Course [LIVE]
Open In App
Machine Learning/Data Science Programming Languages
Complete Machine Learning & Data Science Program - C Programming with Data Structures
[LIVE] C++ Programming Course
Data Analytics Training using Excel, SQL, Python & Java Programming Course
PowerBI - [LIVE] Python Full Course
Data Science Training Program - [LIVE]
Mastering Generative AI and ChatGPT
Data Science Course with IBM Certification
Clouds/Devops GATE
DevOps Engineering GATE CS & IT Test Series - 2025
AWS Solutions Architect Certification GATE DA Test Series 2025
Salesforce Certified Administrator Course GATE CS & IT Course - 2025
GATE DA Course 2025
Open In App