International Journal of Bioinformatics and Biomedical Engineering Vol. 1, No. 2, 2015, pp. 175-180 http://www.aiscience.org/journal/ijbbe

Recapitulation of Ant Colony and Firefly Optimization Techniques

Anuradha *, Kshitiz Adlakha

CSE&IT Dept., ITM University, Gurgaon, India

Abstract This paper presents an analysis done on ACO and FFA optimization algorithms. Optimization algorithms have been used successfully to solve various problems in different areas. These algorithms are considered an important part of , which refers to the social interaction of swarms of ants, termites, bees, termites and flock of birds. The methods used for the comparison are Max-Min Ant System, Ant Colony System, Rank-based Ant System and various hybrids/modified firefly algorithms. ACO and FFA can be modified and hybridized to solve diverse engineering problems. In most cases, the results provided by these algorithms meet the expected output.

Keywords Ant, Firefly, ACO, Swarm Intelligence, Meta-Heuristic, Pheromone

Received: July 1, 2015 / Accepted: August 8, 2015 / Published online: August 26, 2015 @ 2015 The Authors. Published by American Institute of Science. This Open Access article is under the CC BY-NC license. http://creativecommons.org/licenses/by-nc/4.0/

1. Introduction Problems of optimization are found in almost all industries as dance’ where the a few bees known as ‘bee scouts’ lead the well as in the scientific community. Logistical traffic routing, colony of bees towards the new food sources discovered by reducing the cost of manufacturing of products, travelling them. The bee colony must be aware of when to exploit the salesman problem are all examples of optimization problems. existing food sources and when to find the new ones, so as to In the creation of Integrated Circuits (ICs) using the VLSI maximize the nectar intake and minimize the scavenging method, the placing of components of the board such as to effects. Many of the decisions like reproduction, division of maximize energy efficiency, minimize production cost is an important tasks are made in a distributed manner based on the important problem. native information obtained from the exchanges with their Over the past 10 years, Swarm Intelligence [1] has become transitional surroundings [2]. very popular. It includes the employment of multi-agent systems that are based on the actions of real world insect 2. Ant Algorithms swarms for solving problems. The swarms that are observed show coordinated behaviour to proceed towards their goals, Ant algorithms and firefly algorithms are two of the most like searching for food and building sophisticated nests. This recent techniques developed in the field of swarm intelligence. coordinated behaviour is a result of the interactions between Ant algorithm was originally developed in 1996 by Dorigo, the individuals of the swarms. Different insects interact in Maniezzo, & Colorni, [3] while Firefly algorithm was different ways with each other. Ants interact with a chemical developed by Yang in 2008 [4]. Both of these algorithms were pheromone trails to find the shortest path to their food sources, later formalized into meta-heuristics. These algorithms are whereas bees interact with each other with a so-called ‘waggle inspired by nature and can be applied to solve the hardest of

* Corresponding author E-mail address: [email protected] (Anuradha), [email protected] (K. Adlakha) 176 Anuradha and Kshitiz Adlakha: Recapitulation of Ant Colony and Firefly Optimization Techniques

optimization problems, including NP-hard problems. Fig 1 to the problem starting from the initial state, iterating through shows the shortest path followed by ant from source to food its search environment. A specific pheromone update rule destination. should govern the amount of artificial pheromone each agent/ant deposits while moving. Pheromone may be deposited with states or otherwise, during state transition. While the solution is being created, pheromone may deposit at each state transition. This is called the ‘online step by step pheromone trial update’. On the other hand, when ants retrace their path when a solution has been created and only then deposit pheromone on their trails, it is called ‘online delayed pheromone update’. Along with these properties on the ants of the wild, artificial ants have extra features which help them in advancing their performance. Some of these features that have been widely used in the past are local search and candidate list. The first ant algorithm was developed by Dorigo et al. in 1996 [3]. It was Fig. 1. Shortest Path Experiment. called the ‘Ant System’. It was successfully applied to the classic Travelling Salesman Problem (TSP). A TSP problem The searching behaviour of ants in the wild was the original involves finding the shortest length to travel each town of a set motivation towards the development of ant algorithms. Ants of towns, M. The success of this algorithm led to the interact with each other by laying a pheromone trail, which development of a lot of other ant algorithms. The first of these they tend to follow. Experiments in the past have shown that was the ACO meta-heuristic. It was developed in the 1999 by ants are more likely to follow a trail with a greater Dorigo & Di Caro [8]. It described the overall way of finding a concentration of pheromone. solution to combinatorial problems by estimated solutions The above given figure shows an experiment, called the based on the standard behaviour of ants. Given below in Fig.2 “shortest path” experiment [5], conducted to show the path is the algorithm of ant colony meta-heuristic: followed by ants when they leave their nests in search for food. In the figure, ‘N’ represents the nest of the ants and ‘F’ represents the food. There are two possible paths to reach to the food from the nest, NDCBF and NDHBF. Initially, when the ants leave in search for food, half of the ants follow the left path and half of them follow the right one. The ants following the left path reach the food source quicker. As soon as an ant collects the food from the source it tracks its way back to the nest through the pheromone trail laid down earlier, on its way to the food source, while laying pheromone again, and thus Fig. 2. The ant colony meta-heuristic. strengthening the pheromone trail along the left path. Now any The main ACO algorithms are the Max-Min Ant System, Ant ants leaving the nest or returning from the food source are Colony System and Rank-based Ant System. In the Max-Min more likely to follow the path on the left, due to the high Ant System (MMAS) algorithm [7], the pheromone trail is concentration of pheromone on this path. updated by only the best ant-updates and unlike the original Ant System, the pheromone update function is bound. 3. Applications in Computer In the Ant Colony System [9], the pheromone update function Science is different from the one in the original Ant System. Just like the ants in the wild, in ACS a local pheromone update is This behaviour of ants can be achieved in the computational applied along with the update of pheromone at the end of the world with the use of artificial ants (agents) that communicate each offline pheromone update. This offline pheromone through artificial pheromone trails. update is applied by the iteration-best or best so far ant only, An artificial ant should have the following properties [6]. It which is similar to the MMAS algorithm. should have an interior memory that stores all the previously In the Rank-based Ant System [10], the solutions of each ant visited locations. Each ant should try to find a likely solution are ranked in a decreasing order of the quality of their tour International Journal of Bioinformatics and Biomedical Engineering Vol. 1, No. 2, 2015, pp. 175-180 177

length. The pheromone deposited by each ant depends upon from its current location to the allowed surrounding pixel that the rank of the ant. The global-best solution receives extra has the greatest boundary characteristics , here comes the amount of pheromone depending on the quality of the pheromone characteristic from Ant Algorithm considering solution. every movement to a new pixel in an image depositing Computational results (taken from Stutzle et al. (2000) [7]) pheromones, change in the image gradient and pheromone displaying the optimum results of four ant algorithms as evaporation occur at a fixed rate per iteration. The pheromone applied to three different TSP instances is shown in Fig.3. trail leads to the boundary detection considering the transition rule as heuristic function, as the ants converging at the boundary starting at the random positons with the increasing ants following the pheromone trail maps the leaf boundary. Considering the assertions in this application of Ant Algorithm comparing to typical original ant algorithm; final solution is achieved using the pheromones as well as guiding the ant movement and single ant or one ant cannot achieve this Fig. 3. Computational Results of famous ant colony optimization algorithms. boundary detection for image. Clustering mechanism uses ant algorithm as a standard tool for mapping pixels to cluster in 4. Advanced Ant Algorithms the search space; ants searches for low grayscale regions and in an area away from segmentation. Over the past few years, there has been a lot a development in the field of Optimization, eventually leading to more Analysis of large amounts of data using various data mining specialized ant algorithms. Following the research there has and warehousing techniques by performing various operations been a significant rise in the applications of ant optimization such as data clustering, data classification and data forecasting techniques. Below are some notable applications of ant with the aim to find valid patterns and relationships among optimization. large data sets leading to extract right knowledge from data [17], [18]. Later development in the field of data analysis, Ant The Protein Folding Problem: One of the most complex NP algorithms are also being used as a purpose to deal with hard combinatorial problem yet fundamental in computational classification of large amount of data. Based on the sets of molecular biology is protein folding problem. Predicting the predefined classed each case (object, record or instance) is native structure of proteins contained in amino acidic assigned to a class based on the value of the attributes for the sequence by understanding and analysing the bio-cellular case. level structure in huge conformational space in is highly expensive approach. The Sequence of Hydrophobic and Polar residues from the amino-acidic sequences in proteins are 5. Firefly Algorithms represented as H and P respectively. The solution to Protein There are more than 2000 species of fireflies in the world, folding problem for both 2D [11] and 3D [12] lattices is Ant which live around in warm environments and are most active Algorithms. Using the Gibbs hypothesis the native state of during the summer. They have been a topic of research for a protein is the one with lowest Gibb’s free energy - the number long time now and a lot of research papers have been written of topological contacts between hydrophobic amino-acids that about them. are not neighbours gives the conformation Gibb’s free energy. Their most distinguishing feature is their flashing light which Conformation c, h such H–H contacts, it has free energy is produced a biochemical procedure bioluminescence. They E(c) = h. (-1). use this light to attract other partners for mating and for warning off potential predators. Usually, the flying males Digital Image Processing using boundary detection algorithms make the first signal trying to attract the flightless female use the pheromones pheromone used in ant algorithm [13], fireflies on the ground. Females, in turn, emit continuous or [14]. Boundary detection algorithm along with clustering flashing lights, which are generally brighter than the lights algorithms [15], [16] is used for the low level image produced by male fireflies. This flashing light has served the segmentation processes using ant algorithmic techniques. The basic foundation towards the development of the firefly digital image is the ant arena or the search space for ants, algorithm. moving around the arena using the pixels in distinct pixel-wise mode. To achieve boundary detection, locating and mapping The FA was given by Yang in 2008 [4], which described the out the boundary within the image using the heuristic classical firefly algorithm. It was a very efficient optimization information weighs higher the probability of an ant moving algorithm which was able to derive more optimal solutions in the given search space simultaneously. 178 Anuradha and Kshitiz Adlakha: Recapitulation of Ant Colony and Firefly Optimization Techniques

The algorithm formulated by Yang is given below by Fig 4: • A component of the firefly • The whole firefly • The complete population Another way of classifying the classic firefly algorithms is to divide them into two parts, modified and hybrid. Hybridization was first done when problems arose in finding the appropriate solution of some optimization problems. Fig. 5 shows the categorization of famous firefly algorithms:

Fig. 4. Pseudo Code of Firefly Algorithm .

Clauses used: All fireflies are unisex. Attraction of a firefly is proportional to their light intensity. The intensity of the light of a firefly is determined by the fitness function.

6. Classification of Firefly Algorithms There are a lot of variants of the popular firefly algorithm; therefore a classification system is essential. The most common way of classifying firefly algorithms is one the basis Fig. 5. Classification of Firefly Algorithms. of the settings of their strategy parameters [19]. Choosing these parameters is a crucial task for the developers, as they 7. Efficiency of Firefly directly affect the efficiency of the algorithm. Along with Algorithms these parameters, other things like what features or modules are modified also determine the behaviour of the FA. The firefly algorithms are one of the most efficient algorithms at solving classification and optimization problems. The The classification can be done on the basis of reasons for that are many. We can point the major explanations 1. Features or modules that are modified: for its success by analysing its features. • Depiction of fireflies (binary, real-valued) The first feature of FA is that it can automatically split its population into subdivisions on the basis of the fact that • Population structure (swarm, multi-swarm) attraction by nearer neighbours is higher than the ones that are • Calculation of the fitness function far. This helps in FA in solving multi-modal optimization • Determination of the best solution (non-elitism, elitism) problems more efficiently. • Movement of fireflies (uniform, Gaussian, Lévy flights, The second feature of FA is that it does not use historical chaos distribution) individual best or an explicit global best which prevents premature convergence like those in particle swarm 2. Way of modification: optimization (PSO) [26]. • Deterministic Firefly algorithms have the ability to control their scaling • Adaptive parameter which helps them adjust to the problem landscape and switch their modality. Velocities are not used in firefly • Self-adaptive algorithms, thus there are no problems associated with that 3. Range of modifications: unlike the particle swarm optimization. International Journal of Bioinformatics and Biomedical Engineering Vol. 1, No. 2, 2015, pp. 175-180 179

After analysing all these features, we can consider FA to be a optimization problems. generalization of PSO, and differential In the field of classification, FA is used in data mining, neural evolution. FA takes benefits from all of these 3, hence networks and . Even though classifications performing in an extremely efficient manner. can be measured as optimization, Holland [25] penned that learning, as component part of classification, is looked at as a 8. Applications of Firefly procedure of adaptation to a particularly unknown Algorithms environment, not as an optimization problem. FA is used in almost all branches of engineering. It has become Firefly algorithms are used in various fields for answering of one of the most important technologies in engineering today. optimization and classification problems along with several The scope of the reviews done on firefly algorithms in engineering problems. engineering practices is very large. Industrial optimization has In the field of optimization, FA is used in combinatorial, the greatest number of papers written about in engineering constrained, multi-objective, continuous, dynamic and noisy applications. It is followed by image processing and then optimization. Most of the past publications about the firefly antenna design [27] [28]. Fig. 6 shows the various areas algorithm, like [20, 21, 22, 23, 24] relate to continuous covered by Firefly algorithms:

Fig. 6. Various areas covered by Firefly algorithms.

it also promotes future development of these algorithms to 9. Conclusion solve the unanswered questions and deal with even more harder challenges. Both FA and ACO algorithms have come a long way from their inception. Today, they are practically used in every References domain of science and industry. This paper has briefly detailed some of the developments and applications of both of these [1] C. Blum, X Li, Swarm intelligence in optimization, Swarm algorithms with the aim to make them easy to understand for Intelligence: Introduction and Applications, Springer Verlag, Berlin, 2008, pp.43–86. everyone. [2] M. Beekman, G. Sword, S.Simpson, Biological foundations of Due to their large scope of applications, these algorithms are swarm intelligence, Swarm Intelligence: Introduction and bound to move forward and make even more progress in the Applications, Springer Verlag, Berlin, 2008, pp.3–41. coming future. Hybridizing them with other techniques will [3] Dorigo, M., Maniezzo, V., & Colorni, A. (1996). Ant System: lead to development of even more efficient algorithms that can Optimization by a colony of cooperating agents. IEEE be used to solve dynamic problems. Transactions on Systems, Man, and Cybernetics – Part B, 26, 29–41. This paper shows that ACO and FA are easy to understand, [4] X.S. Yang, Firefly algorithm, Nature-Inspired Metaheuristic flexible and can be used in a lot of domains. At the same time, Algorithms 20 (2008)79–90. 180 Anuradha and Kshitiz Adlakha: Recapitulation of Ant Colony and Firefly Optimization Techniques

[5] Goss, S., Aron, S., Deneubourg, J. L., & Pasteels, J. M. (1989). [17] Fayyad, U. M., Piatetsky-Shapiro, G., & Smyth, P. (1996). Self-organized shortcuts in the argentine ant. From data mining to knowledge discovery: An overview. In Naturwissenschaften, 76, 579–581. Advances in knowledge discovery and data mining (pp. 1–34). Cambridge, MA: AAAI/MIT. [6] Cordon, O., Herrera, F., & Stutzle, T. (2002). A review on the ant colony optimization metaheuristic: Basis, models and new [18] Edelstein, H. A. (1999). Introduction to data mining and trends. Mathware and Soft , 9(2–3): 141 175. knowledge discovery (3rd ed.). Two Crows Corporation. [7] Stutzle, T., & Hoos, H. H. (2000). Max–min ant system. Future [19] A. Eiben, J. Smith, Introduction to Evolutionary Computing, Generation Computer Systems, 16(8), 889–914. Springer-Verlag, Berlin, 2003. [8] Dorigo, M., & Di Caro, G. (1999). The Ant Colony [20] X.S. Yang, Firefly algorithm, stochastic test functions and optimization metaheuristic. New Ideas in Optimization (pp. design optimisa- tion, International Journal of Bio-Inspired 11–32). 2 (2) (2010) 78–84. [9] Dorigo, M., & Gambardella, L. M. (1997). Ant Colony System: [21] X.S. Yang, Review of meta-heuristics and generalised A cooperating learning approach to the travelling salesman evolutionary walk algorithm, International Journal of problem. IEEE Transactions on Evolutionary Computation, Bio-Inspired Computation 3 (2) (2011) 77–84. 1(1), 53–66. [22] X.S. Yang, Metaheuristic optimization: algorithm analysis and [10] Bullnheimer, B., Hartl, R. F., & Strauss, C. (1996). A new open problems, in: P. Pardalos, S. Rebennack (Eds.), rank-based version of the Ant System: A computational study. Experimental Algorithms, Lecture notes in Computer Science, Central European Journal for Operations Research and vol. 6630, Springer Verlag, Berlin, 2011, pp. 21–32. Economics, 7(1), 25–38. [23] X.S. Yang, Firefly algorithm, levy flights and global [11] Shmygelska, A., Hoos, H. H. (2003). An improved ant colony optimization, in: M. Bramer, R. Ellis, M. Petridis (Eds.), optimisation algorithm for the 2D HP protein folding problem. Research and Development in Intelligent Systems XXVI, In Advances in artificial intelligence: 16th Conference of the Springer, 2010, pp. 209–218. Canadian society for computational studies of intelligence, Halifax, Canada, AI 2003 (page 993). [24] X.S. Yang, Efficiency analysis of swarm intelligence and randomization techniques, Journal of Computational and [12] Findova, S. (2006). 3D protein folding problem using ant Theoretical Nanoscience 9 (2) (2012) 189–198. algorithm. In Proceedings of BioPS international conference, Sofia, Bulgaria (pp. 19–26). [25] J. Holland, Adaptation in Natural and Artificial Systems, 1st edition, MIT Press, Cambridge, USA, 1992. [13] Fernandes, C., Ramos, V., & Rosa, A. C. (2005). Self-regulated artificial ant colonies on digital image habitats. International [26] J. Kennedy, R. Eberhart, The particle swarm optimization: Journal of Lateral Computing, 2(1), 1–8. social adaptation in , in: D. Corne, M. Dorigo, F. Glover (Eds.), New Ideas in Optimization, [14] Ramos, V. & Almeida, F. (2000). Artificial ant colonies in McGraw Hill, London, UK, 1999, pp. 379–387. digital image habitats – a mass behaviour effect study on . In Proceedings of ANTS’2000 [27] I. Fister et al. in Swarm and Evolutionary Computation 13 (2013), pp. 34–46 [15] Channa, A. H., Rajpoot, N. M., & Rajpoot, K. M. (2006). Texture segmentation using ant tree clustering. In 2006 IEEE [28] R. Mallipeddi, P. Suganthan, Q. Pan, M. Tasgetiren, international conference on engineering of intelligent systems Differential evolution algorithm with ensemble of parameters (pp. 1–6). and mutation strategies, Applied Soft Computing 11 (2) (2011) 1679–1696. [16] Ouadfel, S., & Batouche, M. (2002). Unsupervised image segmentation using a colony of cooperating ants. In BMCV ’02: Proceedings of the second international workshop on biologically motivated computer vision (pp. 109–116). Springer-Verlag.