A Multimodal Firefly Optimization Algorithm Based on Coulomb ’ s Law

In this paper, a multimodal firefly algorithm named the CFA (Coulomb Firefly Algorithm) has been presented based on the Coulomb’s law. The algorithm is able to find more than one optimum solution in the problem search space without requiring any additional parameter. In this proposed method, less bright fireflies would be attracted to fireflies which are not only brighter, but according to the Coulomb’s law pose the highest gravity. Approaching the end of iteration, fireflies' motion steps are reduced which finally results in a more accurate result. With limited number of iterations, groups of fireflies gather around global and local optimal points. After the final iteration, the firefly which has the highest fitness value, would be survived and the rest would be omitted. Experiments and comparisons on the CFA algorithm show that the proposed method has successfully reacted in solving multimodal optimization problems. Keywords—Swarm Intelligence; multimodal firefly algorithm; multimodal optimization; firefly algorithm


INTRODUCTION
Optimization is finding an optimum solution from a set of available options with the purpose of optimizing criteria for the problem in a limited time.The main challenge with single solution optimization algorithms, however, is that they are only able to find one optimum solution from a set of available options while most real-world problems have more than one optimum solution [1].Hence, multimodal optimization algorithms which are among the novel inventions of evolutionary algorithms, have been designed to find a set of possible solutions from available options.Unlike unimodal optimization algorithms which try to avoid local optimal points, multimodal optimization algorithms recognize these points as a solution.Although normally the algorithms have not been basically designed to merely solve these problems, several algorithms have recently tried to solve these problems by modifying existing unimodal optimization algorithms.The majority of these algorithms are based on particle swarm optimization algorithms [1][2][3][4][5][6] and genetic algorithms [7][8][9][10].The firefly optimization algorithm has been used successfully to optimize different kinds of problems, but all of them have been within the span of unimodal optimization problems.In this paper, the Coulomb's law has been applied to the firefly optimization algorithm in order to turn it into a multimodal algorithm.
EPSO algorithm [3] was introduced by J. Barbara and Carlos A. C. in 2009.In this method, the selection of global optimum mechanism, in PSO algorithm, was changed using Coulomb's law.Then, the particles that are to be selected as the global optimum can be separately calculated for each particle.In fact, particles may move towards different particles as the global optima.In other words, the global optima for every particle could vary from one particle to another.Hence, particles not only do not surround the global optima, but they also surround their local optima.It is evident that a particle with a more desirable cost function is surrounded by more particles.It is this mechanism's property that particles tend to move towards a point that has both an appropriate cost function value and an appropriate distance from the particle.FERPSO [2] is a well-known algorithm that has been proposed for solving multimodal optimization problems which was introduced by Xiaodong Li in 2007.In terms of nature, this algorithm could be viewed as: more birds will gather where there is more food.In fact, if they find a good resource near themselves, they will not use farther resources.In FERPSO, the particles that are to be selected as global optimal point are selected for each particle regarding the Euclidian distance between particles.In essence, the overall structure of FERPSO and EPSO are highly similar, and they both have the same level of complexity.

B. Y. Qu et al have combined a local searching technique
with some existing multimodal PSO optimization algorithms that have used niching [2,11,12] method trying to solve such problems.In this method, the personal best for particles are improved significantly by using a local searching method.In fact, the personal best is improved by generating a random point between the particle and the nearest point, that is, if the newer point is more desirable than the current personal best, the new point will replace the former, otherwise, the original point stays intact.J.Zhang et al. [13] proposed a modified algorithm called the sequential niching particle swarm optimization (SNPSO).This algorithm divides the whole population into several suppopulations which can be located around optimal solutions in multimodal problems.They use space convergence rate (SCR), in which each sub-population detects global and local optimal solutions until the end of iteration.
Xiaodong li.[11] proposed an improved PSO algorithm called the (SPSO).In this method, the idea of species is used to specify each species' best value of neighborhood.The algorithm divides the whole population into several populations called species with regard to their similarity.Each species gather around a particle called species seed.www.ijacsa.thesai.org

A. The Behavior of Fireflies in Nature
There are almost two thousand known species of firefly in nature, most of which emit flashes of light with a certain rhythm in order to attract a mating partner or bait.In addition to these reasons, fireflies can protect themselves against the attackers using the flashes which can also attract the opposite sexes.The distance between the fireflies and the environment, where the light is emitted, is somehow effective on the intensity of light received by fireflies.As the light intensity obeys the inverse square law at a particular distance r (I ∝ 1/r2), and because light is absorbed by air, most fireflies can just be visible to a limited distance.

B. Firefly Algorithm
The firefly algorithm is one of the novel optimization algorithms based on swarm intelligence which was first introduced by X.Yang in 2008 [14].It was inspired by the natural behavior of fireflies.The firefly algorithm randomly distributes a number of artificial fireflies in the search space at the beginning.All of the fireflies are unisexual and thus regardless of gender, each firefly can be attracted by any other firefly.Each firefly produces a light whose intensity depends on the optimality of its position and is proportional to its fitness value.The next step is comparing constantly the intensity of the light of each firefly with that of other fireflies and less bright fireflies moves towards brighter ones.Evidently, depending on the distance, fireflies receive lights with varying intensities; however, the brightest firefly moves randomly in search of space to increase its chance of finding the global optimum solution.Movement of the less bright firefly towards the brighter one is expressed through equation ( 1). (1) Where is the maximum coefficient of attraction between i th and j th fireflies, α is the coefficient of random displacement vector, γ is the light absorption coefficient for the environment, and is the Euclidean distance between two fireflies.Each firefly is compared to all others and if its fitness value is less than that of another one, it will be attracted according to equation (1).This trend continues to the last algorithm iteration when finally the optimum solution is obtained as the final solution.Main steps of the firefly algorithm can be expressed in the form of the pseudo-code briefed in Algorithm 1 (FA).

III. MULTIMODAL OPTIMIZATION
Constraints such as physical, temporal and economic limitations can prevent achievement of actual results; however, having knowledge of multimodal optimization solutions is very useful in engineering fields.In such cases, if multiple local and global solutions are available, the optimum system performance is obtained by switching between solutions.Since there are several solutions to many real-world problems, multimodal optimization algorithms are useful for solving these problems.Not only are these algorithms able to locate multiple optima in a single run, but they also preserve their population diversity.The reason why classic optimization techniques are not used to find multiple solutions shows their unreliability in finding more than one solution in multiple runs [15].Evolutionary algorithms including Genetic Algorithms (GAs), Differential Evolution (DE), Particle Swarm Optimization (PSO), and Evolution Strategy (ES) are kinds of algorithms which has been tried to solve multimodal optimization problems.Referred algorithms [7,10,[15][16][17][18][19][20][21][22][23] are among algorithms designed to the aforementioned criteria.

IV. MULTIMODAL FIREFLY ALGORITHM
Studies on multimodal optimization have mostly focused on the PSO and genetic algorithms.In this paper, like other meta-heuristic algorithms which have used unimodal algorithms for solving multimodal optimization problems, some changes are made on FA algorithm without the need for any additional parameter, and it has been utilized to solve multimodal optimization problems.In the proposed algorithm, the Coulomb's law in equation ( 2) has been used to calculate the electrostatic interaction between two fireflies.This technique was successfully used by J. Barrera and A. Coello in [3] to obtain a multimodal PSO algorithm.They have used this method to calculate forces between two particles which has also been used in the present paper to calculate the attraction between two fireflies.Algorithm 1 Pseudo-code for FA main steps Objective function f(x), x = (x 1 , ..., x d ) T Generate initial population of fireflies x i (i = 1, 2, ..., n) Light intensity Ii at x i is determined by f(x i ) Define light absorption coefficient γ 1: while (t <MaxGeneration) 2: for i = 1 : n all n fireflies 3: for j = 1 : i all n fireflies 4: if (I j > I i ) 5: Move firefly i towards j in d-dimension; 6: end if 7: Attractiveness varies with distance r via exp[−γr] 8: Evaluate new solutions and update light intensity 9: end for j 10: end for i 11: Rank the fireflies and find the current best 12: end while Postprocess results and visualization www.ijacsa.thesai.org In this equation, is the proportionality constant (Coulomb constant); Q i and Q j denote the magnitude of two charged particles, and r is the distance between two charges.According to this formula, force magnitude is proportional to magnitude of charges but it obeys inverse square law for distance.Hence, the attraction between two fireflies is calculated through the following equation.

  2 , ( ). ( ) .
i j In this equation, α is equal to 1 and is the fitness value for the firefly which will be attracted to one of the present fireflies.
⃗ is the vector of the fitness value of other fireflies to which the ith firefly is being compared.Finally, the destination firefly is obtained by using equation (4).
Calculating the above equation yields to the maximum value of .Finally, the index of the j th firefly, with the highest value of F, is calculated and equation ( 5) is obtained by changing equation (1).
As a result, the i th firefly is attracted to the firefly which has the highest value of F. Therefore, destination fireflies are not selected just based on the value of fitness value but from calculating the electrostatic interaction between other fireflies.This method prevents the attraction of other fireflies by the best firefly.Instead, fireflies are attracted by fireflies which besides having sufficient fitness value, must be at a close distance since distance is an effective parameter in their attraction.In each iteration in this case, each firefly compares its electrostatic interaction with others and then moves toward the firefly which has the highest electrostatic interaction.As it was mentioned before, α is the coefficient of random displacement with a value considered to be [0.1-1] at the beginning.This makes the firefly's movements to be random to some extent and to search for new sources; however, this value of α results in a less precise solution at the end of iteration.To prevent it, the coefficient of random movement is reduced in each iteration so as to reduce the randomness of the movement of the firefly toward the destination.Moreover, the value of γ is increased in each iteration so that fireflies take smaller steps at the end of the iteration.These two actions take place using equations ( 6) and (7).

A. Test Functions
The experiments have been performed on benchmark functions common in multimodal optimization.Specifications of these algorithms are presented in Table (1).

B. Configurations
All algorithms were implemented in Matlab 2013 and were run in a computer equipped with an Intel Core(TM) i7-3632QM 2.2 GH processor and 8 gigabytes of RAM.

C. Performance measures
To assess the performance of aforementioned algorithms in section (6.4), the following 7 criteria are considered and measured 50 runs.

1) Success Rates (SR):
The percentage of performances in which all the optimum points have been found successfully.
To calculate success rate, a user specified parameter, called the Level of Accuracy (LOA), is considered.This parameter is usually between (0,1] and is used to measure the difference between found solutions and the real optimum points in functions, so that if the difference between found solution and the real solution is less than the amount of LOA, then the found solution is counted as a successful solution [12]. 2) Average Number Of Optima Found (ANOF): The average of optimum points found considering LOA for 50 runs.
3) Global Average Number of Optima Found: The average of global optima found considering LOA for 50 runs.
4) Average Function Evaluation is the average number of fitness function calling for 50 runs [1].
5) Success Performance (SP): This parameter is computable when the amount of SR is not zero [24].SP is calculated from equation ( 8) : Based on the fact that algorithms with less ANOF and higher SR amount can be considered as a better one, it can be concluded that less SP amount is more acceptable.

6) Maximum Peak Ratio (MPR):
The quality of optima is tested without considering the population distribution, and the performance metric, which is called the maximum peak ratio statistic (MPR), is adopted.The MPR is defined as follows: www.ijacsa.thesai.org

D. Test and comparison results
The results of the experiments are shown in the tables 2-4 which have the accuracies of 10-1, 10-2 and 10-3 respectively.First columns of all three tables represent test functions; second columns are equivalent of implemented algorithms and the other columns are as written on top of each column.The best performance was reported in boldface.As it can be seen from the results, with the increase of the level of accuracy, the proposed algorithm has a better performance compared to FER-PSO [2], EPSO [3] and LS-FER-PSO [1] algorithms.It is shown in the tables that the presented algorithm and LS-FER-PSO algorithm have better performance compared to other algorithms.Comparing LS-FER-PSO algorithm and presented algorithm, it is shown that sometimes one performance is better than the other and vice versa.However it should be mentioned that the ratio of average function evaluation of LS-FER-PSO algorithm is 1.67 times higher than that of the presented algorithm.The performance of this algorithm proved its usefulness in solving optimization problems.Fig. 1 shows the search space of f4.Fig. 2 also indicates the position of fireflies during the running of the proposed algorithm with 60 fireflies and 60 iterations using the f4 function.Fig. 2 A-D shows the position of particles in the 1 st , 10 th , 20 th and 30 th iterations.In fact, 4 out of the 6 available points were successfully found in 0011 function evaluation.However all optimum points can be found by increasing the number of fireflies.As it can be clearly observed in Fig. 2, by getting close to the end of the iterations, fireflies around optimum solutions become gradually more and more concentrated.Since the firefly algorithm was designed for maximum optimization problems, the average value of cost functions of fireflies increased in iteration Fig. 3 Moreover, as seen in Fig. 4, as the concentration of fireflies around optima (i.e.around each other) increased, the standard deviation of cost functions decreased.The reason was that the more the process of the algorithm got closer to the end of the iteration, the more the fireflies and their cost functions got closer to form neighborhoods.

VI. CONCLUSION
This paper proposed CFA multimodal firefly algorithm based on the Coulomb's law.This algorithm was successful in solving multimodal optimization problems.Results of experiments indicated that this unimodal optimization algorithm was successfully turned into a multimodal optimization algorithm through modifications.Two of the advantages of this algorithm are quickly yielding optimal results and not requiring additional parameter for being turned into a multimodal algorithm.According to the results, this algorithm can be considered as a reliable multimodal optimization algorithm.www.ijacsa.thesai.org

Fig. 2 .
Fig. 2. the position of particles in different iterations (beginning to end)

Fig. 3 .Fig. 4 .
Fig. 3.The average value of cost function in each iteration

TABLE IV .
THE RESULTS OF THE EXPERIMENTS -ACCURACY: 10-3 C: iteration 20 D: iteration 01