2016 International Symposium on Nonlinear Theory and Its Applications,
NOLTA2016, Yugawara, Japan, November 27th-30th, 2016

Hybrid Method of Genetic Algorithm andFirefly Algorithm Distinguishing between Males and Females
Masaki Takeuchi† , Haruna Matsushita‡ , Yoko Uwate† and Yoshifumi Nishio††Dept. of Electrical and Electronic Engineering, Tokushima University
2-1 Minami-Josanjima, Tokushima 770–8506, Japan‡Dept. of Electronics and Information Engineering, Kagawa University
2217-20 Hayashi-cho, Takamatsu, Kagawa, 761-0396, Japan
Email: masaki@ee.tokushima-u.ac.jp, haruna@eng.kagawa-u.ac.jp, {uwate, nishio}@ee.tokushima-u.ac.jp
Abstract—We have proposed Firefly Algorithm Distinguishing between Males and Females (FADMF). This algorithm exists together with males and females. In thisstudy, we propose Firefly Algorithm Distinguishing between Males and Females Combined with Genetic Algorithm (FADCG). This proposed algorithm is applied genetic operators every certain iteration. We compare these
two algorithms and the conventional Firefly Algorithm byusing 2013 Congress on Evolutionary Computation (CEC)
benchmark functions. Numerical experiments indicate that
FADCG is eﬀective for complex optimization problems.
1. Introduction
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).
Genetic Algorithm (GA) is one paradigms and most popular technique of major EA. On GA, individuals of a population evolve according to crossover, mutation, and selection from the population. The crossover and mutation create the necessary diversity. On the other hand, selection
acts as a force increasing quality. There are two most notable advantage: the ability of dealing with complex problems and parallelism. However, GA also has some minor
disadvantages. The choice of important parameters such as
the mutation probability and the crossover probability, andthe selection criteria of new population should be carefully
carried out.
SI algorithm is one of stochastic algorithms. Stochastic algorithms have a deterministic component and a random component. Algorithms having only the deterministic
component are almost all local search algorithms. There isa 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 idealized behaviorof animals and insects. Representative examples are Particle Swarm Optimization (PSO), Ant Colony Optimization (ACO), and Firefly Algorithm (FA) [1–3].
On FA, all fireflies are unisex. However, there are males

and females in the real world. In our previous study,
we have proposed algorithm distinguishing sex of fireflies[4]. This method is called Firefly Algorithm Distinguishing between Males and Females (FADMF). On FADMF,
the movements of males and females are diﬀerent fromeach other. This proposed algorithm has been applied 27
benchmark functions of Congress on Evolutionary Computation (CEC) 2013. Numerical experiments indicatedthat FADMF is superior to the conventional FA under someconditions. FADMF jump out locality more easily than theconventional FA, while FA-DMF is inferior about absorption speed.
It is paid many attentions to combine SI algorithm withGA [5, 6]. These hybrid algorithms outperform the standard algorithms. Especially, some hybrid PSO and GA algorithms obtain better results than the conventional PSO
and GA. In this study, we propose the hybrid methodof FADMF and GA. This method is called Firefly Algorithm Distinguishing between Males and Females Combined with Genetic Algorithm (FADCG). This method involves male and female swarms, and is also performed every certain iteration by using genetic operators. We compare the proposed method and the conventional FA by using
27 benchmark functions of CEC 2013. Numerical experiments indicate that the proposed method is more eﬃcientalgorithm than the conventional FA.
This study is organized as follows: first, we explain theconventional Genetic Algorithm in Section 2, and then, we
explain the conventional Firefly Algorithm in Section 3.
The next, we explain FADMF in Section 4. Followed by,
we describe in detail of FADCG. In Section 6, we show
numerical experiments. Finally, we conclude in this study.
2. Firefly Algorithm (FA)Firefly Algorithm (FA) has been developed by Yang, andit 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- 542 -• 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 aﬀected
or determined by the landscape of the objective function to be optimized.
Attractiveness of firefly β is defined by−γri2jβ = β0 e(1)where γ is the light absorption coeﬃcient, β0 is the attractiveness at ri j = 0, and ri j is the distance between any two
fireflies i and j at xi and x j . The movement of the firefly i is attracted to another more attractive firefly j, and isdetermined by
xi = xi + ∆x, ∆x = β(x j − xi ) + αϵi ,(2)where xi is the position vector of firefly i, ϵi is the vector of
random variable, and α(t) is the randomization parameter.
The parameter α(t) is defined by(
α(t) = α(0)

10−4
0.9

process of taking two parent genes is used, such as twopoint crossover and uniform crossover. After the crossoveris performed, individuals are mutated. This process is toprevent falling into a local optima. Genes of the oﬀspringare changed randomly by the mutation.
The crossover probability, the mutation probability, andpopulation size should be carefully carried out.
4. Firefly Algorithm Distinguishing between Males andFemales (FADMF)
One of the rules of the conventional FA is all fireflies areunisex. However, males and females exist in the real world.
Therefore, we distinguish sex of fireflies, that is, there are
two swarms in our proposed method. We call our proposed
method Firefly Algorithm Distinguishing between Males
and Females (FA-DMF). The movement of female is modeled from the physical diﬀerences. In the real world, females are bigger than males and female eyes are smaller
than male. Thus, in our proposed method, females moveslower than males, and females have diﬃculty finding the
flashes of other distant fireflies. In addition, we change therandomization parameter of female.
The female parameters α(t) and β, and the female movement x is determined with parameters V and W by)t/tmax(,104
α(t) = α(0)
0.9

(3)

)t/2tmax,(4)

where t is the number of iteration.

β = β0 e−γri j /W ,(5)

3. Genetic Algorithm (GA)x = x + ∆x/V.

(6)

2

Genetic Algorithm (GA) has been developed by Holland
J. and it is a model of biological evolution based on Charles
Darwin’s theory of nature selection. The conventional GA
is often done by the following procedure:• Creating a population of individuals;• Evaluating the fitness of all the individuals in the population;• Updating the population;• Terminating generation when a maximum number ofgenerations has been produced.
The essential part of GA is formed from genetic operators such as the crossover, mutation, and selection.
Individuals are stochastically selected from the population to create the basis of the next population. The fitter
individuals have a more chance of selection than weakerone. There are many ways how to select the best individuals, such as Roulette Wheel Selection, Rank Selection,
and Tournament Selection. The crossover selects genes
from parent, and creates a new oﬀspring. Commonly, a

In the proposed method, males are attracted to all fireflies, while females are attracted to only males. Males
move the same as fireflies of the conventional FA.
5. Firefly Algorithm Distinguishing between Males
and Females Combined with Genetic Algorithm(FADCG)In this study, we propose the hybrid method of FADMF
and GA. This proposed method is called Firefly Algorithm Distinguishing between Males and Females Combined with Genetic Algorithm (FADCG). All fireflies moveevery iteration according to FADMF. In addition, fireflies
are applied genetic operators every certain iteration. We
use uniform crossover and the mutation of genetic operators. We define that the crossover probability is 100 percent
and the mutation probability is 30 percent.
6. Numerical Experiments
We compare FADCG to the conventional FA and
FADMF with benchmark functions of CEC 2013 except
function 20 (see Table 1).

- 543 -

Table 1: Benchmark Functions of CEC 2013
No. Namef (x∗ )
Unimodal Functions
1
Sphere function−1400
2
Rotated High Conditioned Elliptic Function−1300
3
Rotated Bent Cigar Function−1200
4
Rotated Discus Function−1100
5Diﬀerent Powers Function−1000
Basic Multimodal Functions
6
Rotated Rosenbrock’s Function−900
7Rotated Schaﬀers F7 Function−800
8Rotated Ackley’s Function−700
9Rotated Weierstrass Function−600
10 Rotated Griewank’s Function−500
11 Rastrigin’s Function−400
12 Rotated Rastrigin’s Function−300
13 Non-Continuous Rotated Rastrigin’s Function−200
14 Schwefel’s Function−100
15 Rotated Schwefel’s Function
100
16 Rotated Katsuura Function
200
17 Lunacek Bi Rastrigin Function
300
18 Rotated Lunacek Bi Rastrigin Function
400
19 Expanded Griewank’s plus Rosenbrock’s Function
500
Composition Functions
21 Composition Function 1 (n=5, Rotated)
700
22 Composition Function 2 (n=3, Unrotated)
800
23 Composition Function 3 (n=3, Rotated)
900
24 Composition Function 4 (n=3, Rotated)
1000
25 Composition Function 5 (n=3, Rotated)
1100
26 Composition Function 6 (n=5, Rotated)
1200
27 Composition Function 7 (n=5, Rotated)
1300
28 Composition Function 8 (n=5, Rotated)
1400
The optimal solutions x∗ of these benchmark functions
is shifted from 0, and the global optima f (x∗ ) are not equal
to 0. The search range of these functions is [−100, 100]D ,and the dimension N is 30. Each numerical experiment is
run 50 times. In each test functions, tmax = 1500, V = 3,
W = 4. In this study, we change female percentage from10 to 90 every 10 percentage. The best female percentageof FADCG is 40 percent, while the best female percentageof FADMF is 30 percent. Numerical experiments of thebest female percentage are summarized in Table 2. Table 2
shows the average value, minimum value, maximumvalue,and standard deviation.
FADCG obtains a lot of best solutions more than othertwo algorithms. FADCG performs best on 10 times. In addition, FADCG obtains better results than the conventional
FA at 17 times. Therefore, FADCG is superior to the conventional FA and FADMF.
In the case of unimodal functions, FADMF performs
best on 3 times. FADCG obtains significantly worse results than other two algorithms. Therefore, we assume that
FADCG converges slower than the conventional FA and

FADMF.
In the case of basic multimodal functions, FADMF and
FADCG perform best on 5 times. Therefore, FADMF and
FADCG are fitted for basic multimodal functions.
In the case of composition functions, FADCG performs
best on 5 times. FADCG is significantly superior to othertwo algorithms.
7. Conclusion
In this study, we have proposed Firefly Algorithm Distinguishing between Males and Females Combined with Genetic Algorithm (FADCG). This algorithm has male andfemale swarms which move diﬀerently each other, and isapplied genetic operators every certain iteration. We havecompared FADCG to the conventional FA and FADMF byusing benchmark functions of Congress on Evolutionary
Computation (CEC) 2013. Numerical experiments indicatethat FADCG is superior to other algorithms, while FADMF
is superior to other functions for unimodal functions. In
other words, FADCG is eﬀective for complex multimodal
functions.
In the future work, we investigate parameters of FADCG
more details. Furthermore, we compare FADCG to otherimproved algorithms, and apply to actual optimization
problems.
References[1] Yang, X.S., ”Nature-Inspired Metaheuristic Algorithms Second Edition”, Luniver Press, 2010.
[2] H. Matsushita, ”Firefly Algorithm with Dynamically Changing Connections”, Proceedings of International Symposium on Nonlinear Theory and its Application, pp.906-909, 2014.
[3] S. Lukasik, 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.
[4] M. Takeuchi, H. Matsushita, Y. Uwate, and Y. Nishio,“Investigation of Firefly Algorithm Distinguishing between Males and Females”,RISP International Workshop on Nonlinear Circuits, Communications andSignal Processing (NCSP’16), 2016.
[5] K. Premalatha, A. M. Natarajan, ”Hybrid PSO andGA for Global Maximization”, ICSRS Publicaion,
2009.
[6] X. H. Shi, Y. C. Liang, H. P. Lee, C. Lu, L. M. Wang,”An improved GA and a novel PSO-GA-based hybridalgorithm”, Information Processing Letters, pp.255261, 2005.

- 544 -

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.11 × 10−4
3.47 × 10−4
9.53 × 10−4
1.40 × 10−4
1.09 × 107
5.31 × 106
1.93 × 107
3.39 × 106
1.37 × 107
3.77 × 103
1.74 × 108
2.54 × 107
1.09 × 105
6.22 × 104
1.57 × 105
2.54 × 104
3.89 × 101
2.28 × 10−2
1.53 × 102
3.19 × 101
2.74 × 101
2.60 × 101
2.92 × 101
7.23 × 10−1
1.16 × 101
2.39 × 100
3.01 × 101
6.14 × 100
2.14 × 101
2.12 × 101
2.16 × 101
7.45 × 10−2
1.00 × 101
4.86 × 100
1.48 × 101
2.43 × 100
6.29 × 10−1
7.31 × 10−2
2.20 × 100
5.41 × 10−1
2.68 × 101
1.29 × 101
5.07 × 101
7.12 × 100
3.01 × 101
1.49 × 101
5.17 × 101
8.16 × 100
6.77 × 101
1.52 × 101
1.18 × 102
2.52 × 101
2.34 × 103
9.36 × 102
4.15 × 103
6.73 × 102

FADMF
5.61 × 10−4
2.34 × 10−4
9.33 × 10−4
1.25 × 10−4
3.96 × 106
1.39 × 106
7.96 × 106
1.64 × 106
9.14 × 106
5.18 × 103
5.08 × 107
1.25 × 107
1.38 × 105
8.09 × 104
2.09 × 105
2.87 × 104
1.92 × 10−2
1.36 × 10−2
2.58 × 10−2
3.46 × 10−3
2.65 × 101
2.05 × 101
7.72 × 101
7.49 × 100
4.96 × 100
4.30 × 10−1
2.03 × 101
5.04 × 100
2.14 × 101
2.12 × 101
2.16 × 101
1.03 × 10−1
1.01 × 101
4.11 × 100
1.62 × 101
2.42 × 100
1.95 × 10−1
1.58 × 10−2
1.03 × 100
2.20 × 10−1
3.88 × 101
1.59 × 101
6.07 × 101
1.07 × 101
3.77 × 101
1.49 × 101
6.17 × 101
9.42 × 100
9.43 × 101
3.96 × 101
1.53 × 102
2.83 × 101
2.20 × 102
1.26 × 103
3.23 × 103
4.08 × 102

Table 2: Numerical Experiments
FADCG
avg
2.26 × 103
1.06 × 10−3−4
min1.20 × 103
5.70 × 10
f15
−3
max
3.80 × 103
1.64 × 10−4
std
5.63 × 102
2.44 × 10
6avg
9.28 × 10−2
6.59 × 10
6min
3.17 × 10−2
1.94 × 10
f16
7
max
2.28 × 10−1
1.50 × 10
6
std
3.99 × 10−2
2.97 × 10
7
avg
5.95 × 101
1.19 × 10
4min
4.79 × 101
2.34 × 10
f17
7max
7.52 × 101
9.01 × 10
7std
7.10 × 100
1.94 × 10
5avg
6.27 × 101
2.57 × 10
5min4.85 × 101
1.37 × 10
f18
5max
8.62 × 101
4.05 × 10
4std
8.16 × 100
6.07 × 10−1
avg
3.77 × 100
1.78 × 10−2min
2.44 × 100
6.52 × 10
f19
−1
max
6.13 × 100
2.87 × 10−2
std
8.19 × 10−1
5.30 × 10
1
avg
3.30 × 102
2.73 × 10
1min
2.00 × 102
2.60 × 10
f21
1
max
4.44 × 102
2.94 × 10−1
std
8.52 × 101
8.15 × 10
avg
3.31 × 103
6.35 × 100
min1.32 × 103
8.51 × 10−1
f22
max
6.17 × 103
1.72 × 101
std
1.14 × 103
4.02 × 100
avg
3.84 × 103
2.14 × 101
min
2.40 × 103
2.13 × 101f
23
max
5.75 × 103
2.15 × 101
std
8.43 × 102
7.11 × 10−2avg
2.17 × 102
8.74 × 100
min2.01 × 102
3.25 × 100f
24
max
2.41 × 102
1.45 × 101
std
1.16 × 101
2.40 × 100
avg
2.34 × 102
5.50 × 10−1min2.20 × 102
6.22 × 10−2f
25
max
2.51 × 102
2.13 × 100
std
7.73 × 100
4.99 × 10−1
avg
2.89 × 102
2.42 × 101
min
2.00 × 102
15.0 × 101
f
26
max
3.34 × 102
3.78 × 101
std
4.78 × 101
4.92 × 100
avg
4.56 × 102
2.96 × 101
1
min
3.13 × 102
1.49 × 10
f27
1
max
6.59 × 102
5.17 × 10
0std
1.17 × 102
7.95 × 10
avg
3.06 × 102
7.85 × 101
1
min
1.01 × 102
2.29 × 10
f28
2max
1.36 × 103
1.36 × 10
1std
1.60 × 102
2.45 × 10
3fFA
1.51 × 10
6.91 × 102
best solution
8
2.75 × 103
more than the conventional FA
4.21 × 102- 545 -

2.23 × 103
1.22 × 103
3.44 × 103
4.76 × 102
1.29 × 10−1
4.94 × 10−2
2.24 × 10−1
4.65 × 10−2
8.71 × 101
7.04 × 101
1.31 × 102
1.42 × 101
9.16 × 101
6.69 × 101
1.27 × 102
1.47 × 101
4.01 × 100
2.45 × 100
6.20 × 100
9.78 × 10−1
3.39 × 102
1.01 × 102
4.44 × 102
9.12 × 101
2.61 × 103
7.27 × 102
4.51 × 103
7.70 × 102
3.31 × 103
1.37 × 103
5.69 × 103
9.94 × 102
2.22 × 102
2.01 × 102
2.39 × 102
9.49 × 100
2.32 × 102
2.01 × 102
2.53 × 102
1.23 × 101
2.85 × 102
2.00 × 102
3.35 × 102
5.34 × 101
5.17 × 102
3.14 × 102
7.28 × 102
9.32 × 101
3.09 × 102
1.00 × 102
1.32 × 103
2.17 × 102
FADMF
9
13

2.52 × 103
1.33 × 103
4.45 × 103
5.65 × 102
3.30 × 10−1
9.30 × 10−2
7.01 × 10−1
1.35 × 10−1
7.59 × 101
5.88 × 101
1.12 × 102
1.14 × 101
8.61 × 101
5.99 × 101
1.36 × 102
1.50 × 101
3.47 × 100
2.03 × 100
4.91 × 100
6.67 × 10−1
3.12 × 102
2.00 × 102
4.44 × 102
8.82 × 101
1.71 × 103
8.51 × 102
2.34 × 103
4.02 × 102
2.99 × 103
1.22 × 103
4.74 × 103
7.00 × 102
2.23 × 102
2.03 × 102
2.34 × 102
7.52 × 100
2.25 × 102
2.14 × 102
2.40 × 102
5.47 × 100
3.00 × 102
2.00 × 102
3.34 × 102
4.39 × 101
4.85 × 102
3.26 × 102
6.23 × 102
9.08 × 101
2.97 × 102
1.01 × 102
3.02 × 102
2.81 × 101
FADCG
1017