Upload
phungtu
View
219
Download
5
Embed Size (px)
Citation preview
1
计算智能
第9讲: 萤火虫算法
2017-5-2
2
Firefly Algorithm
by Mr Zamani
& Hosseini
3
Isfahan University of Technology. Fall 2010
4
Outline
• Abstract
• Introduction
• Particle Swarm Optimization
• Firefly Algorithm
• Comparison of FA with PSO and GA
• Conclusions
• References
Isfahan University of Technology. Fall 2010
5
Abstract
• Nature-inspired algorithms are among the most powerful algorithms for optimization
• We will try to provide a detailed description of a new Firefly Algorithm (FA) for multimodal optimization applications
• We will compare the proposed firefly algorithm with other metaheuristic algorithms such as particle swarm optimization
• Finally we will discuss its applications
and implications for further research
Isfahan University of Technology. Fall 2010
6
Introduction
• PSO – Particle swarm optimization (PSO) was developed by Kennedy
and Eberhart in 1995
– based on the swarm behavior such as fish and bird schooling in nature, the so-called swarm intelligence
– Though particle swarm optimization has many similarities with genetic algorithms, but it is much simpler because it does not use mutation/crossover operators
– Instead, it uses the real-number randomness and the global communication among the swarming particles. In this sense, it is also easier to implement as it uses mainly real numbers
• FA – particle swarm optimization is just a special class of the
firefly algorithms
Isfahan University of Technology. Fall 2010
7
Particle Swarm Optimization(PSO)
• The PSO algorithm searches the space of the objective functions by adjusting the trajectories of individual agents, called particles, as the piecewise paths formed by positional vectors in a quasi-stochastic manner
• The particle movement has two major components
– stochastic component
– deterministic component
Isfahan University of Technology. Fall 2010
8
PSO
Isfahan University of Technology. Fall 2010
9
PSO
Isfahan University of Technology. Fall 2010
10
Behavior of Fireflies
• The flashing light of fireflies is an amazing
sight in the summer sky in the tropical and
temperate regions
• 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
Isfahan University of Technology. Fall 2010 Isfahan University of Technology. Fall 2010
11
Behavior of Fireflies
• Two fundamental functions of such flashes are – to attract mating partners (communication)
– to attract potential prey
• Females respond to a male’s unique pattern of flashing in the same species
• We know that the light intensity at a particular distance ‘r’ from the light source obeys the inverse square law
• The air absorbs light which becomes weaker and weaker as the distance increases
• The flashing light can be formulated in such
a way that it is associated with the
objective function
Isfahan University of Technology. Fall 2010
12
Firefly Algorithm
• For simplicity in describing our new FA we now use the following three idealized rules: – all fireflies are unisex so that one firefly will be
attracted to other fireflies regardless of their sex
– Attractiveness is proportional to their brightness, 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 affected or determined by the landscape of the objective function. For a maximization problem, the brightness can simply
be proportional to the value of the
objective function
Isfahan University of Technology. Fall 2010
13
Firefly Algorithm
Isfahan University of Technology. Fall 2010
14
Attractiveness
Isfahan University of Technology. Fall 2010
15
Attractiveness
Isfahan University of Technology. Fall 2010
16
Distance and Movement
Isfahan University of Technology. Fall 2010
17
Scaling and Asymptotic Cases
• It is worth pointing out that the distance r
defined above is not limited to the
Euclidean distance
• There are two important limiting cases
when
–
–
Isfahan University of Technology. Fall 2010
18
Validation
Isfahan University of Technology. Fall 2010
19
Validation
Isfahan University of Technology. Fall 2010
20
Validation
Isfahan University of Technology. Fall 2010
21
Comparison of FA
with PSO and GA
Isfahan University of Technology. Fall 2010
22
PSO vs. FA
• PSO has search velocities, determined by
inertia, personal influence and social influence
• FA lacks search velocities, it uses an inverse-
square law to guide interactions between all
search processes. This leads to more localised
interactions and a consequent tendency to form
multiple regions of search.
Isfahan University of Technology. Fall
2010
23
GA vs. FA
• GA uses binary representation, has
mutation and crossover operations,
computational costly
• FA directly operates on real numerical
values, and does not have mutation and
crossover operations, it updates positions
by updating velocity, so is more efficient
Isfahan University of Technology. Fall
2010
24
Conclusions
• we have formulated a new firefly algorithm and analyzed its similarities and differences with particle swarm optimization
• We then implemented and compared these algorithms
• Our simulation results for finding the global optima of various test functions suggest that particle swarm often outperforms traditional algorithms such as genetic algorithms, while the new
firefly algorithm is superior to both PSO and
GA in terms of both efficiency and
success rate
Isfahan University of Technology. Fall 2010
25
Levy Flights
• Flight behavior of many animals and
insects
• Fruit flies explore their landscape using a
series of straight flight paths punctuated
by a sudden 90 degree turn.
• Applied to optimization and optimal search
Isfahan University of Technology. Fall 2010
26
Levy Flights (Cont.)
Isfahan University of Technology. Fall 2010
27
Levy Flights Example
• Left: example of 1000 steps of levy flight
• Right: example of 1000 steps of an approximation to a Brownian motion type of Levy flight
Isfahan University of Technology. Fall 2010
28
Levy-Flight Firefly Algorithm (LFA)
Isfahan University of Technology. Fall 2010
29
LFA Tests
• Initial locations of 40 fireflies (left) and their locations after 5 iterations (right) on 2D Ackley function.
Isfahan University of Technology. Fall 2010
30
LFA vs. PSO
Isfahan University of Technology. Fall 2010
31
Eagle Strategy (ES)
• Based on the foraging behavior of eagles such as golden eagles.
• An eagle forages in its own territory by flying freely in a random manner much like the Levy flights.
• Once the prey is sighted, the eagle will change its search strategy to an intensive chasing tactics so as to catch the prey as efficiently as possible.
Isfahan University of Technology. Fall 2010
32
ES
• Perform Levy walks in whole domain.
• If find a prey change to a chase strategy.
• Chase strategy can be considered as an
intensive local search.
• We can use any optimization technique.
• We can use FA.
Isfahan University of Technology. Fall 2010
33
Isfahan University of Technology. Fall 2010
34
ES vs. PSO
Isfahan University of Technology. Fall 2010
35
Glowworm Swarm Optimization
(GSO)
• Glowworm == immature
firefly
• Similar to FA but with little
differences.
• introduced by K.N.
Krishnanand and D. Ghose
in 2005.
• Multimodal optimization
Isfahan University of Technology. Fall 2010
36
Dynamic Decision Range
• Effect of distant glowworms are
discounted when a glowworm has
sufficient number of neighbors or the
range goes beyond the range of
perception of the glowworms.
• Every glowworm has a neighborhood
range
• Agents depend only on information
available in their neighborhood
Isfahan University of Technology. Fall 2010
37
Dynamic Decision Range(Cont.)
• Neighborhood is bounded by a radial sensor range.
Isfahan University of Technology. Fall 2010
38
Dynamic Decision Range(Cont.)
Isfahan University of Technology. Fall 2010
39
Isfahan University of Technology. Fall 2010
40
Isfahan University of Technology. Fall 2010
41
GSO vs. PSO
Isfahan University of Technology. Fall 2010
42
GSO vs. PSO (Cont.)
Isfahan University of Technology. Fall 2010
43
flow shop scheduling problem
(FSSP)
• a complex combinatorial optimization
problem
• set of n jobs (1, …, n)
• set of m machines (1, …, m)
• Set of n jobs to be processed in a set of m
machines in the same order
• minimization of makespan, mean flow, etc.
Isfahan University of Technology. Fall 2010
44
FSSP Cont.
• NP-Complete
• (n!)m schedules need to be considered
• Many attempts to solve this problem using
different methods including EAs.
• FA can be used
Isfahan University of Technology. Fall 2010
45
Discretization of FA
Isfahan University of Technology. Fall 2010
46
Discrete Firefly Algorithm (DFA)
• Use the sigmoid function to convert real values
to binary values
• Outperforms an ACO implementation named
MHD-ACS.
Isfahan University of Technology. Fall 2010
47
References
Isfahan University of Technology. Fall 2010
48
References
Isfahan University of Technology. Fall 2010
49
Isfahan University of Technology. Fall 2010