International Journal of Computer Science and Applications, Technomathematics Research Foundation Vol. XX, No. XX, pp. XXX – XXX, 20XX
A NOVEL FIREFLY ALGORITHM BASED ANT COLONY OPTIMIZATION FOR SOLVING COMBINATORIAL OPTIMIZATION PROBLEMS
ABDESSLEM LAYEB MISC lab., University of Constantine , Department of computer science and its applications, Constantine, 25000, Algeria
[email protected] ZEYNEB BENAYAD MISC lab., University of Constantine , Department of computer science and its applications, Constantine, 25000, Algeria
[email protected]
Inspired by ant colony optimization algorithm, a new firefly optimization algorithm is presented which we call firefly colony optimization algorithm (FCO). Unlike the standard firefly algorithm, the proposed approach is a distributed, and constructive greedy metaheuristic which uses the positive feedback to construct greedily good solutions, and to avoid a premature convergence to low quality solutions. We have assessed the performance of the proposed methodology on the bin packing problem (BPP). The results found show clearly the feasibility and the effectiveness of the proposed algorithm. Keywords: Firefly Algorithm; Firefly Colony Optimization; Greedy Algorithm; Bin packing problem.
1. Introduction In order to solve complex problems, ideas gleaned from natural mechanisms have been exploited to develop metaheuristics. Nature inspired optimization algorithms have been extensively investigated during the last decade paving the way for new computing paradigms. The ultimate goal is to develop systems that have ability to learn incrementally, to be adaptable to their environment, and to be tolerant to noise [Jourdan et al. (2009)]. Artificial neural networks, genetic algorithms and swarm intelligence are examples of bio-inspired systems used to this end [Fogel (2001)]. In recent years, optimizing by swarm intelligence has become a research interest to many research scientists of evolutionary computation fields. There are many algorithms based swarm intelligence like Ant Colony Optimization (ACO) [Dorigo and Gambardella (1997)], [Hu et al. (2008)], Particle Swarm Optimization (PSO) [Clerc and Kennedy (2002)], [GarciaGonzalo and Fernandez-Martinez (2012)], [Parpinelli and Lopes (2011)], Artificial Bee Colony algorithm (ABC) [Karaboga and Basturk (2007)], Artificial Immune Systems (AIS) [Yang et al. (2008)], Eco-Systems Optimization [Nebti and Meshoul (2009)], 1
2
ZEYNEB BENAYAD, ABDESSLEM LAYEB
Gravitational Search Algorithm (GSA) [Sahu et al. (2013)], Cuckoo Search Algorithm (CSA), [Yang and Deb (2010a)], [Layeb (2011)], etc. One of the most recent population based optimization algorithms is the Firefly Algorithm (FA) [Yang (2010a)], [Yang (2009)]. FA is a bio-inspired metaheuristic based on the flashing behavior and the phenomenon of bioluminescent communication of tropical fireflies. There are about two thousand firefly species, and most fireflies produce short and rhythmic flashes. The pattern of flashes is often unique for a particular species. However, the flashing light intensity decreases as the distance increases, this phenomenon inspired Yang to develop the basic FA. Since its appearance, the firefly algorithm has shown its promising effectiveness for various optimization problems [Fister et al. (2013)]. Indeed, FA is very competitive to deal with multimodal optimization problems [Yang (2009)], however its performance to deal with discrete optimization problems is not good enough compared to other popular swarm optimization algorithms like PSO algorithm, Ant colony, Artificial Bee Colony, etc. Moreover, its algorithmic complexity is somehow higher than similar algorithms like cuckoo search [Yang and Deb (2010a)], bat algorithms [Yang (2010b)], etc. The purpose of this paper is to present a novel variant of firefly algorithm based on a new behavior. In this variant, the fireflies are seen as cooperative learning agents like ants in Ant Colony Optimization algorithm [Levine and Ducatelle (2004)]. The proposed algorithm has a good combination of distributed computation, autocatalysis, and constructive greediness to find an optimal solution for combinatorial optimization problems. Like in ant colony, the search for a good solution is achieved by an indirect communication known as stigmergy amongst the fireflies. We have supposed in our algorithm that fireflies emit a phosphorescent substance on their ways which make them brightened. When they arrive at a decision point, they make a probabilistic choice, biased by the intensity of the phosphorescent substance’s light they see. This behavior has an autocatalytic effect because in fact that when a firefly chooses a path, it will increase the probability that the corresponding path will be chosen again by other fireflies in the future visits. We assume that, when they return back, the probability of choosing the same path is higher (due to the increase of its brightness). Indeed, more phosphorescent substance will be put on the chosen path, which makes it more attractive for future fireflies. The final graph solution in the firefly colony algorithm looks like roads in a city, more lamps on a road more the road is brightened and greater the intensity of a lamp more the road is brightened too. The proposed algorithm has several characteristic features. The speed is significantly increased because the FCO doesn’t make pairwise comparisons between all the fireflies like in the standard firefly algorithm of yang [Yang (2010d)]. Secondly, the performance of FCO is improved by decreasing the randomization capacity of the basic FA so that it decreases gradually as the optima are approaching. Thirdly, the hybridization between the greediness ability of the constructive algorithms, the exploitation and the exploration of the firefly algorithm has led to build a powerful algorithm to deal with discrete optimization problems. Finally, FCO was successfully tested on the bin packing problem (BPP) which is a hard combinatorial problem. Comparing with ant colony, cuckoo search, and other heuristics, the
A Novel Firefly Algorithm Based Ant Colony Optimization for Solving Combinatorial Optimization Problems 3
performance of our proposed method is significantly better, and it gives best solutions in low computational time. This paper is organized as follows. The first part contains the description of the firefly algorithm as it is currently implemented. Subsequent section is devoted to the detailed description of the proposed Firefly Colony Optimization (FCO). In the next part, we introduce briefly the bin packing problem; the application of the FCO for BPP is also presented in this section. This will be followed by the results of our numerical analysis in Section 5. Finally, we conclude the paper in the last Section. 2. Firefly Algorithm State of the art The Firefly Algorithm was developed by Xin She Yang [Yang and He (2013)], [Yang (2010a)] in late 2007 and 2008 in Cambridge University. Fireflies are simple insects living in groups. The social behavior of fireflies is not just dedicated to foraging but more to reproduction [Fister et al. (2013)]. In the core of this behavior, we find the direct communication between the fireflies by means of rhythmic flushing light. However, two fundamental functions of a firefly’s flashing are to attract mating partners, and to attract potential prey. In addition, flashing may also serve as a protective warning mechanism. The FA is based on these flashing patterns and behavior of fireflies. For simplicity, we can idealize these flashing characteristics as the following three rules: (1) Fireflies are unisex so that one firefly will be attracted to other fireflies regardless of their sex. (2) The attractiveness is proportional to the brightness, and they both decrease as their distance increases. Thus for any two flashing fireflies, the less brighter one will move towards the brighter one. If there is no brighter one than a particular firefly, it will move randomly. (3) The brightness of a firefly is determined by the landscape of the objective function. In the firefly algorithm, there are two important issues: the variation of light intensity and formulation of the attractiveness. In the simplest case for maximum optimization problems, the brightness I of a firefly at a particular location x can be chosen as. I (x ) ∝ f (x ) However, the attractiveness β is relative; it should be seen in the eyes of the beholder or judged by the other fireflies. In the simplest form, the light intensity I(x) varies with the distance r monotonically and exponentially as [Yang (2009)] in the Eq. (1)
I (r ) = I 0e −γ r
2
(1)
Sometimes, we may need a function which decreases monotonically at a slower rate. In this case, we can use the approximation giving in [Yang (2009)] by Eq. (2) I (2) I (r ) = 02 γr As a firefly’s attractiveness is proportional to the light intensity seen by adjacent fireflies, we can now define the variation of attractiveness β with the distance r by Eq. (3)
4
ZEYNEB BENAYAD, ABDESSLEM LAYEB
β = β 0e −γ r
2
(3)
Where β 0 is the attractiveness at r = 0. It is worth pointing out that the exponent γ r 2 can be replaced by other functions such as γ r m when m > 0. The distance r between any two fireflies i and j at xi and x j , respectively, is the Cartesian distance defined in Eq. (4)
rij = x i − x j =
∑
d k =1
(x i ,k − x j ,k )
(4)
The movement of a firefly i attracted to another more attractive (brighter) firefly j is determined by [Yang and He (2013)] according to Eq.(5)
x it +1 =x it + β 0e
−γ ri2, j
(x tj − x it ) + αt e it
(5)
Where the second term is due to the attraction, the third term is randomization with
αt being the randomization parameter, and ε it is a vector of random numbers drawn from a Gaussian distribution or uniform distribution at time t. If β 0 = 0 , it becomes a simple random walk. On the other hand, if γ = 0 , it reduces to a variant of particle swarm optimization. Furthermore, the randomization ε it can easily be extended to other distributions. The basic Firefly Algorithm is described as follows: Algorithm1: Original Firefly Algorithm Objective Function f(x), x = (x 1 , x 2 ,..., x d )T Generate initial population of fireflies x i (i = 1, 2,.., m ) Light intensity I i at x i is determined by f (x i ) Define light absorption coefficient γ while t