Abstractâ Firefly algorithm is one of the metaheuristic algorithms which are used for solving optimization problems. This algorithm is a population-based ...
2013 13th Iranian Conference on Fuzzy Systems (IFSC)
Modified Firefly Algorithm Using Fuzzy Tuned Parameters Mahdi Bidar and Hamidreza Rashidy Kanan Department of Electrical, Computer and IT Engineering Qazvin Branch, Islamic Azad University Qazvin, Iran {Mhd_bidar; h.rashidykanan}@qiau.ac.ir Abstract— Firefly algorithm is one of the metaheuristic algorithms which are used for solving optimization problems. This algorithm is a population-based algorithm like most of algorithms in this class that utilizes swarm intelligence to search the problem space. Searching steps in this algorithm include random step or random search and information - based step or local search. So, these two types of movement, present properties to algorithm known as exploration and exploitation respectively. Considering importance of balance between these two properties in movement of algorithm toward optimal solution, we have proposed a new method in which fuzzy controller used as parameter controller in the firefly algorithm with the aim of gaining balance between exploration and exploitation. In fact, we have used fuzzy logic as a tool for parameters tuning considering algorithm progress trend toward the best solution. We have used the proposed algorithm to solve traveling salesman problem and obtained results show increase of firefly algorithm. Keywords— metaheuristic algorithms, optimization, NP-HARD problems, exploration and exploitation, TSP.
I.
conditions that algorithm will be faced in different steps of solving problem. Therefore, we have used a fuzzy controller for tuning the parameters which control balance between random search and local search dynamically in each step of solving problem (with considering progress of solving problem). The proposed method increases performance of the firefly algorithm in finding optimal solution by keeping balance between these two kinds of searches. We have used the proposed method for solving traveling salesman problem. Rest of this paper is organized as follows: The next section introduces and describes firefly algorithm in which we briefly introduce firefly algorithm and explain role of its parameters. Section 3 introduces the proposed method. In section 4, traveling salesman problem is used as a problem for testing the proposed fuzzy firefly algorithm and also in this section the results which are obtained by proposed algorithm and standard firefly algorithm will be discussed. Last section concludes the paper. II.
INTRODUCTION
Firefly algorithm is one of the powerful population–based algorithm inspired by nature which is used for solving optimization problems. Most of the optimization problems which we deal with are included in NP-HARD problems class, which have very high computational complexity and solving them make computational cost of algorithm increased. In these problems, we face a complex, High-dimensional and widespread search space in which it is not possible to search the space entirely [1]. Therefore, this algorithm intelligently searches problem space and obtains the best solution. Firefly algorithm has been used for solving problems such as Feature Selection [2], economic optimization problems [3&4], error identification [5], vector quantization [6&7], traveling salesman problem [8] and scheduling problems [9&10]. Fireflies cover the search space by Random and Information based steps which present two random search and local search to the algorithm respectively which conveys exploration and exploitation in firefly algorithm [11&12]. But, important point in firefly algorithm is keeping balance between exploration and exploitation. In standard firefly algorithm, controlling parameters of these two kinds of searches are initialized at the beginning and these values don’t change until end of the searching process and this cannot indicate proper balance between these two kinds of searches considering different 978-1-4799-1228-5/13/$31.00 ©2013 IEEE.
STANDARD FIREFLY ALGORITHM
Firefly algorithm is one of the powerful algorithms in solving optimization problems which has been inspired by social behavior of fireflies in the nature which was proposed by Mr. Yang in 2008. In the nature each firefly tends to move toward fireflies those are brighter than itself. Mr. Yang has raised this movement considering three main principles derived from behavior of these creatures as an algorithm. These three principles are given as follows: 9
Fireflies are unisexual.
9
Fireflies are attracted to fireflies that are brighter than themselves. Attractiveness power is related to brightness of the firefly which attenuates over distance. The brightest firefly moves stochastically.
9
Brightness of the fireflies which indicates solution quality is calculated by fitness function which is defined considering the problem [11].
Standard firefly algorithm which has been introduced by Mr. Yang is given in fig. 1.
III. , ,
:
Based on movement equation in firefly algorithm that mentioned in (3) fireflies utilize two random and Informationbased movements while moving toward brighter fireflies. These two movements indicate exploitation and exploration in firefly algorithm. These are two different strategies for searching the problem space. On this basis, exploitation shows local search and exploration shows random search. Important point in the evolutionary algorithms is keeping balance between exploration and exploitation in each step of solving problem.
, , , …, // user-defined constant .
output: 1:
_ .
1:
,…,
1:
Based on (2), if
.
, ,
lim .
1⁄ 2
1 j i 1⁄ 2 . Standard firefly algorithm.
Here, m is the number of fireflies, I0 is brightness of the fireflies in source which is determined with fitness function, is size of the random step and is attractiveness coefficient which is determined by the user. , , is distance between and which can be calculated by (1): ∑
,
,
(1)
, is attractiveness of each firefly which is obtained through the (2): , ,
(2)
As it shown in (2), attractiveness is defined based on distance between two fireflies, attractiveness coefficient and brightness of the firefly in the source and movement equation is as (3): .
.
1⁄ 2
.
(3)
This equation includes Information–based movement and random movement. Information –based movement is shown in (4): 1
.
.
(4)
And random movement is shown in (5): 1⁄ 2
. It must be noticed that
0, ∞ and
0
(6)
1⁄ 2
(7)
As a result, (3) turns into the (7):
,
if
1
∞:
lim
,
,
Fig. 1.
THE PROPOSED METHOD
(5) 0,1).
As (3) shows, movement of fireflies includes two Information-based step and random step and important point is keeping balance between exploitation and exploration in each step of solving problems.
And this means that firefly algorithm just can use random steps for searching the problem space. As a result, the algorithm moves without considering the experiences that gained in previous searching steps and stochastically searches problem space which lowers probability of reaching optimal solution. Therefore, these conditions indicate the absence of balance between random search and local search in the algorithm which is not suitable. 0:
And also, if γ lim
β
lim
e
I
(8)
As a result, (3) turns into the following equation: 1
.
.
.
1⁄ 2
(9)
This means that parameter of distance between fireflies is removed and fireflies observe each other clearly. In this case, exploitation reaches its highest value while exploration remains in normal which indicates that the algorithm pays more attention to local search and this increases probability of being trapped in local optimum [13]. In order to these cases, need for a parameter controller is irrefutable which causes gaining balance between exploration and exploitation considering conditions of the algorithm in moving toward optimal solution in each step by allocating proper value to respective parameters ( γ) of the algorithm. In this paper, we have used a fuzzy system as a controller which allocates the best values to parameters of the algorithm considering the quality of obtained solutions in each step. Movement in firefly algorithm should be such that size of the random steps is enlarged at the beginning and as we are getting close to final searching phases, size of this step becoming shorter and shorter. The reason is that we have got close to the optimal solution in the final phases and large size of random step will make algorithm far from the optimal solution and loss that. Therefore, in the final phases, size of random step should become shorter and local search should play main role to search space around fittest solution (brightest firefly) that already found. In firefly algorithm, parameter controls exploration and parameter controls exploitation. Considering importance of balance between them, we have used fuzzy logic as a controller of the balance between
exploration and exploitation, so suitable valuees are allocated to parameters and based on progress of algoorithm in finding optimal solution. Decision making is based onn knowledge-base that is made based on knowledge of expert m mans. Knowledge of the experts in this knowledge-base has beeen defined as ifthen rules which allocate the best values to paarameters and for different values of the controlling param meters in order to achieve suitable balance between exploitationn and exploration. Fig. 2 shows general schematic of propossed fuzzy firefly algorithm.
These controlling parameters are sent to the fuzzy controller system at end of each step (in loop while) and suitable values are allocated to paarameters and by fuzzy controller. IV.
1
2
3
Fig. 4.
Fig. 2.
General fuzzy firefly schematic.
Fig. 3 shows the fuzzy controller of propoosed method that utilizes two variables Count and Delta ass input and two variables Alpha( ) and Gamma(γ) as output.
EXPERIMENTS AND A RESULTS
In this section results of experim ments and simulations will be presented. The proposed algorith hm is employed to solve the travelling salesman problem. Thiss problem belongs to NPHARD problems class which must be b solved with optimization algorithms. In this problem, there are a N cities that a salesman must visit all cities and each city ju ust once and the object is to find the shortest closed tour [14]. Seearch space in this problem has been defined as a matrix and each e element in this matrix contains one-dimensional array inccluding arrangement of the cities number as fig. 4. 4
...........................
N
An example of search space solutions.
Fitness of each solution is calcu ulated by objective function or fitness function. Fitness function n calculates fitness of each solution considering distance mattrix that includes distance between cities. Fitness value showss brightness of each firefly that indicates the quality of its fou und solution. We used the proposed algorithm for solving the travelling t salesman problem with different number of cities such h as 12, 22, 30, 59 and 128 and compared the obtained resultss by proposed method and standard firefly algorithm. In thiss experiment rule-base or knowledge-base contains 9 rules wh hich are shown in fig.5. count
Delta
1
low
low
high
high
2 3
Low Low
Middle High
high high
high high
4
Middle
Low
middle
high
5
Middle
Middle
middle
middle
6
Middle
High
middle
high
7
High
low
low
low
8
High
Middle
low
middle
9
High
High
low
middle
Fig. 5. The rule-base of prroposed algorithm used in our experiment.
Fig. 3.
In this experiment the triangle membership m function is used in proposed algorithm. The plott of triangle membership function used in our experiment is as fig.6.
Fuzzy controller used in proposed m method.
In the proposed method, we have used two controlling parameters named Count and Delta as iinputs of fuzzy controller. Parameter Count is loop counter of main loop in firefly algorithm (loop while in standard) that shows algorithm steps from the beginning to the end. Annd Delta shows difference between fitness of best solution that is found in step(count) and fitness of the best solutionn found in steps before step(count) that is defined in (10): (10)
low
1
a
middle
b Fig. 6.
Triangle membership function.
high
c
The results of our experiment are given in TABLE Ι. In this table, length of the tours completed by the fireflies in the proposed method and standard firefly algorithm are shown. As it’s shown in TABLE Ι, the performance of the firefly algorithm is gone higher with the aid of proposed method. TABLE I.
LENGTH OF THE TOURS COMPETED BY THE PROPOSED METHOD AND STANDARD FIREFLY ALGORITHM.
Algorithm Fuzzy firefly M=5
Fuzzy firefly M=10
Fuzzy firefly M=15
Standard Firefly M=5
Standard Firefly M=10
Standard Firefly M=15
N=12
3864
3683
3546
4013
3995
3983
N=22
2129
2107
2051
2351
2295
2277
N=30
1356
1328
1368
1521
1471
1412
N=59
4654 159025
4559 154730
4291 132151
6182 167273
6197 166369
5448 157916
City Num
N=128
In TABLE Ι, M is number of fireflies and N is the number of cities used in our test. As it shown in TABLE Ι, the proposed algorithm has obtained better results than standard firefly algorithm. The reason is ability of proposed algorithm to keep balance between exploration and exploitation in each phase of solving problem by allocating proper value to and by considering progress of solving problems. V.
CONCLUSION
In this paper, we proposed a new method and we used fuzzy logic to tune parameters in order to keep balance between exploration and exploitation. Balance between these two kinds of searches causes the algorithm to have necessary dynamism and move toward the optimal solution. This method prevents the algorithm from being trapped in local optimums and directs the search process such that when we get close to the final phases of solving the problem, it will reduce size of random steps of the algorithm and incline the search process to local search. We used this new method for solving travelling salesman problem and the obtained results showed the increased performance of the algorithm compared with the standard firefly algorithm. REFERENCES [1]
H. Bahrami, K. Faez and M. Abdechiri, “Imperialist Competitive Algorithm using Chaos Theory for Optimization,” IEEE 12th International Conference on Computer Modelling and Simulation, 2010.
[2]
H. Banati and M. Bajaj, “Firefly based feature selection approach,“Int. J. Computer Science Issues, vol. 8, No. 2, 473-480, 2011.
[3]
O. Abedinia, N. Amjady and M. S. Naderi, “Multi-objective Environmental/Economic Dispatch Using Firefly Technique, “
IEEE 11th International Conference on Environment and Electrical Engineering (EEEIC), 2012. [4]
T. Niknam, R. Azizipanah-Abarghooee, and A. Roosta, “ Reserve Constrained Dynamic Economic Dispatch: A New Fast SelfAdaptive Modified Firefly Algorithm,“ Systems Journal, IEEE,vol.6, 2012 .
[5]
R. Falcon, M. Almeida and A. Nayak,” Fault identification with binary adaptive fireflies in parallel and distributed systems,” IEEE Congress on Evolutionary Computation, 2011.
[6]
M. H. Horng. and T. W. Jiang,” The codebook design of image vector quantization based on the firefly algorithm,” Computational Collective Intelligence, Technologies and Applications, LNCS, Vol. 6423, pp. 438-447, 2010.
[7]
M. H. Horng,” vector quantization using the firefly algorithm for image compression,” Expert Systems with Applications, Vol. 38, (article in press) 12 Aug. 2011.
[8]
G. K. Jati and S. Suyanto,” Evolutionary discrete firefly algorithm for travelling salesman problem,” ICAIS2011, Lecture Notes in Artificial Intelligence (LNAI 6943), pp.393-403, 2011.
[9]
U. Hönig,” A firefly algorithm-based approach for scheduling task graphs in homogenous systems,” Proceeding Informatics, DOI: 10.2316/P.2010.724-033, 724, 2010.
[10] A.Khadwilard, S. Chansombat, T. Thepphakorn, P. Thapat suwan, W. Chainat and P. Pongcharoen,” Application of firefly algorithm and its parameter setting for job shop scheduling,” First Symposium on Hands-On Research and Development, 2011. [11] X. S. Yang, Nature-Inspired Metaheuristic Algorithms, Luniver Press, 2008. [12] X. S. Yang, Engineering Optimization: An Introduction with Metaheuristic Applications, Wiley & Sons, New Jersey, 2010. [13]
K. Durkota, Implementation of a discrete firefly algorithm for the QAP problem within the sage framework, BSc thesis, Czech Technical University, 2011.
[14] W. Pang, K. P. Wang, C. G. Zhou and L. J. Dong ,“Fuzzy Discrete Particle Swarm Optimization for Solving Travelling Salesman Problem ,“ IEEE The Fourth International Conference on Computer and Information Technology, 2004.