Abstract
In the standard firefly algorithm, each firefly has the same step settings and its values decrease from iteration to iteration. Therefore, it may fall into the local optimum. Furthermore, the decreasing of step is restrained by the maximum of iteration, which has an influence on the convergence speed and precision. In order to avoid falling into the local optimum and reduce the impact of the maximum of iteration, a selfadaptive step firefly algorithm is proposed in the paper. Its core idea is setting the step of each firefly varying with the iteration, according to each firefly’s historical information and current situation. Experiments are made to show the performance of our approach compared with the standard FA, based on sixteen standard testing benchmark functions. The results reveal that our method can prevent the premature convergence and improve the convergence speed and accurateness.
1. Introduction
Firefly algorithm (FA) is inspired by biochemical and social aspects of real fireflies [1]. It could handle multimodal problems of combinational and numerical optimization more naturally and efficiently [2–5]. Owing to its few parameters to adjust, easy to understand, realize, and compute, it was applied to various fields, such as codebook of vector quantization [6], inline springmass systems [7], mixed variable structural optimization [8], nonlinear grayscale image enhancement [9], travelling salesman problems [10], continuously cast steel slabs [11], promoting products online [12], nonconvex economic dispatch problems [13], chiller loading for energy conservation [14], stock market price forecasting [15], and multiple objectives optimization [16].
Despite these advantages, the FA is also a metaheuristic algorithm; the standard FA can easily get trapped in the local optima when solving complex multimodal problems. These weaknesses have restricted wider applications of the FA. Therefore, avoiding the local optima and accelerating convergence speed have become the two most important and appealing goals in the FA research. To overcome these disadvantages, many researchers have proposed a variety of modifications to the original FA [17–19].
Compared with other evolutionary algorithms, such as Genetic Algorithm and Simulated Annealing, standard FA has the following problem: it is not rational that each firefly uses the same step or the linear step just depends on maximum iteration not related to experience of fireflies, which may impact on the balance between the global and local search. Based on the above problem, a selfadaptive step firefly algorithm (SASFA) is proposed in the paper, which considers the historical information and current situation of each firefly.
The rest of this paper is organized as follows. Section 2 shows a brief review of the updating process of the standard FA and analyzes some problems about the linear step approach. In Section 3, a novel approach is proposed to set the step of each firefly selfadaptively. In Section 4, experimental settings and results compared with the two algorithms are presented. Finally, we make the conclusions in Section 5.
2. Firefly Algorithm Concepts
Firefly algorithm is based on the idealized behavior of the flashing feature of fireflies. The following three rules are idealized for the basic formulation of FA: all fireflies are unisex so that fireflies will attract each other regardless of their sex; attractiveness is proportional to their brightness, which decreases as distance increases between two flies; the brightness of a firefly is determined by the objective function [1].
2.1. Standard Firefly Algorithm
In the FA, there are two critical issues: the formulation of the attractiveness and the variation of light intensity. We can always suppose that a firefly’s attractiveness is determined by its light intensity or brightness, which in turn is associated with the encoded objective function [5]. The light intensity varies with the distance exponentially and monotonically. That is, where is the initial light intensity and is the light absorption coefficient. As a firefly’s attractiveness is proportional to the light intensity seen by neighbor fireflies, we can now define the attractiveness of a firefly by where is the attractiveness at . The movement of a firefly is attracted to another more attractive firefly , which is determined by
The third term is the randomization with the step , being drawn from a Gaussian distribution. In [2], the Levy distribution was used instead of the Gaussian one. Based on the comments in [1] the implementation of standard FA was adopted and generated with uniform distribution in range . The procedure for implementing the FA can be summarized as the pseudocode revealed in Pseudocode 1.

2.2. Problems of Setting Step in Standard Firefly Algorithm
In standard FA, the third term of (3) is the randomization with step . It generates with uniform distribution in range . In general, the method of setting step is static or linear; step just depends on maximum generation, which cannot be adaptive to different fireflies. Firstly, each firefly has the same step settings, and its value decreases from iteration to iteration. Consequently, it may trap in the local optimum, resulting in premature convergence. Secondly, a large step can make the firefly skip the best optimal solution when it is in the neighborhood of the firefly, during the early stage of the search. Therefore, this may reduce the search performance.
Finally, we can see from (3), that it is helpful for firefly to explore new search space with a large step, but it is not useful to the convergence of global optimum. If step has a small value, the result is contrary. For this reason, the step has a great effect on the exploration and convergence of the algorithm. The value of decreases slowly with the large number of iterations but decreases rapidly with the small number of iterations. To take into account the above issues, a new method based on selfadaptive step is introduced which considers the respective experience of each firefly.
3. Proposed Firefly Algorithm
When we make a decision, two important messages are usually integrated, which is known by Boyd and Richerson, on the exploration of human decisionmaking process. One is the experience of themselves and their neighbors. The other is the current situation. Inspired by this idea, we use it to set the step of each firefly to guide its search in the search space [20].
3.1. SelfAdaptive Step Settings
To solve the problems mentioned in Section 2, step settings should vary with the different problems, fireflies, and environment. Based on these considerations, a method is presented that sets the step of each firefly according to its respective experience and current situation. The step of firefly near the optimal solution should be set small. Similarly, the step of firefly far away from the optimal solution should be set large. Fireflies between the above two are used to balance the global search and local search. Therefore, the step of firefly should also be concerned with its historical information and current situation. In this paper, firefly’s history information includes its past two iteration’s optimum value. Based on the comments mentioned above and many experiments, the step of each firefly is calculated by (4) and (5), respectively [21]. Consider where is the past two iterations’ history information of th firefly. is the fitness value of the best solution of th firefly. is the fitness value of the best solution of population heretofore found, and is the fitness value of th firefly, which reflects the current information. The next iteration step of each firefly is selfadaptive, determined by the difference between its current fitness value and the best fitness value of the population. So the step of each firefly can vary with the iteration, and the step of each firefly is also altered at the same iteration. Obviously, the step of each firefly is different for various problems, because different fitness functions are used.
3.2. Procedure of SelfAdaptive Step Firefly Algorithm
The implementation procedure of our proposed selfadaptive step firefly algorithm (SASFA) can be described as follows.
Step 1. Generate the initial population of fireflies, .
Step 2. Compute intensity for each firefly member, .
Step 3. Update the step of each firefly. The step is calculated by (4) and (5).
Step 4. Move each firefly towards other brighter fireflies. The position of each firefly is updated by (3).
Step 5. Update the solution set.
Step 6. Terminate if a termination criterion is fulfilled; otherwise go to Step 2.
4. Experiments and Results
The proposed SASFA and standard FA are tested on sixteen benchmark functions which are given in Table 1. All simulations are run in Matlab 2010b with 2 GB of random access memory. To eliminate stochastic discrepancy, in each case study, it adopted 100 independent runs for each of the optimization methods, involving 100 different initial trial solutions for each optimization method. The number of fireflies was 30, and the maximum iteration number was 300.
Table 2 shows the best solution, the worst solution, the medium of solutions, and the standard deviation of 100 runs. Medium of solutions and standard deviation of 100 runs are considered to measure the scalability. Table 2 reveals the striking potential of the SASFA in obtaining the optimal solution with high precision, and the solutions of SASFA are better than the solutions found by standard FA.
Figures 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, and 16 give the comparison of convergence processes of the SASFA and standard FA in the above sixteen benchmark functions. It can be found out that SASFA outperformed standard FA with the same parameter settings. Convergence curves depict the provision tradeoff between exploration and exploitation of the SASFA during the search process.
5. Conclusions and Further Research
In the paper, we have proposed a selfadaptive step firefly algorithm which considers the current situation and historical information of each firefly. Simulation results demonstrated the potential of the proposed algorithm. Considering more iteration’s information of the algorithm could be an exciting direction in future.
Acknowledgments
This research is financially supported by the National Natural Science Foundation of China (NSFC) for Professor Shanlin Yang (no. 71071045) and Professor Shoubao Su (no. 61075049) and the Universities natural science foundation of anhui province (nos. KJ2011A268 and KJ2012Z429). The authors of the paper express great acknowledgment for these supports.