+ All Categories
Home > Education > Cuckoo Search & Firefly Algorithms

Cuckoo Search & Firefly Algorithms

Date post: 01-Sep-2014
Category:
Upload: mustafa-salam
View: 1,151 times
Download: 10 times
Share this document with a friend
Description:
metaheuristic algorithms - Cuckoo Search & Firefly Algorithms and their applications
Popular Tags:
28
Cuckoo Search & Firefly Algorithms By: Mustafa Salam
Transcript
Page 1: Cuckoo Search & Firefly Algorithms

Cuckoo Search & Firefly Algorithms

By: Mustafa Salam

Page 2: Cuckoo Search & Firefly Algorithms

Cuckoo Search Algorithm

Page 3: Cuckoo Search & Firefly Algorithms

OverviewCuckoo 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.

Page 4: Cuckoo Search & Firefly Algorithms

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.

Page 5: Cuckoo Search & Firefly Algorithms

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.

Page 6: Cuckoo Search & Firefly Algorithms

Cuckoo BehaviorOnce 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.

Page 7: Cuckoo Search & Firefly Algorithms

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.

Page 8: Cuckoo Search & Firefly Algorithms

•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.

Page 9: Cuckoo Search & Firefly 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.

Page 10: Cuckoo Search & Firefly Algorithms

Lévy Flights

When generating new solutions x(t+1) for, say cuckoo i, a L´evy flight is performed xi(t+1) = xi(t) + α ⊕ L evy(λ ) …….. (1)

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

New Solution Current Location

The transition probability

Page 11: Cuckoo Search & Firefly Algorithms

Lévy Flights

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.

Levy flights essentially provide a random walk while their random steps are drawn from a Levy distribution for large steps L evy ∼ u = t−λ, (1 < λ ≤ 3) ……… (2)

Page 12: Cuckoo Search & Firefly Algorithms

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.

Page 13: Cuckoo Search & Firefly Algorithms

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

Page 14: Cuckoo Search & Firefly Algorithms

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.

Page 15: Cuckoo Search & Firefly Algorithms

Firefly Algorithm

Page 16: Cuckoo Search & Firefly Algorithms

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.

Page 17: Cuckoo Search & Firefly Algorithms

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.

Page 18: Cuckoo Search & Firefly Algorithms

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.

Page 19: Cuckoo Search & Firefly Algorithms

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.

Page 20: Cuckoo Search & Firefly Algorithms

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.

Page 21: Cuckoo Search & Firefly Algorithms

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.

Where r is the distance between any two fireflies, bo is the attractiveness at r = 0 and g is a fixed light absorption coefficient.

b r bo e gr m m 1 ………… (1)

Page 22: Cuckoo Search & Firefly Algorithms

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.

Page 23: Cuckoo Search & Firefly Algorithms

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 randomization with being the randomization parameter. rand is a random number generator uniformly distributed in [0, 1]. For most cases in the implementation, b0 1 and 0,1 .

Page 24: Cuckoo Search & Firefly Algorithms

Pseudo code of the firefly algorithmBeginObjective 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 intensityend for j

end for iRank the fireflies and find the current bestend whilePostprocess results and visualizationEnd

Page 25: Cuckoo Search & Firefly Algorithms

Performance Comparison

Page 26: Cuckoo Search & Firefly Algorithms

Firefly Applications

Digital Image Compression and Image Processing Feature selection Antenna Design Structural Design Scheduling Clustering

Page 27: Cuckoo Search & Firefly Algorithms

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).

Page 28: Cuckoo Search & Firefly Algorithms

Thank You


Recommended