0% found this document useful (0 votes)
4 views

ACO Algorithm

Uploaded by

shahzaib37607
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

ACO Algorithm

Uploaded by

shahzaib37607
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Ant Colony Optimization (ACO)

Algorithm
SOLVING OP TIMIZATION PROBLE MS INSPIRE D BY NATURE
HAFIZ TANZE EL SH AMSHAD
ABD ULL AH A FAROOQ
MUH AMMAD QASIM
Introduction to ACO
Definition: ACO is an optimization algorithm inspired by the natural behavior of
ants in finding food.
Goal: To find the shortest path or most efficient solution by simulating ant
colony behavior.
Applications: Used in routing, scheduling, TSP (Traveling Salesman Problem).
Natural Inspiration
How Real Ants Work:
◦ Ants explore randomly to find food.
◦ When food is found, they return to the colony, leaving
a pheromone trail.
◦ Other ants sense pheromones and follow the path, reinforcing the
trail.
◦ Result: Shorter paths accumulate more pheromone, allowing the
colony to optimize routes over time.
Key Components of ACO
Ants: Virtual agents that explore paths.
Pheromones: Virtual trails that represent path quality (more
pheromone = better path).
Heuristic Information: Extra information about the environment
(e.g., distance between cities).
Probability-Based Decision: Ants decide paths based on pheromone
strength and heuristic information.
ACO Algorithm Steps:
1.Initialization:
1. Set up the cities and distance matrix.
2. Initialize pheromone values on all edges to a small constant (e.g., 0.1).
2.Ant Path Construction:
1. Each ant starts at a random city.
2. The next city is chosen based on the probability formula using pheromone levels and
distance.
3.Pheromone Update:
1. After each ant completes its journey, update the pheromone levels based on the total
distance of its path.
2. Apply evaporation to the pheromone values on each edge.
4.Repeat:
1. Repeat the path construction and pheromone update for a predefined number of
iterations.
5.Best Path:
1. Track the shortest path found and its total distance across all iterations.
Probability Calculation for
Path Choice
Formula:
Shortest Path Problem Using Ant
Colony Optimization (ACO)
We have a network with 3 nodes and 2 edges. We aim to find the shortest path between Node A
and Node C.
The nodes are connected by the following edges (with initial pheromone concentrations):

Edge Nodes Distance (L) Initial Pheromone (C)

E1 A→B 4 1.0
E2 B→C 2 1.0
Conclusion
This is a simple demonstration of how
Ant Colony Optimization (ACO) can be
applied in network routing problem.
Running this process over multiple
iterations will allow the ants to
converge on the shortest, most
efficient path.

You might also like