Firefly Algorithm Existing Leader Fireflies
Masaki Takeuchi

Haruna Matsushita

Yoko Uwate and Yoshifumi Nishio

Dept. of Electrical
Dept. of Electronics
Dept. of Electricaland Electronic Engineering,and Information Engineering,and Electronic Engineering,
Tokushima University
Kagawa University
Tokushima University
2-1 Minami-Josanjima,
2217-20 Hayashi-cho,
2-1 Minami-Josanjima,
Tokushima 770–8506, Japan
Takamatsu, Kagawa, 761-0396, Japan
Tokushima 770–8506, Japan
Email: masaki@ee.tokushima-u.ac.jp Email: haruna@eng.kagawa-u.ac.jp Email: {uwate, nishio}@ee.tokushima-u.ac.jp

Abstract—The community of human-beings, such as company
and laboratory, is created as core on the leader of the community. In this study, we propose Firefly Algorithm existing
leader fireflies. In our proposed FA, leader fireflies attract otherfireflies within certain distance. We compare our proposed FA
to the conventional FA with benchmark functions of CEC 2013.
Numerical experiments indicate our proposed FA is more efficientalgorithm than the conventional FA.

I. I NTRODUCTION
Evolutionary Computing (EC) is a subfield of artificial
intelligence (AI) in computer science, and is based on biological mechanisms of evolution. EC technique mainly involves
metaheuristic optimization algorithms such as Evolutionary
Algorithm (EA) and Swarm Intelligence (SI). SI algorithm
is one of stochastic algorithms. Stochastic algorithms havea deterministic component and a random component. Algorithms having only the deterministic component are almost
all local search algorithms. There is a risk to be trapped at
local optima such algorithms. However, stochastic algorithms
are possible to jump out such locality. SI algorithms are
based on the behavior of animals and insects. Representative
examples are Particle Swarm Optimization (PSO) [1], Ant
Colony Optimization (ACO), and Firefly Algorithm (FA) [2]–[4].
Human-beings belong to sub-society, which is called community such as company, laboratory and so on. The social
animal creates a society and lives in the society. In addition,
it is also believed that the animals are centered around aleader and have the society in the community. In otherwords, the community is created as core on the leader ofthe community. Moreover, in creating the community, thehuman-beings have some tendencies that human-beings easily
gather around the leader, such as a CEO controlling thecompany, a supervisor controlling the laboratory and so on.
In previous study, Haraguchi et al. have proposed a new typeof Self-Organizing Map (SOM) algorithm, which is called
Community SOM (CSOM) algorithm [7]. CSOM is composedof some leader neurons and its neighborhood neurons. They
have applied CSOM for clustering and data extraction tovarious input data. They have confirmed that the number ofcommunities created by CSOM is the same as the number ofclusters, and the each community size depends on the number

978-1-5090-1570-2/16/$31.00 ©2016 IEEEof the input data in the cluster and the shape of the cluster. By
numerical experiments, they have confirmed the effectivenessof CSOM in the application to the cluster extraction.
In this study, we propose new FA existing leader fireflies.
These leader fireflies attract other fireflies within certain distance. We compare our proposed FA to the conventional FA
with 28 benchmark functions of Congress on Evolutionary
Computation (CEC) 2013 [6]. Numerical experiments indicate
our proposed FA is more efficient algorithm than the conventional FA.
This study is organized as follows: first, we explain theconventional Firefly Algorithm in Section II, and then, we
describe in detail of our proposed method in Section III.
Followed by, we show numerical experiments. Finally, we
conclude in this study.
II. T HE C ONVENTIONAL F IREFLY A LGORITHM (FA)Firefly Algorithm (FA) has been developed by Yang in 2007,
and it was based on the idealized behavior of the flashing
characteristics of fireflies. The conventional FA is idealized
these flashing characteristics as the following three rules•

All fireflies are unisex so that one firefly is attracted toother 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. The attractiveness is
proportional to the brightness and they both decreaseas their distance increases. If no one is brighter than aparticular firefly, it moves randomly;•

The brightness or light intensity of a firefly is affected ordetermined by the landscape of the objective function to
be optimized.

Attractiveness of firefly β is defined by
β = (β0 − βmin )e−γrij + βmin2(1)where γ is the light absorption coefficient, β0 is the attractiveness at rij = 0, βmin is minimum value of β, and rij is the
distance between any two fireflies i and j at xi and xj . The

303

APCCAS 2016

(b) Our proposed FA (with leader firefly).

(a) The conventional FA.

Fig. 1. Firefly operation with/without leader firefly.

Algorithm 1 Firefly Algorithm
Objective function f (x), x = (x1 , ..., xd )T
Initialize a population of fireflies xi (i = 1, 2, ..., n)
Define light absorption coefficient γ
while t < M axGeneration dofor i = 1 to n, all n fireflies dofor j = 1 to n, all n fireflies doLight intensity Ii at xi is determined by f (xi )if Ii > Ij thenMove firefly i towards j in all d dimensions
end ifAttractiveness varies with distance r via exp[−γr]Evaluate new solutions and update light intensity
end forj
end fori
Rank the fireflies and find the current best
end while
Postprocess results and visualization

Moreover, in creating the community, the human-beings havesome tendencies that human-beings easily gather around theleader, such as a CEO controlling the company, a supervisor
controlling the laboratory and so on. Therefore, we propose
new FA existing leader fireflies in this study. These leader
fireflies are defined from the beginning at random. In our
proposed FA, normal fireflies and leader fireflies are attracted
by the following three steps• Normal fireflies are attracted to another more attractive
normal fireflies;•

Normal fireflies are attracted to leader fireflies regardlessof their attractiveness, if the distance between normal
firefly and leader firefly is rt,max /2 or less.
We define that rt,max is the maximum distance from leader
firefly at iteration t. In case of solving optimization problemsby the conventional FA, the less attractive fireflies are attracted
the more attractive fireflies. There is a risk to be trapped at
local optima. However, normal fireflies are attracted to lessattractive leader fireflies in our proposed FA. We assume that
normal fireflies falling into local optima escape by attracted
to leader fireflies.
Figure 1 shows the concept of our proposed FA when thenumber of leader fireflies is 1. Big firefly indicates leader
firefly and small fireflies indicate normal firefly. In Fig. 1(b),two normal fireflies within 2/rt,max from leader firefly are
attracted to leader firefly.
•

movement of the firefly i is attracted to another more attractive
firefly j, and is determined by
xi = xi + ∆x,(2)∆x = β(xj − xi ) + αϵi ,(3)where xi is the position vector of firefly i, ϵi is the vectorof random variable, and α(t) is the randomization parameter.
The parameter α(t) is defined by( −4 )t/tmax
10,(4)α(t) = α(0)0.9where t is the number of iteration.
Algorithm 1 shows pseudo code of the conventional FA for
minimum optimization problems.
III. F IREFLY A LGORITHM E XISTING L EADER F IREFLIESHuman-beings belong to sub-society, which is called community such as company, laboratory and so on. The community is created as core on the leader of the community.
978-1-5090-1570-2/16/$31.00 ©2016 IEEE

Leader fireflies are attracted to more attractive normal
fireflies;

IV. NUMERICAL EXPERIMENTS
We compare our proposed FA to the conventional FA withbenchmark functions of Congress on Evolutionary Computation (CEC) 2013 (see Table I).
The optimal solutions x∗ of these benchmark functions isshifted from 0, and the global optima f (x∗ ) are not equal to0. The search range of these functions is [−100, 100]D , and304

APCCAS 2016

because leader fireflies help normal fireflies falling into locality
to be got out.
Table III shows the average error value, minimum value,
maximum value and standard deviation of the conventional
FA and our proposed FA when the number of leader fireflies
is 1 (see Table III). Our proposed FA improves average error
value of 5 functions (f5 , f9 , f19 , f21 , f27 ) nearly 5 percent.
Moreover, improvement rates of f3 and f20 are more than 25
percent.

TABLE I
2013 CEC B ENCHMARK F UNCTIONS
No. Name
Unimodal Functions
1
Sphere function
2
Rotated High Conditioned Elliptic Function
3
Rotated Bent Cigar Function
4
Rotated Discus Function
5
Different Powers Function
Basic Multimodal Functions
6
Rotated Rosenbrock’s Function
7
Rotated Schaffers F7 Function
8
Rotated Ackley’s Function
9
Rotated Weierstrass Function
10
Rotated Griewank’s Function
11
Rastrigin’s Function
12
Rotated Rastrigin’s Function
13
Non-Continuous Rotated Rastrigin’s Function
14
Schwefel’s Function
15
Rotated Schwefel’s Function
16
Rotated Katsuura Function
17
Lunacek Bi Rastrigin Function
18
Rotated Lunacek Bi Rastrigin Function
19
Expanded Griewank’s plus Rosenbrock’s Function
20
Rotated Expanded Scaffer’s F6 Function
Composition Functions
21
Composition Function 1 (n=5, Rotated)
22
Composition Function 2 (n=3, Unrotated)
23
Composition Function 3 (n=3, Rotated)
24
Composition Function 4 (n=3, Rotated)
25
Composition Function 5 (n=3, Rotated)
26
Composition Function 6 (n=5, Rotated)
27
Composition Function 7 (n=5, Rotated)
28
Composition Function 8 (n=5, Rotated)f (x∗ )
−1400
−1300
−1200
−1100
−1000
−900
−800
−700
−600
−500
−400
−300
−200
−100
100
200
300
400
500
600

V. C ONCLUSION
In this study, we have proposed new Firefly Algorithm.
In our proposed FA, leader fireflies exist. These leader fireflies attract normal fireflies within certain distance. We havecompared our proposed FA to the conventional FA with 28
benchmark functions of 2013 Congress on Evolutionary Computation (CEC). Numerical experiments have indicated our
proposed FA is more efficient algorithm than the conventionalFA.
In the future work, we compare our proposed FA to anotherimproved algorithms, and try to improve the rules of leader
fireflies.

700
800
900
1000
1100
1200
1300
1400

R EFERENCESTABLE II
T HE N UMBER OF L EADER F IREFLIES
numberunimodalmultimodal
composition
total

1
3
9
5
17

2
2
6
5
13

3
3
4
2
9

4
2
6
5
13

5
2
5
4
12

the dimension N is 30. The total number of fireflies is also
30. Each numerical experiment is run 50 times. In each test
functions, the maximum number of iterations tmax is 1500.
We compare the number that our proposed FA wins theconventional FA in the comparison of average error value,
when the number of leader fireflies is changed from 1 to 5 (seeTable II).
Table II shows that the best number of leader fireflies is 1.
When the number of leader fireflies is changed from 1 to 5,
the results of basic multimodal functions change significantly.
Only when the number of leader fireflies is 1, our proposed
FA is more efficient algorithm than the conventional FA. Basic
multimodal functions have a lot of local optima. We assume
that fireflies of our proposed FA jump out locality easily. It is978-1-5090-1570-2/16/$31.00 ©2016 IEEE305

[1] J. Kennedy, and R. Eberhart, “Particle Swarm Optimization”, Proceedings of the IEEE international conference on neural networks, pp.
19421948, 1995.
[2] X.S. Yang, “Nature-Inspired Metaheuristic Algorithms Second Edition”,
Luniver Press, 2010.
[3] H. Matsushita, “Firefly Algorithm with Dynamically Changing Connections”, Proceedings of International Symposium on Nonlinear Theory
and its Application, pp.906-909, 2014.
[4] S. Lukasik, and S. Zak, “Firefly Algorithm for Continuous Constrained
Optimization Tasks”, Computational Collective Intelligence. Semantic
Web, Social Networks and Multiagent Systems, Vol. 5796 of the series
Lecture Notes in Computer Science, pp.97-106, 2009.
[5] X.S. Yang, and S. Deb, “Cuckoo search via Levy flights”, Proceedings ofWorld Congress on Nature & Biologically Inspired Computing (NaBIC
2009, India), pp.210214, 2009.
[6] J.J. Liang, B.Y. Qu, P.N. Suganthan, and A.G. Hernandez-Diaz, “Problem Definitions and Evaluation Criteria for the CEC 2013 Special Session on Real-Parameter Optimization”, Technical Report 201212, Computational Intelligence Laboratory, Zhengzhou University, Zhengzhou
China and Technical Report, Nanyang Technological University, Singapore, January 2013.
[7] T. Haraguchi, H. Matsushita, and Y. Nishio, “Community SelfOrganizing Map and its Application to Data Extraction”, Proceedings ofInternational Joint Conference on Neural Networks (IJCNN), pp.11071114, 2009.
[8] M. Takeuchi, H. Matsushita, Y. Uwate, and Y. Nishio, “Investigationof Firefly Algorithm Distinguishing between Males and Females for
Minimum Optimization Problems”, RISP International Workshop on
Nonlinear Circuits, Communications and Signal Processing (NCSP),
2016.
[9] M. Takeuchi, H. Matsushita, Y. Uwate, and Y. Nishio, “Firefly Algorithm
Distinguishing between Males and Females for Minimum Optimization
Problems”, being submitted to elsewhere.

APCCAS 2016

TABLE III
N UMERICAL E XPERIMENTS
f
f1

f2

f3

f4

f5

f6

f7

f8

f9

f10

f11

f12

f13

f14

avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std

FA
6.48 × 10−4
3.37 × 10−4
1.06 × 10−3
1.44 × 10−4
1.08 × 107
4.34 × 106
2.48 × 107
4.45 × 106
1.25 × 107
1.46 × 104
7.17 × 107
1.37 × 107
1.15 × 105
7.19 × 104
1.80 × 105
2.39 × 104
3.89 × 101
1.96 × 10−2
1.32 × 102
2.75 × 101
2.73 × 101
2.55 × 101
2.89 × 101
7.01 × 10−1
1.16 × 101
9.06 × 10−1
2.88 × 101
6.00 × 100
2.14 × 101
2.10 × 101
2.16 × 101
9.32 × 10−2
1.02 × 101
4.81 × 100
1.72 × 101
2.54 × 100
4.18 × 10−1
5.47 × 10−2
1.47 × 100
3.46 × 10−1
2.68 × 101
1.29 × 101
4.68 × 101
7.92 × 100
2.60 × 101
1.29 × 101
4.48 × 101
6.95 × 100
6.68 × 101
3.74 × 101
1.19 × 102
1.84 × 101
2.21 × 103
7.39 × 102
3.70 × 103
4.53 × 102

978-1-5090-1570-2/16/$31.00 ©2016 IEEE

Proposed FA
6.58 × 10−4
4.78 × 10−4
1.03 × 10−3
1.23 × 10−4
1.05 × 107
2.29 × 106
2.62 × 107
4.38 × 106
9.01 × 106
1.44 × 103
6.73 × 107
1.31 × 107
1.28 × 105
7.04 × 104
1.96 × 105
2.64 × 104
3.72 × 101
2.00 × 10−2
9.01 × 101
2.06 × 101
2.73 × 101
2.57 × 101
2.93 × 101
7.70 × 10−1
1.16 × 101
1.44 × 100
2.68 × 101
6.21 × 100
2.14 × 101
2.12 × 101
2.16 × 101
8.55 × 10−2
9.70 × 100
4.72 × 100
1.47 × 101
2.21 × 100
5.26 × 10−1
7.66 × 10−2
1.88 × 100
4.76 × 10−1
2.83 × 101
8.96 × 100
5.57 × 101
7.95 × 100
2.71 × 101
1.39 × 101
5.37 × 101
8.02 × 100
7.54 × 101
3.01 × 101
1.47 × 102
2.40 × 101
2.16 × 103
1.03 × 103
3.59 × 103
5.55 × 102

f15

f16

f17

f18

f19

f20

f21

f22

f23

f24

f25

f26

f27

f28

avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std
avg
min
max
std

f
best solution306

2.19 × 103
6.82 × 102
3.98 × 103
6.04 × 102
9.78 × 10−2
4.14 × 10−2
1.99 × 10−1
3.29 × 10−2
5.82 × 101
4.50 × 101
7.78 × 101
7.09 × 100
6.36 × 101
4.61 × 101
7.95 × 101
7.33 × 100
3.65 × 100
2.03 × 100
5.15 × 100
6.58 × 10−1
1.50 × 101
1.50 × 101
1.50 × 101
8.75 × 10−13
3.36 × 102
2.00 × 102
4.44 × 102
7.92 × 101
3.01 × 103
1.57 × 103
6.00 × 103
1.01 × 103
4.05 × 103
1.82 × 103
5.63 × 103
9.18 × 102
2.22 × 102
2.01 × 102
2.39 × 102
1.15 × 101
2.35 × 102
2.20 × 102
2.61 × 102
8.69 × 100
2.84 × 102
1.27 × 102
3.30 × 102
5.19 × 101
4.39 × 102
3.09 × 102
6.72 × 102
1.12 × 102
3.16 × 102
1.01 × 102
1.44 × 103
1.65 × 102
FA
11

2.33 × 103
1.17 × 103
3.77 × 103
5.46 × 102
9.72 × 10−2
4.23 × 10−2
2.11 × 10−1
3.67 × 10−2
6.05 × 101
4.44 × 101
8.50 × 101
7.47 × 100
6.33 × 101
4.79 × 101
8.89 × 101
7.85 × 100
3.50 × 100
2.04 × 100
4.79 × 100
7.10 × 10−1
5.40 × 100
2.04 × 100
1.50 × 101
4.24 × 100
3.19 × 102
2.00 × 102
4.44 × 102
7.86 × 101
3.23 × 103
1.31 × 103
6.05 × 103
1.09 × 103
3.98 × 103
1.37 × 103
5.69 × 103
1.02 × 103
2.18 × 102
2.01 × 102
2.40 × 102
1.24 × 101
2.35 × 102
2.19 × 102
2.55 × 102
8.22 × 100
3.10 × 102
2.00 × 102
3.37 × 102
2.48 × 101
4.70 × 102
3.13 × 102
7.10 × 102
1.06 × 102
3.02 × 102
1.01 × 102
1.37 × 103
1.64 × 102
Proposed FA
17

APCCAS 2016