Comparison of Firefly, Cultural and the Artificial Bee Colony Algorithms for Optimization Vaishali R. Kulkarni1, Veena Desai2, Raghavendra V. Kulkarni1 1Faculty of Engineering and Technology, M. S. Ramaiah University of Applied Sciences, Bengaluru 560058 2Department of Electronics and Communication Engineering, KLS Gogte Institute of Technology, Belagavi 590008 *Contact Author E-mail: [email protected]

Abstract Global optimization refers to the technique for finding the best element in the given domain by satisfying certain constraints. Optimization algorithms are classified as deterministic and heuristic. Deterministic algorithms provide guaranteed solutions but with high computational demand. Heuristic and algorithms have been successfully used in optimization problems. They provide a solution close to the optimum with a better speed and less complexity. In this paper three metaheuristic algorithms namely firefly , cultural and the artificial bee colony, algorithm have been investigated over benchmark function optimization. The results and numeric simulation include comparison of the algorithms in terms of minimization of the objective function. Results of Matlab implementation show that the firefly algorithm performs the optimization in the most accurate manner. Cultural algorithm is inferior to firefly and the ABC algorithm shows the poorest performance among the three. Keywords: Metaheuristic Algorithms, ABC Algorithm, Firefly Algorithm, Cultural Algorithm, Global Optimization

solved using than problem- specific 1. INTRODUCTION heuristic algorithms There are two categories of optimization algorithms: Many researchers use metaheuristic and heuristic deterministic or exact algorithms and heuristics. definition interchangeably, as a concrete definition has Deterministic algorithms find the guaranteed optimal been elusive. These algorithms have been categorized solution in a finite amount of time. However, for from (EC), Swarm complex optimization problems for eg: global or NP- Intelligence (SI) and other paradigms of Computational hard optimization problems, the amount of time may Intelligence. They are referred as nature inspired or bio- increase exponentially with respect to the dimensions of inspired algorithms. Recent metaheuristic algorithms the problem. On the other hand, heuristics do not have preserve search experience embodied in some form of guarantee of solution but they usually find good enough memory for better solutions. Metaheuristic algorithms solutions in a reasonable amount of time. The found have been used in solving NP-hard optimization solution may not be the best of all actual solutions to the problems such as , traveling salesman given problem, but it may be the approximate and still problem, scheduling, maximum clique problem, p- be useful as it does not require long time. The median problem, search problems, feature selection etc. justification of heuristic algorithms is based on The metaheuristic algorithms based on SI have been arguments of plausibility, rather than mathematical applied for benchmark function optimization n this proof. It is possible that, heuristic algorithm may paper. These algorithms are: Firefly Algorithm (FA), conclude that no solution exists. Heuristic methods are Cultural Algorithm (CA) and the Artificial Bee Colony usually designed to fit a specific problem type rather Algorithm (ABC). than a variety of applications. This drawback is overcome with metaheuristic algorithms. Metaheuristic FA simulates the behavior of fireflies searching for algorithms can be applied to broader range of problems. brightness [1]. CA is based on EC and it is also called as Metaheuristic algorithms include a high-level problem- a meta-. CA includes of the independent algorithmic frame-work that provides a set culture that comprises of the parameters such as habits, of guidelines or strategies to develop heuristic beliefs, knowledge and customs of the society. CA uses optimization algorithms. In comparison with heuristics, culture to interact with the environmental condition and metaheuristics are powerful and robust, they can revive works upon improvement of convergence to obtain from any situation, irrespective of initial solutions. The optimal solution [2]. The ABC algorithm is based on the key ideas of metaheuristics are [1]: food foraging behavior of honeybees [3]. Generally an optimization problem can be considered as a 1. Search process is using the information gathered to minimization or maximization problem. In the move towards the global optimum based on optimization process, the absolutely best decision that guidelines corresponds to the minimum or maximum of a suitable 2. Metaheuristic can escape from getting trapped in objective function must be taken. The decision should be local minima by generating new solutions. New taken in the presence of the collection of feasible solution is a combination of two or more good constraints. An objective function also known as fitness solutions function expresses the main aim of the model which is 3. Metaheuristic algorithms explore neighborhood either to be minimized or maximized. A set of unknowns structure that avoids trying similar solutions or variables control the value of the objective function in 4. A very good solution can be found in a relatively given constraints. The performance of the system such as quick speed. Large complicated problems can be physical limitations, utility, design, loss, error etc. can be modelled by an objective function. The constraints on

RUAS-SASTech Journal 22 Vol. 16, Issue 2

objective function may be due to technical, economical dimensions, population size and number of iteration. or some other considerations. A set of standard Several factors decide the benchmark functions benchmark functions can be used to validate classification. These factors are: optimization problem. Benchmark functions can be unimodal or multimodal. Unimodal are with single local 1. Dimensionality: As the dimension increase, there is optima and multimodal functions are with more than one increase in search space. It is a challenge for local optima. The exploration and exploitation process of optimization problem to handle high dimensions in an algorithm can be tested using these functions. The nonlinear problems metaheuristic algorithms can be tested in an unbiased 2. Modality: The number of peaks in the function way by applying on the benchmark functions. In this landscape define modality. The search process of paper, the FA, CA and the ABC algorithm have been algorithm might get stuck in one of the peaks and applied on benchmark functions to test the efficiency of this will mislead the search process, taking it away algorithm in terms of accuracy. The remainder of this from the optimal solution paper has been organized as follows: Previous research 3. Basins: This refers to the plateau in optimization in optimization with SI and EC has been surveyed in problem. Basin can hamper the search process as it Section 2. An overview of the benchmark functions has can get attracted towards such regions. This will get been presented in Section 3. A brief overview of an obstacle in the exploration of solutions algorithms used have been outlined in Section 4. Details 4. Separability: It is a measure of difficulty of of the results obtained have been presented in Section 5. different benchmark functions. Separable functions Finally, concluding remarks and future scope for future are easy to solve in comparison with un-separable research have been given in Section 6. or dependent functions The performance of metaheuristic algorithms can tested in an effective manner using these features of benchmark 2. RELATED WORK function. Some of the popular benchmark functions have been used for in this work are listed below. The algorithms used in this work are inspired by SI and EC paradigms of CI. SI is defined as the emergent 1. Rastrigin Function collective intelligence of groups of simple agents, 2. Rosenbrock Function commonly referred as population. SI algorithms works 3. Schewefel Function in a distributed and self-organized manner. SI is based on 4. Sphere Function the behavior of swarms for example: social insects, flock of birds, colonies of ants etc. These colonies work on the 4. ALGORITHMS principle of division of labor and have been successful in exploring the search space for optimal solutions. EC is SI is defined as the emergent collective intelligence of inspired by the theory of biological evolution. EC has groups of simple agents that work in a distributed and been successfully used to create optimization self-organized manner. These colonies work on the procedures. Evolution is seen as a process leading to the principle of division of labor and have been successful in survival of the population and reproduce in specific exploring the search space for optimal solutions. The environment. CA has been used in many constrained ABC algorithm has been used in many science and applications as presented in article [4]. A self-adaptive engineering applications. The variants and applications CA with fuzzy controller has been presented in article of the ABC algorithm has been expressed in article [9]. [5]. The evolution process in fuzzy controller has been Comprehensive study of FA has been presented in article controlled by using CA in this work. Several research has [10]. CA is derived from cultural evolution models in been done in the FA- and ABC-based optimization anthropology. Several data intensive problem in science algorithms. FA has been used successfully in networking and engineering have been solved using CA. A self- applications. A distance vector routing algorithm has adaptive evolving model can be constructs using CA been optimized using FA to perform localization of framework. The pseudo code for FA, CA and ABC have sensor nodes in article [6]. The location estimation of been given in algorithm 4.2, 4.3 and 4.4. All the three sensor nodes has been done more accurately with FA algorithms fulfill the SI principles such as positive than the conventional algorithm. A survey of feedback, negative feedback, fluctuations in solutions applications of FA and its variants tested on continuous and multiple communication. optimization has been presented in article [7]. ABC is a metaheuristic algorithm which has a scope in easy 4.1 The ABC Algorithm modification. Several variants and hybrid versions of Initialize employed bee positions ABC have been developed in past. The insufficiency of Calculate fitness value and record the best as p the ABC algorithm has been identified and the WHILE {Maximum iterations have not been exploitation capacity has been improved by many reached or Stop criteria is met} researchers. These modifications have been outlined in FOR {each employed bee} article [8]. Modify their positions Calculate fitness with new positions IF {fitness value is better than the previous best 3. BENCHMARK FUNCTIONS fitness value} Benchmark function validation has been commonly used Interchange the positions and calculate p in design of global optimization algorithms. There exists ENDIF a broad range of published test functions. These ENDFOR functions have been investigated with arbitrary Calculate the fitness probability FOR {each onlooker bee}

RUAS-SASTech Journal 23 Vol. 16, Issue 2

Calculate the fitness 3. alpha = 0.3 IF {fitness value is better than the previous best 4. beta = 0.5 fitness value} Interchange the positions and calculate p B. Experimental Setup In ABC-Based ENDIF Optimization ENDFOR 1. Limit for elimination of bees L = P * D TATE Global optimum solution = g 2. Maximum iterations kmax= 100 IF {no of trials are bigger than Control parameter} Functions with any value less than 10E-10 is considered Generate scout bees and repeat the algorithm as zero. The accuracy for each benchmark function using ENDIF meta-heuristic algorithms have been recorded. The ENDWHILE results of the benchmark function are depicted in Fig. 1, 2, 3 and 4. 4.2 The FIREFLY Algorithm Initialize firefly positions and define absorption coefficient WHILE {Maximum iterations have been not reached or Stop criteria is met} FOR {all the fireflies} Determine the light intensity Calculate the fitness IF {Fitness is better towards modified brightness} Move firefly towards better fitness ENDIF ENDFOR ENDWHILE Record the firefly with best fitness as g Fig. 1 Performance of CA, ABC and FA on 4.3 The CULTURAL Algorithm Rastrigin Function Initialize the agents and belief space WHILE {Maximum iterations have been reached or Stop criteria is met} FOR {each of the agent} Select the random knowledge component Apply variation operator Generate the sub-agent IF {Fitness of sub-agent is better} Replace agent with sub-agent ENDIF ENDFOR Update the belief space for the accepted agents ENDWHILE Record the agent with best fitness as g

Fig. 2 Performance of CA, ABC and FA on 5. RESULTS Rosenbrock Function Benchmark functions have been tested for a standard range. All the computations have been carried out on the same computer using MATLAB simulation. Parameters used by each algorithm are given as follows. Some of the common parameters are: Population P = 50 Dimension D = 20 to 250 Maximum iterations kmax = 1000 5.1 Experimental Setup in FA-Based optimization 1. Attraction coefficient Base value A =1 2. Light absorption coefficient Le = 1 3. Random coefficient R= 0.3 A. Experimental Setup in CA-Based Optimization Fig. 3 Performance of CA, ABC and FA on Schwefel 1. Acceptance ratio Ar= 0.32 Function 2. Accepted individual count Ac = P * Ar

RUAS-SASTech Journal 24 Vol. 16, Issue 2

REFERENCES [1] Yang X.S., (2010) Firefly Algorithm, Levy Flights and Global Optimization, Research and Development in Intelligent Systems XXVI: Incorporating Applications and Innovations in Intelligent Systems XVII, Springer, London, pp.209- 218. [2] Reynolds R.G., (1999) New ideas in optimization, Cultural Algorithms: Theory and Applications, Maidenhead, England: McGraw-Hill Ltd., pp. 367– 378. [3] Karaboga D., Basturk B., (2007) A powerful and efficient algorithm for numerical function Fig. 4 Performance of CA, ABC and FA on Sphere optimization: Artificial Bee Colony (ABC) Function algorithm, Journal of Global Optimization, 39(3), pp. 459–471. [4] Xu W., Zhang L., Gu X., (2010) A Novel Cultural Algorithm and Its Application to the Constrained Optimization in Ammonia Synthesis, Berlin, Heidelberg: Springer. [5] Feng W., Zhang X.Y., (2008) The self-adaptive cultural algorithm optimization based on the fuzzy controller, In 2008 IEEE International Symposium on Knowledge Acquisition and Modeling Workshop, pp. 328–332. [6] Pei B., Zhang H., Pei T., Wang H., (2015) Firefly algorithm optimization based wsn localization algorithm, In International Conference on Information and Communications Technologies (ICT 2015), pp. 1–5. Fig. 5 Performance comparison of all the algorithms by varying dimensions with population = 100, [7] Tilahun S.L., Ngnotchouye J.M.T., (2017) Firefly Iterations = 1000 algorithm for discrete optimization problems: A survey, KSCE Journal of Civil Engineering, 21(2), The algorithms have been also tested on different pp. 535–545. dimensions. The results show the consistency that FA performs better than CA and ABC. ABC shows the worst [8] Gao W., Liu S., Huang L., (2012) A global best performance among the three algorithms. The FA artificial bee colony algorithm for global minimizes the function to the most optimum value. The optimization, Journal of Computational and performance of the three algorithms have been recorded Applied Mathematics, 236(11), pp. 2741–2753. by varying the dimensions of the problem. The comparison for rastrigin function is depicted in Figure 4. [9] Karaboga D., Gorkemli B., Ozturk C., Karaboga N., Similarly the tests are performed by varying the (2014) A comprehensive survey: Artificial bee population and number of iteration. In all the test cases, colony (ABC) algorithm and applications, Artificial the results are best using FA. The results are inferior by Intelligence Reviews, 42(1), pp. 21–57. the ABC algorithm and CA. [10] Fister I., Yang I. F. Jr., X., Brest J., (2013) A comprehensive review of firefly algorithms, Swarm and Evolutionary Computation, 13, pp. 34-46. 6. CONCLUSION Metaheuristics algorithms FA, CA and the ABC algorithm have been compared for multidimensional optimization. The optimization is performed using benchmark functions. FA and CA exhibit better performance than the ABC algorithm. FA is preferred among the three algorithm as it exhibits the best results consistently for all the dimensions. The future extension of this work will be application on real life optimization problems. Development of hybrid algorithms using evolutionary and can be another direction of this research.

RUAS-SASTech Journal 25 Vol. 16, Issue 2