Lec 11
Lec 11
Swarm Intelligence
Algorithms
4h Lecture Dr. Elaf Adil
Learning Objectives
The general objective of the lecture:
To introduce the concept of Swarm Intelligence.
Detailed objectives:
Key Idea:
a. Stigmergy:
Indirect communication through the environment. Agents modify the
environment, and these changes influence the behavior of other agents.
Example:
• Ants: Ants leave pheromone trails to guide other ants to food sources.
b. Positive Feedback:
Example:
c. Negative Feedback:
Unsuccessful behaviors are discouraged, preventing the system from getting
stuck in suboptimal solutions.
Example:
d. Local Interactions:
Kerbala University Machin Learning II
College of Computer Science and Information Technology
Department of Computer Science Dr. Elaf Adil – 4 Lecture
Example:
• Bird Flocking: Birds adjust their flight based on the movements of nearby
birds.
• https://www.youtube.com/watch?v=ozkBd2p2piU
Kerbala University Machin Learning II
College of Computer Science and Information Technology
Department of Computer Science Dr. Elaf Adil – 4 Lecture
• Mechanism: Artificial bees search for food sources (solutions) and share
information about the quality of these sources. The colony evolves over time
to find the best solutions.
• https://www.youtube.com/watch?v=JC41M7RPSec
Advantages:
Challenges:
• Parameter Tuning: Finding the right parameters for the algorithms can be
difficult.
Velocity Equation:
Key Components:
1. Inertia Weight (θ)
Kerbala University Machin Learning II
College of Computer Science and Information Technology
Department of Computer Science Dr. Elaf Adil – 4 Lecture
- c2: Encourages the particle to move toward the global best position found by
the swarm (social learning).
Update Conditions:
Case Evaluations:
x = 5 → f(x) = 50 x = 2 → f(x) = 25
pbest= 3 → f(pbest) = 30 pbest= 3 → f(pbest) = 30
gbest= 7 → f(gbest) = 20 pbest= x
gbest= 7 → f(gbest) = 20
Case 3: Minimization
x = 9 → f(x) = 10
pbest= 3 → f(pbest) = 30
pbest= x
pbest= 7 → f(gbest) = 20
gbest= pbest
✔ Uniformly distributed random numbers (r1 and r2) in the range (0,1)