Firefly Algorithm
Firefly Algorithm
Algorithm
By
Rasool Tavakoli
Outline
Abstract
Introduction
Particle Swarm Optimization
Firefly Algorithm
Comparison of FA with PSO and GA
Conclusions
References
2
Isfahan University of Technology. Dec 2011
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.
Finally we will compare the proposed firefly
algorithm with other metaheuristic algorithms
such as particle swarm optimization by the
implementation results.
3
Isfahan University of Technology. Dec 2011
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
was developed by Xin-She Yang at Cambridge University in 2007
particle swarm optimization is just a special class of the
firefly algorithms
4
Isfahan University of Technology. Dec 2011
PSO
6
Isfahan University of Technology. Dec 2011
PSO
7
Isfahan University of Technology. Dec 2011
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
8
Isfahan
Isfahan University
University ofof Technology.
Technology. Fall
Dec 2011
2010
Behavior of Fireflies
Two fundamental functions of such flashes are:
to attract mating partners (communication)
to attract potential prey
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
10
Isfahan University of Technology. Dec 2011
Firefly Algorithm
11
Isfahan University of Technology. Dec 2011
Attractiveness
12
Isfahan University of Technology. Dec 2011
Attractiveness
13
Isfahan University of Technology. Dec 2011
14
Isfahan University of Technology. Dec 2011
15
Isfahan University of Technology. Dec 2011
Validation
16
Isfahan University of Technology. Dec 2011
Validation
17
Isfahan University of Technology. Dec 2011
Validation
18
Isfahan University of Technology. Dec 2011
Comparison of FA
with PSO and GA
19
Isfahan University of Technology. Dec 2011
Conclusions
New firefly algorithm have some similarities and
differences with particle swarm optimization
Flying to other fireflies replaced with crossoover.
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
20
Isfahan University of Technology. Dec 2011
References
[1] Kennedy, J. and Eberhart, R. C. (1995) Particle swarm optimization, Proc. of
IEEE International Conference on Neural Networks, Piscataway, NJ. pp. 19421948.
[2] Yang X. S.: Firefly algorithms for multimodal optimization. in: Stochastic
Algorithms: Foundations and Applications (Eds. O. Watanabe and T. Zeugmann),
Springer, SAGA 2009, Lecture Notes in Computer Science, 5792, 169-178 (2009).
[3] Yang, X. S., (2010) Firefly Algorithm, Stochastic Test Functions and Design
Optimization, Int. J. Bio-Inspired Computation, Vol. 2, No. 2, pp.7884.
[4] X.-S. Yang, Firefly algorithm, Levy flights and global optimization, in: Research
and Development in Intelligent Systems XXVI (Eds M. Bramer, R. Ellis, M.
Petridis), Springer London, pp. 209-218 (2010).
[5] Yang, X. S. Nature-Inspired Metaheuristic Algorithms, Luniver Press, UK, 2008.
[6] Engineering Optimization -An Introduction with Metaheuristic Applications, Wiley,
UK, 2010.
21
Isfahan University of Technology. Dec 2011
22
Isfahan University of Technology. Dec 2011