SlideShare a Scribd company logo
1 of 38
Download to read offline
Swarm
Intelligence
Muhammad Haroon
Lecturer
University of Gujrat Lahore Sub Campus
Lecture Overview
• Real world insect examples
• Theory of Swarm Intelligence
• Ant Pheromone and Food Foraging Demo
• PARTICLE SWARM INTELLIGENCE (PSO)
• PSEUDO CODE / ALGORITHM
• Ant Colony Optimization
Real World
Insect
Examples
Bees
Bees
• Colony cooperation
• Regulate hive temperature
• Efficiency via Specialization: division of labour in
the colony
• Communication : Food sources are exploited
according to quality and distance from the hive
Ants
Ants
• Organizing highways to and from their foraging
sites by leaving pheromone trails
• Form chains from their own bodies to create a
bridge to pull and hold leafs together with silk
• Division of labour between major and minor ants
Swarm
Intelligence in
Theory
An In-depth Look at Real
Ant Behaviour
Interrupt The Flow
The Path Thickens!
The New Shortest Path
Adapting to Environment
Changes
Adapting to Environment
Changes
Ant Pheromone and
Food Foraging
How Ants Communicate with
Each Other?
• If you watch ants on a trail, you will
notice that they often touch each other
with their antennae (long feelers on the
head) when they meet.
• All ants can produce pheromones,
which are scent chemicals used for
communication and to make trails.
PARTICLE SWARM
OPTIMIZATION
(PSO)
What is Particle?
• A Particle is a small localized object that
have several physical or chemical
properties such as volume or mass.
What is Swarm?
• Collection of something that can move
in large number collectively.
• For Example:
– Bird’s Flock
– Animal Crowd
– Ant Swarm
What is Optimization?
• The action to get the best or the most
effective use of a resource.
• For example:
– Minimize the total time to travel from one
city to another city.
Particle Swarm Optimization
(PSO)
• Particle Swarm Optimization (PSO) is a
population based stochastic
optimization technique developed by Dr.
Eberhart and Dr. Kennedy in 1995,
inspired by social behaviour of Bird
Flocking or Ant Swarm.
• This technique works on population
(large amount of data) and does
optimization (gets the best or the most
effective results).
Flock of Birds
PSO Technique by Example
• PSO Simulates the behaviour of Bird
Flocking.
• Suppose the following Scenario:
• A group of birds are randomly searching
for food in an area.
• There is only one piece of food in an
area.
• All the birds don’t know where the food
is. But they know (in each iteration) how
far the food is?
• So what’s the best strategy to find the
food?
• The effective way is to follow the bird
which is nearest to the food.
PSO Technique by Example
• In PSO, each single solution is called a
“bird” in the search space.
• The particles (birds) fly through the
problem space by following current
optimum particle.
• Each bird has its value pBest (Personal
Best) which means that how much a
single bird is near to food.
• There is a value gBest (Group Best)
which is a combine value of a swarm
means that how much a complete flock
of birds is near to food.
PSEUDO CODE /
ALGORITHM
• X (t+1) = X(t) + V(t+1) → (i)
• V(t+1) = wV(t) + c1 × rand ( ) × ( Xpbest –
X(t)) + c2 ×rand ( ) × ( Xgbest - X(t)) → (ii)
Terminologies Used…
V(t) velocity of the particle at time t
X(t) Particle position at time t
w Inertia weight
c1 , c2 learning factor or accelerating factor
rand uniformly distributed random number between 0 and 1
Xpbest particle’s best position
Xgbest global best position
Input: Randomly initialized position and velocity of Particles:
Xi (0) andVi (0)
Output: Position of the approximate global minimum X*
1: while terminating condition is not reached do
2: for i = 1 to number of particles do
3: Calculate the fitness function f
4: Update personal best and global best of each particle
5: Update velocity of the particle using Equation (ii)
6: Update the position of the particle using equation (i)
7: end for
8: end while
Ant Colony Optimization
“Ant Colony Optimization (ACO) studies artificial
systems that take inspiration from the
behavior of real ant colonies and which are
used to solve discrete optimization problems.”
ACO Website [1]
Source: http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Aco_branches.svg/2000px-
Aco_branches.svg.png
Ant Colony Optimization
 Probalistic Techniques to solve optimization Problem
 It is a population based metaheuristic used to find approximate
solution to an optimization problem.
 The Optimization Problem must be written in the form of path
finding with a weighted graph
Application of ACO
 Shortest paths and routing
 Assignment problem
 Set Problem
Idea
• The way ants find their food in shortest
path is interesting.
• Ants hide pheromones to remember their
path.
• These pheromones evaporate with time.
• Whenever an ant finds food , it marks its
return journey with pheromones.
• Pheromones evaporate faster on longer
paths.
• Shorter paths serve as the way to food
for most of the other ants.
• The shorter path will be reinforced by the
pheromones further.
• Finally , the ants arrive at the shortest
path.
Idea (cont.)
ACO Concept
• Ants navigate from nest to food source. Ants
are blind!
• Shortest path is discovered via pheromone
trails. Each ant moves at random
• Pheromone is deposited on path
• More pheromone on path increases probability
of path being followed
36
Source: http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Aco_branches.svg/2000px-
Aco_branches.svg.png
37
Ant Colony Optimization
• ConstructAntSolutions: Partial solution extended by adding
an edge based on stochastic and pheromone
considerations.
• ApplyLocalSearch: problem-specific, used in state-of-art
ACO algorithms.
• UpdatePheromones: increase pheromone of good
solutions, decrease that of bad solutions (pheromone
evaporation).
Ant Colony Algorithm

More Related Content

What's hot

Problem Formulation
Problem FormulationProblem Formulation
Problem FormulationAdri Jovin
 
Probabilistic Reasoning
Probabilistic ReasoningProbabilistic Reasoning
Probabilistic ReasoningJunya Tanaka
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemMohammad Imam Hossain
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceSahil Kumar
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptkarthikaparthasarath
 
First order logic in knowledge representation
First order logic in knowledge representationFirst order logic in knowledge representation
First order logic in knowledge representationSabaragamuwa University
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)Abhimanyu Dwivedi
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp) Archana432045
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classificationKrish_ver2
 
Swarm intelligence
Swarm intelligenceSwarm intelligence
Swarm intelligenceEslam Hamed
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search TechniquesJismy .K.Jose
 
Goal stack planning.ppt
Goal stack planning.pptGoal stack planning.ppt
Goal stack planning.pptSadagopanS
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI Bharat Bhushan
 
Software re engineering
Software re engineeringSoftware re engineering
Software re engineeringdeshpandeamrut
 
Algorithmic problem solving
Algorithmic problem solvingAlgorithmic problem solving
Algorithmic problem solvingPrabhakaran V M
 
Neuro-fuzzy systems
Neuro-fuzzy systemsNeuro-fuzzy systems
Neuro-fuzzy systemsSagar Ahire
 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchNilu Desai
 

What's hot (20)

Problem Formulation
Problem FormulationProblem Formulation
Problem Formulation
 
Probabilistic Reasoning
Probabilistic ReasoningProbabilistic Reasoning
Probabilistic Reasoning
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 
Classical Planning
Classical PlanningClassical Planning
Classical Planning
 
Heuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.pptHeuristic Search Techniques Unit -II.ppt
Heuristic Search Techniques Unit -II.ppt
 
First order logic in knowledge representation
First order logic in knowledge representationFirst order logic in knowledge representation
First order logic in knowledge representation
 
Machine learning session4(linear regression)
Machine learning   session4(linear regression)Machine learning   session4(linear regression)
Machine learning session4(linear regression)
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classification
 
Swarm intelligence
Swarm intelligenceSwarm intelligence
Swarm intelligence
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
 
Goal stack planning.ppt
Goal stack planning.pptGoal stack planning.ppt
Goal stack planning.ppt
 
Control Strategies in AI
Control Strategies in AI Control Strategies in AI
Control Strategies in AI
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Software re engineering
Software re engineeringSoftware re engineering
Software re engineering
 
Debugging
DebuggingDebugging
Debugging
 
Algorithmic problem solving
Algorithmic problem solvingAlgorithmic problem solving
Algorithmic problem solving
 
Neuro-fuzzy systems
Neuro-fuzzy systemsNeuro-fuzzy systems
Neuro-fuzzy systems
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 

Similar to Swarm intelligence and particle swarm optimization

Swarm Optimization Techniques_ACO.pdf
Swarm Optimization Techniques_ACO.pdfSwarm Optimization Techniques_ACO.pdf
Swarm Optimization Techniques_ACO.pdfahmedsalim244821
 
Ant Colony Optimization - ACO
Ant Colony Optimization - ACOAnt Colony Optimization - ACO
Ant Colony Optimization - ACOMohamed Talaat
 
Classification with ant colony optimization
Classification with ant colony optimizationClassification with ant colony optimization
Classification with ant colony optimizationkamalikanath89
 
Swarm Intelligence: An Application of Ant Colony Optimization
Swarm Intelligence: An Application of Ant Colony OptimizationSwarm Intelligence: An Application of Ant Colony Optimization
Swarm Intelligence: An Application of Ant Colony OptimizationIJMER
 
cs621-lect7-SI-13aug07.ppt
cs621-lect7-SI-13aug07.pptcs621-lect7-SI-13aug07.ppt
cs621-lect7-SI-13aug07.pptDeveshKhandare
 
Cs621 lect7-si-13aug07
Cs621 lect7-si-13aug07Cs621 lect7-si-13aug07
Cs621 lect7-si-13aug07Borseshweta
 
ANT ALGORITME.pptx
ANT ALGORITME.pptxANT ALGORITME.pptx
ANT ALGORITME.pptxRiki378702
 
Bio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptxBio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptxpawansher2002
 
Ant_Colony_Optimization
Ant_Colony_OptimizationAnt_Colony_Optimization
Ant_Colony_OptimizationNeha Reddy
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimizationvk1dadhich
 
Assignment Ecology_Vedant Gautam.pptx
Assignment Ecology_Vedant Gautam.pptxAssignment Ecology_Vedant Gautam.pptx
Assignment Ecology_Vedant Gautam.pptxvedantgautam2
 
Classification with ant colony optimization
Classification with ant colony optimizationClassification with ant colony optimization
Classification with ant colony optimizationkamalikanath89
 
Foundations-of-Ants-Ant-Colony-Optimization (1).pptx
Foundations-of-Ants-Ant-Colony-Optimization (1).pptxFoundations-of-Ants-Ant-Colony-Optimization (1).pptx
Foundations-of-Ants-Ant-Colony-Optimization (1).pptxCharanjitSingh468469
 
PSO-ACO-Presentation.pptx
PSO-ACO-Presentation.pptxPSO-ACO-Presentation.pptx
PSO-ACO-Presentation.pptxJAYRAJSINGH85
 
Ants and ants based routing
Ants and ants based routingAnts and ants based routing
Ants and ants based routingVarun Chopra
 
Meta Heuristics Optimization and Nature Inspired.ppt
Meta Heuristics Optimization and Nature Inspired.pptMeta Heuristics Optimization and Nature Inspired.ppt
Meta Heuristics Optimization and Nature Inspired.pptSubramanianManivel1
 

Similar to Swarm intelligence and particle swarm optimization (20)

SWARM INTELLIGENCE
SWARM INTELLIGENCESWARM INTELLIGENCE
SWARM INTELLIGENCE
 
Swarm Optimization Techniques_ACO.pdf
Swarm Optimization Techniques_ACO.pdfSwarm Optimization Techniques_ACO.pdf
Swarm Optimization Techniques_ACO.pdf
 
Ant Colony Optimization - ACO
Ant Colony Optimization - ACOAnt Colony Optimization - ACO
Ant Colony Optimization - ACO
 
Classification with ant colony optimization
Classification with ant colony optimizationClassification with ant colony optimization
Classification with ant colony optimization
 
Swarm Intelligence: An Application of Ant Colony Optimization
Swarm Intelligence: An Application of Ant Colony OptimizationSwarm Intelligence: An Application of Ant Colony Optimization
Swarm Intelligence: An Application of Ant Colony Optimization
 
cs621-lect7-SI-13aug07.ppt
cs621-lect7-SI-13aug07.pptcs621-lect7-SI-13aug07.ppt
cs621-lect7-SI-13aug07.ppt
 
Cs621 lect7-si-13aug07
Cs621 lect7-si-13aug07Cs621 lect7-si-13aug07
Cs621 lect7-si-13aug07
 
ANT ALGORITME.pptx
ANT ALGORITME.pptxANT ALGORITME.pptx
ANT ALGORITME.pptx
 
Ant colony algorithm
Ant colony algorithmAnt colony algorithm
Ant colony algorithm
 
Bio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptxBio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptx
 
Ant_Colony_Optimization
Ant_Colony_OptimizationAnt_Colony_Optimization
Ant_Colony_Optimization
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
Assignment Ecology_Vedant Gautam.pptx
Assignment Ecology_Vedant Gautam.pptxAssignment Ecology_Vedant Gautam.pptx
Assignment Ecology_Vedant Gautam.pptx
 
Classification with ant colony optimization
Classification with ant colony optimizationClassification with ant colony optimization
Classification with ant colony optimization
 
Neural nw ant colony algorithm
Neural nw   ant colony algorithmNeural nw   ant colony algorithm
Neural nw ant colony algorithm
 
Foundations-of-Ants-Ant-Colony-Optimization (1).pptx
Foundations-of-Ants-Ant-Colony-Optimization (1).pptxFoundations-of-Ants-Ant-Colony-Optimization (1).pptx
Foundations-of-Ants-Ant-Colony-Optimization (1).pptx
 
PSO-ACO-Presentation.pptx
PSO-ACO-Presentation.pptxPSO-ACO-Presentation.pptx
PSO-ACO-Presentation.pptx
 
Ants and ants based routing
Ants and ants based routingAnts and ants based routing
Ants and ants based routing
 
231semMish (1).ppt
231semMish (1).ppt231semMish (1).ppt
231semMish (1).ppt
 
Meta Heuristics Optimization and Nature Inspired.ppt
Meta Heuristics Optimization and Nature Inspired.pptMeta Heuristics Optimization and Nature Inspired.ppt
Meta Heuristics Optimization and Nature Inspired.ppt
 

More from Muhammad Haroon

Basic blocks and flow graph in Compiler Construction
Basic blocks and flow graph in Compiler ConstructionBasic blocks and flow graph in Compiler Construction
Basic blocks and flow graph in Compiler ConstructionMuhammad Haroon
 
Address in the target code in Compiler Construction
Address in the target code in Compiler ConstructionAddress in the target code in Compiler Construction
Address in the target code in Compiler ConstructionMuhammad Haroon
 
Code generator in Compiler Construction
Code generator in Compiler ConstructionCode generator in Compiler Construction
Code generator in Compiler ConstructionMuhammad Haroon
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler designMuhammad Haroon
 
Heap management in Compiler Construction
Heap management in Compiler ConstructionHeap management in Compiler Construction
Heap management in Compiler ConstructionMuhammad Haroon
 
Storage organization and stack allocation of space
Storage organization and stack allocation of spaceStorage organization and stack allocation of space
Storage organization and stack allocation of spaceMuhammad Haroon
 
Backpatching in Compiler Construction
Backpatching in Compiler ConstructionBackpatching in Compiler Construction
Backpatching in Compiler ConstructionMuhammad Haroon
 
Type checking in Compiler Construction
Type checking in Compiler ConstructionType checking in Compiler Construction
Type checking in Compiler ConstructionMuhammad Haroon
 
Type conversion in Compiler Construction
Type conversion in Compiler ConstructionType conversion in Compiler Construction
Type conversion in Compiler ConstructionMuhammad Haroon
 
Semantic analysis in Compiler Construction
Semantic analysis in Compiler ConstructionSemantic analysis in Compiler Construction
Semantic analysis in Compiler ConstructionMuhammad Haroon
 
Intermediate code and three address instructions
Intermediate code and three address instructionsIntermediate code and three address instructions
Intermediate code and three address instructionsMuhammad Haroon
 
LR(0) parser in Compiler Consturction
LR(0) parser in Compiler ConsturctionLR(0) parser in Compiler Consturction
LR(0) parser in Compiler ConsturctionMuhammad Haroon
 
LR(1) CLR(1) Parser with Example
LR(1) CLR(1) Parser with ExampleLR(1) CLR(1) Parser with Example
LR(1) CLR(1) Parser with ExampleMuhammad Haroon
 
Powerful presentation components and skills
Powerful presentation components and skillsPowerful presentation components and skills
Powerful presentation components and skillsMuhammad Haroon
 
Terms of reference in Professional Practices
Terms of reference in Professional PracticesTerms of reference in Professional Practices
Terms of reference in Professional PracticesMuhammad Haroon
 
7 habits of highly effective people
7 habits of highly effective people7 habits of highly effective people
7 habits of highly effective peopleMuhammad Haroon
 

More from Muhammad Haroon (20)

Basic blocks and flow graph in Compiler Construction
Basic blocks and flow graph in Compiler ConstructionBasic blocks and flow graph in Compiler Construction
Basic blocks and flow graph in Compiler Construction
 
Address in the target code in Compiler Construction
Address in the target code in Compiler ConstructionAddress in the target code in Compiler Construction
Address in the target code in Compiler Construction
 
Code generator in Compiler Construction
Code generator in Compiler ConstructionCode generator in Compiler Construction
Code generator in Compiler Construction
 
Target language in compiler design
Target language in compiler designTarget language in compiler design
Target language in compiler design
 
Heap management in Compiler Construction
Heap management in Compiler ConstructionHeap management in Compiler Construction
Heap management in Compiler Construction
 
Storage organization and stack allocation of space
Storage organization and stack allocation of spaceStorage organization and stack allocation of space
Storage organization and stack allocation of space
 
Backpatching in Compiler Construction
Backpatching in Compiler ConstructionBackpatching in Compiler Construction
Backpatching in Compiler Construction
 
Type checking in Compiler Construction
Type checking in Compiler ConstructionType checking in Compiler Construction
Type checking in Compiler Construction
 
Type conversion in Compiler Construction
Type conversion in Compiler ConstructionType conversion in Compiler Construction
Type conversion in Compiler Construction
 
Semantic analysis in Compiler Construction
Semantic analysis in Compiler ConstructionSemantic analysis in Compiler Construction
Semantic analysis in Compiler Construction
 
Intermediate code and three address instructions
Intermediate code and three address instructionsIntermediate code and three address instructions
Intermediate code and three address instructions
 
LALR(1) parser
LALR(1) parserLALR(1) parser
LALR(1) parser
 
LR(0) parser in Compiler Consturction
LR(0) parser in Compiler ConsturctionLR(0) parser in Compiler Consturction
LR(0) parser in Compiler Consturction
 
SLR(1) parser
SLR(1) parserSLR(1) parser
SLR(1) parser
 
LR(1) CLR(1) Parser with Example
LR(1) CLR(1) Parser with ExampleLR(1) CLR(1) Parser with Example
LR(1) CLR(1) Parser with Example
 
Powerful presentation components and skills
Powerful presentation components and skillsPowerful presentation components and skills
Powerful presentation components and skills
 
Terms of reference in Professional Practices
Terms of reference in Professional PracticesTerms of reference in Professional Practices
Terms of reference in Professional Practices
 
Code of conduct .
Code of conduct .Code of conduct .
Code of conduct .
 
Misuse of computer
Misuse of computerMisuse of computer
Misuse of computer
 
7 habits of highly effective people
7 habits of highly effective people7 habits of highly effective people
7 habits of highly effective people
 

Recently uploaded

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 

Recently uploaded (20)

GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 

Swarm intelligence and particle swarm optimization

  • 2.
  • 3. Lecture Overview • Real world insect examples • Theory of Swarm Intelligence • Ant Pheromone and Food Foraging Demo • PARTICLE SWARM INTELLIGENCE (PSO) • PSEUDO CODE / ALGORITHM • Ant Colony Optimization
  • 6. Bees • Colony cooperation • Regulate hive temperature • Efficiency via Specialization: division of labour in the colony • Communication : Food sources are exploited according to quality and distance from the hive
  • 8. Ants • Organizing highways to and from their foraging sites by leaving pheromone trails • Form chains from their own bodies to create a bridge to pull and hold leafs together with silk • Division of labour between major and minor ants
  • 10. An In-depth Look at Real Ant Behaviour
  • 17. How Ants Communicate with Each Other? • If you watch ants on a trail, you will notice that they often touch each other with their antennae (long feelers on the head) when they meet. • All ants can produce pheromones, which are scent chemicals used for communication and to make trails.
  • 19. What is Particle? • A Particle is a small localized object that have several physical or chemical properties such as volume or mass.
  • 20. What is Swarm? • Collection of something that can move in large number collectively. • For Example: – Bird’s Flock – Animal Crowd – Ant Swarm
  • 21. What is Optimization? • The action to get the best or the most effective use of a resource. • For example: – Minimize the total time to travel from one city to another city.
  • 22. Particle Swarm Optimization (PSO) • Particle Swarm Optimization (PSO) is a population based stochastic optimization technique developed by Dr. Eberhart and Dr. Kennedy in 1995, inspired by social behaviour of Bird Flocking or Ant Swarm.
  • 23. • This technique works on population (large amount of data) and does optimization (gets the best or the most effective results).
  • 25. PSO Technique by Example • PSO Simulates the behaviour of Bird Flocking. • Suppose the following Scenario:
  • 26. • A group of birds are randomly searching for food in an area. • There is only one piece of food in an area. • All the birds don’t know where the food is. But they know (in each iteration) how far the food is? • So what’s the best strategy to find the food? • The effective way is to follow the bird which is nearest to the food.
  • 27. PSO Technique by Example • In PSO, each single solution is called a “bird” in the search space. • The particles (birds) fly through the problem space by following current optimum particle.
  • 28. • Each bird has its value pBest (Personal Best) which means that how much a single bird is near to food. • There is a value gBest (Group Best) which is a combine value of a swarm means that how much a complete flock of birds is near to food.
  • 29. PSEUDO CODE / ALGORITHM • X (t+1) = X(t) + V(t+1) → (i) • V(t+1) = wV(t) + c1 × rand ( ) × ( Xpbest – X(t)) + c2 ×rand ( ) × ( Xgbest - X(t)) → (ii)
  • 30. Terminologies Used… V(t) velocity of the particle at time t X(t) Particle position at time t w Inertia weight c1 , c2 learning factor or accelerating factor rand uniformly distributed random number between 0 and 1 Xpbest particle’s best position Xgbest global best position
  • 31. Input: Randomly initialized position and velocity of Particles: Xi (0) andVi (0) Output: Position of the approximate global minimum X* 1: while terminating condition is not reached do 2: for i = 1 to number of particles do 3: Calculate the fitness function f 4: Update personal best and global best of each particle 5: Update velocity of the particle using Equation (ii) 6: Update the position of the particle using equation (i) 7: end for 8: end while
  • 32. Ant Colony Optimization “Ant Colony Optimization (ACO) studies artificial systems that take inspiration from the behavior of real ant colonies and which are used to solve discrete optimization problems.” ACO Website [1] Source: http://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Aco_branches.svg/2000px- Aco_branches.svg.png
  • 33. Ant Colony Optimization  Probalistic Techniques to solve optimization Problem  It is a population based metaheuristic used to find approximate solution to an optimization problem.  The Optimization Problem must be written in the form of path finding with a weighted graph Application of ACO  Shortest paths and routing  Assignment problem  Set Problem
  • 34. Idea • The way ants find their food in shortest path is interesting. • Ants hide pheromones to remember their path. • These pheromones evaporate with time. • Whenever an ant finds food , it marks its return journey with pheromones. • Pheromones evaporate faster on longer paths.
  • 35. • Shorter paths serve as the way to food for most of the other ants. • The shorter path will be reinforced by the pheromones further. • Finally , the ants arrive at the shortest path. Idea (cont.)
  • 36. ACO Concept • Ants navigate from nest to food source. Ants are blind! • Shortest path is discovered via pheromone trails. Each ant moves at random • Pheromone is deposited on path • More pheromone on path increases probability of path being followed 36
  • 38. • ConstructAntSolutions: Partial solution extended by adding an edge based on stochastic and pheromone considerations. • ApplyLocalSearch: problem-specific, used in state-of-art ACO algorithms. • UpdatePheromones: increase pheromone of good solutions, decrease that of bad solutions (pheromone evaporation). Ant Colony Algorithm