SlideShare a Scribd company logo
1 of 28
Cuckoo Search & Firefly
Algorithms
By: Mustafa Salam
Cuckoo Search Algorithm
Overview
Cuckoo search (CS) is an optimization algorithm developed by Xin-she Yang

and Suash Deb in 2009.
Cuckoos have an aggressive reproduction strategy that involves the female

laying her fertilized eggs in the nest of another species so that the surrogate
parents unwittingly raise her brood. Sometimes the cuckoo's egg in the host
nest is discovered (eggs are not its owns), the surrogate parents either throw
it out or abandon the nest and builds their own brood elsewhere.
Cuckoo Behavior
 Some cuckoo species have evolved in such a way that female parasitic
cuckoos are often very specialized in the mimicry in color and pattern of
the eggs of a few chosen host species. This reduces the probability of eggs

being abandoned and increases their reproductively.
Cuckoo Behavior
 Parasitic cuckoos often choose a nest where the host bird just laid its own
eggs. In general, the cuckoo eggs hatch slightly earlier than their host eggs.
Cuckoo Behavior
 Once the first cuckoo chick is hatched, the first instinct action it will take is
to evict the host eggs by blindly propelling the eggs out of the nest, which

increases the cuckoo chick’s share of food provided by its host bird.
Cuckoo Rules & Parameters
1)

Each cuckoo lays one egg at a time, and dumps it in a randomly chosen nest.

2)

The best nests with high quality of eggs (solutions) will carry over to the next
generations.

3)

The number of available host nests is fixed, and a host can discover an alien
egg with a probability pa ∈ [0, 1]. In this case, the host bird can either throw
the egg away or abandon the nest so as to build a completely new nest in a
new location.
•

As a further approximation, this last assumption can be approximated by a

fraction pa of the n nests being replaced by new nests (with new random
solutions at new locations).
•

For a maximization problem, the quality or fitness of a solution can simply

be proportional to the objective function. Other forms of fitness can be defined

in a similar way to the fitness function in genetic algorithms.
Lévy Flights
A Lévy flight is a random walk in which the step-lengths are distributed according
to a heavy-tailed probability distribution. After a large number of steps, the
distance from the origin of the random walk tends to a stable distribution.
Lévy Flights
When generating new solutions
flight is performed

x(t+1) for, say cuckoo i, a L´evy

xi(t+1) = xi(t) + α ⊕ L´evy(λ)

New Solution

Current
Location

…….. (1)

The transition
probability

Where α > 0 is the step size, which should be related to the
scales of the problem of interest. In most cases, we can use

α= 1
Lévy Flights

L v flig tses n lly p v eara d mwlk w ileth ir ra d m
´e y h se tia ro id
no a h
e no
s p a d w fro aL v d trib tio fo la es p
te s re ra n m ´e y is u n r rg te s
L´evy ∼ u = t−λ, (1 < λ ≤ 3)

……… (2)

Which has an infinite variance with an infinite mean. Here the steps essentially form a

random walk process with a power-law step-length distribution with a heavy tail. Some
of the new solutions should be generated by L´evy walk around the best
solution obtained so far, this will speed up the local search.
Lévy Flights
However, a substantial fraction of the new solutions should be generated by far field
randomization and whose locations should be far enough from the current best
solution, this will make sure the system will not be trapped in a local optimum.
Pseudo code of Cuckoo Search algorithm

Begin
Objective function f(x), x = (x1, ..., xd)T ;
Initial a population of n host nests xi (i = 1, 2, ..., n);
while (t <MaxGeneration) or (stop criterion)

Get a cuckoo (say i) randomly by Lévyflights;
Evaluate its quality/fitness Fi;
Choose a nest among n (say j) randomly;
if (Fi > Fj)
Replace j by the new solution;
end
Abandon a fraction (pa) of worse nests and build new ones at
new locations via L´evy flights;
Keep the best solutions (or nests with quality solutions);
Rank the solutions and find the current best;
end while
Postprocess results and visualization;
End
Cuckoo Applications
a)

Spring design and Welded beam design problems.

b)

Solve nurse scheduling problem.

c)

An efficient computation for data fusion in wireless sensor networks.

d)

A new quantum-inspired cuckoo search was developed to solve Knapsack
problems.

e)

Efficiently generate independent test paths for structural software testing
and test data generation.

f)

Applied to train neural networks with improved performance.
Firefly Algorithm
Firefly Algorithm
The firefly algorithm (FA) is a metaheuristic algorithm, developed by Xin-She
Yang in late 2007 and 2008 , which was based on the flashing patterns and
behavior of fireflies.
Behavior of Fireflies
There are about two thousand firefly species, and most fireflies produce short and
rhythmic flashes.


The pattern of flashes is often unique for a particular species. The flashing light is

produced by a process of bioluminescence, and the true functions of such
signaling systems are still debating.


However, two fundamental functions of such flashes are to attract mating

partners (communication), and to attract potential prey.
Behavior of Fireflies


In addition, flashing may also serve as a protective warning mechanism.



The rhythmic flash, the rate of flashing and the amount of time form part of

the signal system that brings both sexes together.



Females respond to a male’s unique pattern of flashing in the same
species, while in some species such as photuris, female fireflies can mimic the

mating flashing pattern of other species so as to lure and eat the male fireflies
who may mistake the flashes as a potential suitable mate.
Firefly Rules & Parameters


Fireflies are unisex so that one firefly will be attracted to other fireflies

regardless of their sex.


The attractiveness is proportional to the brightness, and they both decrease as
their distance increases. Thus for any two flashing fireflies, the less brighter

one will move towards the brighter one. If there is no brighter one than a
particular firefly, it will move randomly.


The brightness of a firefly is determined by the landscape of the objective
function.
Firefly Rules & Parameters


The light intensity at a particular distance (r) from the light source obeys

the inverse square law. That is to say , the light intensity (I) decreases as the
distance (r) increases in terms of ( I ∝ 1/ r2 ).


Furthermore, the air absorbs light which becomes weaker and weaker as
the distance increases.
The algorithm
In the firefly algorithm, there are three important formulas in firefly

algorithm, which are:


Attractiveness

The form of attractiveness function of a firefly is the following monotonically
decreasing function.

r
Where

e

rm

m 1

r is the distance between any two fireflies,

is a fixed light absorption coefficient.

…………

(1)

is the attractiveness at

r = 0

and
The algorithm


Distance

The distance between any two fireflies i and j at Xi and Xj, respectively, is the
Cartesian distance as follows:

Where xi,k is the (k)th component of the spatial coordinate Xi of (i)th firefly and d
is the number of dimensions.
The algorithm


Movement

The movement of a firefly i is attracted to another more attractive (brighter)
firefly j is determined by following equation:

Where the second term is due to the attraction while the third
term is ran d omi zati on wi th
being the randomization
parameter. rand is a random number generator uniformly
distributed in [0, 1]. For most cases in the implementation,
1 and
0,1 .
0
Pseudo code of the firefly algorithm

Begin
Objective function f (x), x = (x1 , ..., xd )T
Generate initial population of fireflies xi (i = 1, 2, ..., n)
Light intensity Ii at xi is determined by f ( xi )
Define light absorption coefficient γ
while (t <MaxGeneration)
for i = 1 : n all n fireflies
for j = 1 : i all n fireflies ( inner loop )
if ( Ij > Ii )
Move firefly i towards j ;
end if
Attractiveness varies with distance r via e−γr
Evaluate new solutions and update light intensity
end for j
end for i
Rank the fireflies and find the current best
end while
Postprocess results and visualization
End
Performance Comparison
Firefly Applications


Digital Image Compression and Image Processing



Feature selection



Antenna Design



Structural Design



Scheduling



Clustering
References
[1] Xin-She Yang, Suash Deb: “Nature-Inspired Metaheuristic Algorithms”, Luniver
Press, (2008).

[2] Nitesh Sureja ,”New Inspirations in Nature: A Survey “, G H Patel College of
Engineering & Technology, Vallabh Vidyanagar (Gujarat), INDIA (2012).
[3] Shakti Kumar, Parvinder Kaur, Amarpartap Singh,” Fuzzy Model Identification: A
Firefly Optimization Approach”, Department of Electronics & Communications,
SLIET, Longowal, Punjab, INDIA(2012).
Thank You

More Related Content

What's hot

Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisXin-She Yang
 
Artificial bee colony (abc)
Artificial bee colony (abc)Artificial bee colony (abc)
Artificial bee colony (abc)quadmemo
 
ABC Algorithm.
ABC Algorithm.ABC Algorithm.
ABC Algorithm.N Vinayak
 
Artificial Bee Colony algorithm
Artificial Bee Colony algorithmArtificial Bee Colony algorithm
Artificial Bee Colony algorithmAhmed Fouad Ali
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimizationUnnitaDas
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimizationAbdul Rahman
 
Spider Monkey Optimization Algorithm
Spider Monkey Optimization AlgorithmSpider Monkey Optimization Algorithm
Spider Monkey Optimization AlgorithmAhmed Fouad Ali
 
Artificial bee colony algorithm
Artificial bee colony algorithmArtificial bee colony algorithm
Artificial bee colony algorithmSatyasis Mishra
 
Ant Colony Optimization: The Algorithm and Its Applications
Ant Colony Optimization: The Algorithm and Its ApplicationsAnt Colony Optimization: The Algorithm and Its Applications
Ant Colony Optimization: The Algorithm and Its Applicationsadil raja
 
Ant Colony Optimization - ACO
Ant Colony Optimization - ACOAnt Colony Optimization - ACO
Ant Colony Optimization - ACOMohamed Talaat
 
Bat algorithm and applications
Bat algorithm and applicationsBat algorithm and applications
Bat algorithm and applicationsMd.Al-imran Roton
 
Travelling Salesman Problem
Travelling Salesman ProblemTravelling Salesman Problem
Travelling Salesman ProblemShikha Gupta
 
Artificial Bee Colony: An introduction
Artificial Bee Colony: An introductionArtificial Bee Colony: An introduction
Artificial Bee Colony: An introductionAdel Rahimi
 
Simulated Annealing
Simulated AnnealingSimulated Annealing
Simulated Annealingkellison00
 
Particle Swarm Optimization - PSO
Particle Swarm Optimization - PSOParticle Swarm Optimization - PSO
Particle Swarm Optimization - PSOMohamed Talaat
 
Cuckoo search
Cuckoo searchCuckoo search
Cuckoo searchG Prachi
 

What's hot (20)

Metaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical AnalysisMetaheuristic Algorithms: A Critical Analysis
Metaheuristic Algorithms: A Critical Analysis
 
bat algorithm
bat algorithmbat algorithm
bat algorithm
 
Ant colony algorithm
Ant colony algorithm Ant colony algorithm
Ant colony algorithm
 
Artificial bee colony (abc)
Artificial bee colony (abc)Artificial bee colony (abc)
Artificial bee colony (abc)
 
ABC Algorithm.
ABC Algorithm.ABC Algorithm.
ABC Algorithm.
 
Artificial Bee Colony algorithm
Artificial Bee Colony algorithmArtificial Bee Colony algorithm
Artificial Bee Colony algorithm
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
Spider Monkey Optimization Algorithm
Spider Monkey Optimization AlgorithmSpider Monkey Optimization Algorithm
Spider Monkey Optimization Algorithm
 
Artificial bee colony algorithm
Artificial bee colony algorithmArtificial bee colony algorithm
Artificial bee colony algorithm
 
Final project
Final projectFinal project
Final project
 
Ant Colony Optimization: The Algorithm and Its Applications
Ant Colony Optimization: The Algorithm and Its ApplicationsAnt Colony Optimization: The Algorithm and Its Applications
Ant Colony Optimization: The Algorithm and Its Applications
 
Ant Colony Optimization - ACO
Ant Colony Optimization - ACOAnt Colony Optimization - ACO
Ant Colony Optimization - ACO
 
Bat algorithm and applications
Bat algorithm and applicationsBat algorithm and applications
Bat algorithm and applications
 
Travelling Salesman Problem
Travelling Salesman ProblemTravelling Salesman Problem
Travelling Salesman Problem
 
Artificial Bee Colony: An introduction
Artificial Bee Colony: An introductionArtificial Bee Colony: An introduction
Artificial Bee Colony: An introduction
 
Simulated Annealing
Simulated AnnealingSimulated Annealing
Simulated Annealing
 
Crow search algorithm
Crow search algorithmCrow search algorithm
Crow search algorithm
 
Particle Swarm Optimization - PSO
Particle Swarm Optimization - PSOParticle Swarm Optimization - PSO
Particle Swarm Optimization - PSO
 
Cuckoo search
Cuckoo searchCuckoo search
Cuckoo search
 

Similar to Cuckoo Search & Firefly Algorithms

Firefly Algorithm, Levy Flights and Global Optimization
Firefly Algorithm, Levy Flights and Global OptimizationFirefly Algorithm, Levy Flights and Global Optimization
Firefly Algorithm, Levy Flights and Global OptimizationXin-She Yang
 
Firefly Algorithm, Stochastic Test Functions and Design Optimisation
 Firefly Algorithm, Stochastic Test Functions and Design Optimisation Firefly Algorithm, Stochastic Test Functions and Design Optimisation
Firefly Algorithm, Stochastic Test Functions and Design OptimisationXin-She Yang
 
Cuckoo Search via Levy Flights
Cuckoo Search via Levy FlightsCuckoo Search via Levy Flights
Cuckoo Search via Levy FlightsXin-She Yang
 
Firefly Algorithms for Multimodal Optimization
Firefly Algorithms for Multimodal OptimizationFirefly Algorithms for Multimodal Optimization
Firefly Algorithms for Multimodal OptimizationXin-She Yang
 
Firefly Algorithm for Unconstrained Optimization
Firefly Algorithm for Unconstrained OptimizationFirefly Algorithm for Unconstrained Optimization
Firefly Algorithm for Unconstrained OptimizationIOSR Journals
 
Engineering Optimisation by Cuckoo Search
Engineering Optimisation by Cuckoo SearchEngineering Optimisation by Cuckoo Search
Engineering Optimisation by Cuckoo SearchXin-She Yang
 
Cuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An IntroductionCuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An IntroductionXin-She Yang
 
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...Xin-She Yang
 
A NOVEL ANT COLONY ALGORITHM FOR MULTICAST ROUTING IN WIRELESS AD HOC NETWORKS
A NOVEL ANT COLONY ALGORITHM FOR MULTICAST ROUTING IN WIRELESS AD HOC NETWORKS A NOVEL ANT COLONY ALGORITHM FOR MULTICAST ROUTING IN WIRELESS AD HOC NETWORKS
A NOVEL ANT COLONY ALGORITHM FOR MULTICAST ROUTING IN WIRELESS AD HOC NETWORKS cscpconf
 
A New Metaheuristic Bat-Inspired Algorithm
A New Metaheuristic Bat-Inspired AlgorithmA New Metaheuristic Bat-Inspired Algorithm
A New Metaheuristic Bat-Inspired AlgorithmXin-She Yang
 
Fire-LEACH: A Novel Clustering Protocol for Wireless Sensor Networks based on...
Fire-LEACH: A Novel Clustering Protocol for Wireless Sensor Networks based on...Fire-LEACH: A Novel Clustering Protocol for Wireless Sensor Networks based on...
Fire-LEACH: A Novel Clustering Protocol for Wireless Sensor Networks based on...ijcsta
 
Innovative computational intelligence ai techniques - Ahmed Yousry
Innovative computational intelligence ai techniques - Ahmed YousryInnovative computational intelligence ai techniques - Ahmed Yousry
Innovative computational intelligence ai techniques - Ahmed YousryAhmed Yousry
 
A New Metaheuristic Bat-Inspired Algorithm
A New Metaheuristic Bat-Inspired AlgorithmA New Metaheuristic Bat-Inspired Algorithm
A New Metaheuristic Bat-Inspired AlgorithmXin-She Yang
 
Analysis of Nature-Inspried Optimization Algorithms
Analysis of Nature-Inspried Optimization AlgorithmsAnalysis of Nature-Inspried Optimization Algorithms
Analysis of Nature-Inspried Optimization AlgorithmsXin-She Yang
 
Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms Xin-She Yang
 
Cib vol3no1 article4
Cib vol3no1 article4Cib vol3no1 article4
Cib vol3no1 article4Gissely Souza
 
Whale optimizatio algorithm
Whale optimizatio algorithmWhale optimizatio algorithm
Whale optimizatio algorithmAhmed Fouad Ali
 

Similar to Cuckoo Search & Firefly Algorithms (20)

Firefly Algorithm, Levy Flights and Global Optimization
Firefly Algorithm, Levy Flights and Global OptimizationFirefly Algorithm, Levy Flights and Global Optimization
Firefly Algorithm, Levy Flights and Global Optimization
 
Firefly Algorithm, Stochastic Test Functions and Design Optimisation
 Firefly Algorithm, Stochastic Test Functions and Design Optimisation Firefly Algorithm, Stochastic Test Functions and Design Optimisation
Firefly Algorithm, Stochastic Test Functions and Design Optimisation
 
Cuckoo Search via Levy Flights
Cuckoo Search via Levy FlightsCuckoo Search via Levy Flights
Cuckoo Search via Levy Flights
 
Firefly Algorithms for Multimodal Optimization
Firefly Algorithms for Multimodal OptimizationFirefly Algorithms for Multimodal Optimization
Firefly Algorithms for Multimodal Optimization
 
Firefly Algorithm for Unconstrained Optimization
Firefly Algorithm for Unconstrained OptimizationFirefly Algorithm for Unconstrained Optimization
Firefly Algorithm for Unconstrained Optimization
 
M01117578
M01117578M01117578
M01117578
 
Engineering Optimisation by Cuckoo Search
Engineering Optimisation by Cuckoo SearchEngineering Optimisation by Cuckoo Search
Engineering Optimisation by Cuckoo Search
 
Cuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An IntroductionCuckoo Search Algorithm: An Introduction
Cuckoo Search Algorithm: An Introduction
 
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
Eagle Strategy Using Levy Walk and Firefly Algorithms For Stochastic Optimiza...
 
Bat Algorithm
Bat AlgorithmBat Algorithm
Bat Algorithm
 
A NOVEL ANT COLONY ALGORITHM FOR MULTICAST ROUTING IN WIRELESS AD HOC NETWORKS
A NOVEL ANT COLONY ALGORITHM FOR MULTICAST ROUTING IN WIRELESS AD HOC NETWORKS A NOVEL ANT COLONY ALGORITHM FOR MULTICAST ROUTING IN WIRELESS AD HOC NETWORKS
A NOVEL ANT COLONY ALGORITHM FOR MULTICAST ROUTING IN WIRELESS AD HOC NETWORKS
 
A New Metaheuristic Bat-Inspired Algorithm
A New Metaheuristic Bat-Inspired AlgorithmA New Metaheuristic Bat-Inspired Algorithm
A New Metaheuristic Bat-Inspired Algorithm
 
Fire-LEACH: A Novel Clustering Protocol for Wireless Sensor Networks based on...
Fire-LEACH: A Novel Clustering Protocol for Wireless Sensor Networks based on...Fire-LEACH: A Novel Clustering Protocol for Wireless Sensor Networks based on...
Fire-LEACH: A Novel Clustering Protocol for Wireless Sensor Networks based on...
 
Innovative computational intelligence ai techniques - Ahmed Yousry
Innovative computational intelligence ai techniques - Ahmed YousryInnovative computational intelligence ai techniques - Ahmed Yousry
Innovative computational intelligence ai techniques - Ahmed Yousry
 
A New Metaheuristic Bat-Inspired Algorithm
A New Metaheuristic Bat-Inspired AlgorithmA New Metaheuristic Bat-Inspired Algorithm
A New Metaheuristic Bat-Inspired Algorithm
 
Analysis of Nature-Inspried Optimization Algorithms
Analysis of Nature-Inspried Optimization AlgorithmsAnalysis of Nature-Inspried Optimization Algorithms
Analysis of Nature-Inspried Optimization Algorithms
 
Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms Nature-Inspired Optimization Algorithms
Nature-Inspired Optimization Algorithms
 
Cib vol3no1 article4
Cib vol3no1 article4Cib vol3no1 article4
Cib vol3no1 article4
 
Glowworm Swarm Optimisation
Glowworm Swarm OptimisationGlowworm Swarm Optimisation
Glowworm Swarm Optimisation
 
Whale optimizatio algorithm
Whale optimizatio algorithmWhale optimizatio algorithm
Whale optimizatio algorithm
 

More from Mustafa Salam

Switch-based Interconnection Networks 2
Switch-based Interconnection Networks 2Switch-based Interconnection Networks 2
Switch-based Interconnection Networks 2Mustafa Salam
 
Interconnection Networks 1
Interconnection Networks 1Interconnection Networks 1
Interconnection Networks 1Mustafa Salam
 
Arabic Handwritten Text Recognition and Writer Identification
Arabic Handwritten Text Recognition and Writer IdentificationArabic Handwritten Text Recognition and Writer Identification
Arabic Handwritten Text Recognition and Writer IdentificationMustafa Salam
 
Web Services-Enhanced Agile Modeling and Integrating Business Processes
Web Services-Enhanced Agile Modeling and Integrating Business ProcessesWeb Services-Enhanced Agile Modeling and Integrating Business Processes
Web Services-Enhanced Agile Modeling and Integrating Business ProcessesMustafa Salam
 
The Burrows-Wheeler Algorithm
The Burrows-Wheeler AlgorithmThe Burrows-Wheeler Algorithm
The Burrows-Wheeler AlgorithmMustafa Salam
 
Link analysis .. Data Mining
Link analysis .. Data MiningLink analysis .. Data Mining
Link analysis .. Data MiningMustafa Salam
 
Template Matching - Pattern Recognition
Template Matching - Pattern RecognitionTemplate Matching - Pattern Recognition
Template Matching - Pattern RecognitionMustafa Salam
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategyMustafa Salam
 
Cloud technology (Mashup) + Case Study
Cloud technology (Mashup) + Case StudyCloud technology (Mashup) + Case Study
Cloud technology (Mashup) + Case StudyMustafa Salam
 

More from Mustafa Salam (11)

Switch-based Interconnection Networks 2
Switch-based Interconnection Networks 2Switch-based Interconnection Networks 2
Switch-based Interconnection Networks 2
 
Interconnection Networks 1
Interconnection Networks 1Interconnection Networks 1
Interconnection Networks 1
 
Parallel Processing
Parallel ProcessingParallel Processing
Parallel Processing
 
Arabic Handwritten Text Recognition and Writer Identification
Arabic Handwritten Text Recognition and Writer IdentificationArabic Handwritten Text Recognition and Writer Identification
Arabic Handwritten Text Recognition and Writer Identification
 
Web Services-Enhanced Agile Modeling and Integrating Business Processes
Web Services-Enhanced Agile Modeling and Integrating Business ProcessesWeb Services-Enhanced Agile Modeling and Integrating Business Processes
Web Services-Enhanced Agile Modeling and Integrating Business Processes
 
The Burrows-Wheeler Algorithm
The Burrows-Wheeler AlgorithmThe Burrows-Wheeler Algorithm
The Burrows-Wheeler Algorithm
 
Link analysis .. Data Mining
Link analysis .. Data MiningLink analysis .. Data Mining
Link analysis .. Data Mining
 
Template Matching - Pattern Recognition
Template Matching - Pattern RecognitionTemplate Matching - Pattern Recognition
Template Matching - Pattern Recognition
 
IP Addressing & subnetting strategy
IP Addressing & subnetting strategyIP Addressing & subnetting strategy
IP Addressing & subnetting strategy
 
Cloud technology (Mashup) + Case Study
Cloud technology (Mashup) + Case StudyCloud technology (Mashup) + Case Study
Cloud technology (Mashup) + Case Study
 
Color Models
Color ModelsColor Models
Color Models
 

Recently uploaded

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 

Recently uploaded (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 

Cuckoo Search & Firefly Algorithms

  • 1. Cuckoo Search & Firefly Algorithms By: Mustafa Salam
  • 3. Overview Cuckoo search (CS) is an optimization algorithm developed by Xin-she Yang and Suash Deb in 2009. Cuckoos have an aggressive reproduction strategy that involves the female laying her fertilized eggs in the nest of another species so that the surrogate parents unwittingly raise her brood. Sometimes the cuckoo's egg in the host nest is discovered (eggs are not its owns), the surrogate parents either throw it out or abandon the nest and builds their own brood elsewhere.
  • 4. Cuckoo Behavior  Some cuckoo species have evolved in such a way that female parasitic cuckoos are often very specialized in the mimicry in color and pattern of the eggs of a few chosen host species. This reduces the probability of eggs being abandoned and increases their reproductively.
  • 5. Cuckoo Behavior  Parasitic cuckoos often choose a nest where the host bird just laid its own eggs. In general, the cuckoo eggs hatch slightly earlier than their host eggs.
  • 6. Cuckoo Behavior  Once the first cuckoo chick is hatched, the first instinct action it will take is to evict the host eggs by blindly propelling the eggs out of the nest, which increases the cuckoo chick’s share of food provided by its host bird.
  • 7. Cuckoo Rules & Parameters 1) Each cuckoo lays one egg at a time, and dumps it in a randomly chosen nest. 2) The best nests with high quality of eggs (solutions) will carry over to the next generations. 3) The number of available host nests is fixed, and a host can discover an alien egg with a probability pa ∈ [0, 1]. In this case, the host bird can either throw the egg away or abandon the nest so as to build a completely new nest in a new location.
  • 8. • As a further approximation, this last assumption can be approximated by a fraction pa of the n nests being replaced by new nests (with new random solutions at new locations). • For a maximization problem, the quality or fitness of a solution can simply be proportional to the objective function. Other forms of fitness can be defined in a similar way to the fitness function in genetic algorithms.
  • 9. Lévy Flights A Lévy flight is a random walk in which the step-lengths are distributed according to a heavy-tailed probability distribution. After a large number of steps, the distance from the origin of the random walk tends to a stable distribution.
  • 10. Lévy Flights When generating new solutions flight is performed x(t+1) for, say cuckoo i, a L´evy xi(t+1) = xi(t) + α ⊕ L´evy(λ) New Solution Current Location …….. (1) The transition probability Where α > 0 is the step size, which should be related to the scales of the problem of interest. In most cases, we can use α= 1
  • 11. Lévy Flights L v flig tses n lly p v eara d mwlk w ileth ir ra d m ´e y h se tia ro id no a h e no s p a d w fro aL v d trib tio fo la es p te s re ra n m ´e y is u n r rg te s L´evy ∼ u = t−λ, (1 < λ ≤ 3) ……… (2) Which has an infinite variance with an infinite mean. Here the steps essentially form a random walk process with a power-law step-length distribution with a heavy tail. Some of the new solutions should be generated by L´evy walk around the best solution obtained so far, this will speed up the local search.
  • 12. Lévy Flights However, a substantial fraction of the new solutions should be generated by far field randomization and whose locations should be far enough from the current best solution, this will make sure the system will not be trapped in a local optimum.
  • 13. Pseudo code of Cuckoo Search algorithm Begin Objective function f(x), x = (x1, ..., xd)T ; Initial a population of n host nests xi (i = 1, 2, ..., n); while (t <MaxGeneration) or (stop criterion) Get a cuckoo (say i) randomly by Lévyflights; Evaluate its quality/fitness Fi; Choose a nest among n (say j) randomly; if (Fi > Fj) Replace j by the new solution; end Abandon a fraction (pa) of worse nests and build new ones at new locations via L´evy flights; Keep the best solutions (or nests with quality solutions); Rank the solutions and find the current best; end while Postprocess results and visualization; End
  • 14. Cuckoo Applications a) Spring design and Welded beam design problems. b) Solve nurse scheduling problem. c) An efficient computation for data fusion in wireless sensor networks. d) A new quantum-inspired cuckoo search was developed to solve Knapsack problems. e) Efficiently generate independent test paths for structural software testing and test data generation. f) Applied to train neural networks with improved performance.
  • 16. Firefly Algorithm The firefly algorithm (FA) is a metaheuristic algorithm, developed by Xin-She Yang in late 2007 and 2008 , which was based on the flashing patterns and behavior of fireflies.
  • 17. Behavior of Fireflies There are about two thousand firefly species, and most fireflies produce short and rhythmic flashes.  The pattern of flashes is often unique for a particular species. The flashing light is produced by a process of bioluminescence, and the true functions of such signaling systems are still debating.  However, two fundamental functions of such flashes are to attract mating partners (communication), and to attract potential prey.
  • 18. Behavior of Fireflies  In addition, flashing may also serve as a protective warning mechanism.  The rhythmic flash, the rate of flashing and the amount of time form part of the signal system that brings both sexes together.  Females respond to a male’s unique pattern of flashing in the same species, while in some species such as photuris, female fireflies can mimic the mating flashing pattern of other species so as to lure and eat the male fireflies who may mistake the flashes as a potential suitable mate.
  • 19. Firefly Rules & Parameters  Fireflies are unisex so that one firefly will be attracted to other fireflies regardless of their sex.  The attractiveness is proportional to the brightness, and they both decrease as their distance increases. Thus for any two flashing fireflies, the less brighter one will move towards the brighter one. If there is no brighter one than a particular firefly, it will move randomly.  The brightness of a firefly is determined by the landscape of the objective function.
  • 20. Firefly Rules & Parameters  The light intensity at a particular distance (r) from the light source obeys the inverse square law. That is to say , the light intensity (I) decreases as the distance (r) increases in terms of ( I ∝ 1/ r2 ).  Furthermore, the air absorbs light which becomes weaker and weaker as the distance increases.
  • 21. The algorithm In the firefly algorithm, there are three important formulas in firefly algorithm, which are:  Attractiveness The form of attractiveness function of a firefly is the following monotonically decreasing function. r Where e rm m 1 r is the distance between any two fireflies, is a fixed light absorption coefficient. ………… (1) is the attractiveness at r = 0 and
  • 22. The algorithm  Distance The distance between any two fireflies i and j at Xi and Xj, respectively, is the Cartesian distance as follows: Where xi,k is the (k)th component of the spatial coordinate Xi of (i)th firefly and d is the number of dimensions.
  • 23. The algorithm  Movement The movement of a firefly i is attracted to another more attractive (brighter) firefly j is determined by following equation: Where the second term is due to the attraction while the third term is ran d omi zati on wi th being the randomization parameter. rand is a random number generator uniformly distributed in [0, 1]. For most cases in the implementation, 1 and 0,1 . 0
  • 24. Pseudo code of the firefly algorithm Begin Objective function f (x), x = (x1 , ..., xd )T Generate initial population of fireflies xi (i = 1, 2, ..., n) Light intensity Ii at xi is determined by f ( xi ) Define light absorption coefficient γ while (t <MaxGeneration) for i = 1 : n all n fireflies for j = 1 : i all n fireflies ( inner loop ) if ( Ij > Ii ) Move firefly i towards j ; end if Attractiveness varies with distance r via e−γr Evaluate new solutions and update light intensity end for j end for i Rank the fireflies and find the current best end while Postprocess results and visualization End
  • 26. Firefly Applications  Digital Image Compression and Image Processing  Feature selection  Antenna Design  Structural Design  Scheduling  Clustering
  • 27. References [1] Xin-She Yang, Suash Deb: “Nature-Inspired Metaheuristic Algorithms”, Luniver Press, (2008). [2] Nitesh Sureja ,”New Inspirations in Nature: A Survey “, G H Patel College of Engineering & Technology, Vallabh Vidyanagar (Gujarat), INDIA (2012). [3] Shakti Kumar, Parvinder Kaur, Amarpartap Singh,” Fuzzy Model Identification: A Firefly Optimization Approach”, Department of Electronics & Communications, SLIET, Longowal, Punjab, INDIA(2012).