Scouting Firefly Algorithm and its Performance on Global Optimization Problems

—For effective optimization, metaheuristics should maintain the proper balance between exploration and exploitation. However, the standard firefly algorithm (FA) posted some limitations in its exploration process that can eventually lead to premature convergence, affecting its performance and adding uncertainty to the optimization results. To address these constraints, this study introduces an additional novel search mechanism for the standard FA inspired by the behavior of the scout bee in the artificial bee colony (ABC) algorithm, termed the "Scouting FA". Specifically, fireflies stuck in the local optima will take directed extra random walks to escape toward the region of the optimum solution, thus improving convergence accuracy. Empirical findings on the five standard benchmark functions have validated the effects of this modification and revealed that Scouting FA is superior to its original version.


INTRODUCTION
The firefly algorithm (FA) is a nature-inspired metaheuristics mimicking how fireflies behave. It was introduced by Yang [1] in 2009 to optimize multimodal problems. Over competing algorithms, FA proved advantageous owing to its simplicity, flexibility, ease of implementation, and few parameters to tune. As a result, FA quickly gains popularity in the scientific community. Furthermore, it has been empirically proven to handle NP-hard problems effectively [2]. Since its inception almost 15 years ago, FA and its modified variants have demonstrated significant success in various fields of application. For example, in multilevel image segmentation [3], as a way to reduce the number of dimensions [4], optimizing convolutional neural networks [5], solving course timetabling problems [6], and dealing with complex engineering tasks [7], [8], among other things. Knowing that FA has a universal application makes it a fascinating subject to pursue. In fact, this metaheuristic approach can be investigated further to provide solutions to real-world problems, such as IoT-based applications [9], time-series forecasting [10], [11], and machine vision-based tasks [12].
Metaheuristic optimization algorithms yielded approximations. Even though it does not guarantee the best solution, it gives the best result possible. The two main concepts of metaheuristics are exploration and exploitation [13]. Exploration searches space globally to locate the region with the optimal solution. On the other hand, exploitation seeks the optimal location of convergence by doing a local search within the area discovered by exploration. Because exploration and exploitation are inherently contrasting processes, it is critical to establish a robust exploration mechanism before starting the exploitation process. Likewise, it is also vital to maintain the proper balance between the two techniques during the search. That is why, if exploration is inefficient, the solution may converge too soon because it will become stuck in suboptimal domains before finding the optimal region [14], [15].
Previous studies reveal that FA is relatively robust at exploitation, although its exploratory ability can be improved [16]. Weaknesses in fireflies' exploration ability can eventually impact their convergence accuracy, adding uncertainty to the optimization results [17], [18]. Consequently, this limitation has narrowed the scope of the FA's applications. A recent approach to counter this drawback applied a damped vibration distribution factor to enhance the attractiveness and randomization formula [2]. Another notable solution utilized a quasi-reflection-based learning approach in the initiation stage of implementation to diversify the FA's population [19]. In addition, [20] enhanced the FA's exploration by adding genetic operators and using a dynamically modified step size. A hybrid method [21] used the group search approach established from the social network search (SNS) algorithm [22]. In [23], a novel method for updating the firefly's new location and the ABC [24] algorithm's scout bee search technique was also introduced to supplement the FA's search operation.
After numerous successful deployments of updated and hybridized FA variants, there are still opportunities for improvement. Initiatives to hybridize metaheuristic algorithms, such as those described in [25]- [27] have emerged. Similarly, the exploration mechanism of the FA can be combined with processes from various metaheuristics. Thus, the strengths of each algorithm could be merged to develop new algorithms that are more robust and accurate.
This work is yet another attempt to improve the FA's exploration process. An additional novel search mechanism inspired by the behavior of the scout bee in the ABC algorithm complements the original implementation. Specifically, fireflies stuck in the local optima will take directed extra random walks to escape toward the region of the optimum solution, thus improving convergence accuracy. This method is known as the scouting firefly algorithm (Scouting FA). This study's most significant contribution is providing a better www.ijacsa.thesai.org version of the widely used FA that fixes the established shortcomings of the original version.
The remainder of the paper is organized as follows: Section II highlights the FA and ABC algorithms, and related works. Section III suggests a novel way to improve the FA. Section IV describes the experimental setup. The results and discussions are elucidated in Section V. Section VI gives a summary of the conclusions and future works.

A. Standard Firefly Algorithm (FA)
The fundamental concept of FA relates to the insects' bioluminescence, which is used to communicate with other fireflies. The following assumptions were made to represent the algorithm mathematically: 1) All fireflies are unisex and attract each other without regard to their sex; 2) Attractiveness is linked to brightness; thus, the firefly with lower intensity will approach the brighter one. Unless there is a brighter firefly, it will move randomly; and 3) The firefly's brightness corresponds to the optimization problem's objective function.
In the FA, convergence accuracy and speed largely depend on two key factors: the variation of light intensity and the formulation of attractiveness [28]. The attractiveness β is relative, depending on how a particular firefly perceives other fireflies. The relativity of β is computed relative to the distance between the firefly and . Accordingly, the farther apart the fireflies are, the less light they can see from one another, as governed by the inverse square law. Besides, the fact that light is absorbed by the atmosphere is also a significant factor to consider.
The Cartesian distance between any two fireflies and located at and is given by: where d is the dimension of the optimization problem.
Correspondingly, the light intensity varies with the distance monotonically and exponentially, as depicted in the formula: (2) where is the initial light intensity and is the light absorption coefficient that controls the light intensity.
As a firefly's attractiveness is proportional to the light intensity perceived by adjacent fireflies, the attractiveness of a firefly can be derived by: (3) where is the attractiveness at .
The formula to determine the movement of a less-bright firefly that is attracted to brighter firefly is given by: where the ( ) calculates the attraction, while the is randomization with the vector of random variables taken from a Gaussian distribution or uniform distribution in range [0, 1].

B. Artificial Bee Colony (ABC) Algorithm
The ABC algorithm is another well-known nature-inspired metaheuristic [24]. It was formally established by Karaboga in 2005 and modeled on how honeybee swarms search for food. Artificial bee colonies are classified as employed, onlookers, and scouts. Employed bees identify food sources within the search space and relay information about the food sources to onlookers via dance moves. The onlookers choose one of the food sources based on its attributes, while the scouts search for new food sources randomly. Initially, all the bees in the colony were scouts.
When the scout finds a new food source using Eq. 5 and starts to consume it, that scout is turned into an employed bee. The abandonment of the food sources will commence once the "limit" given by Eq. (6) is met. Conversely, the employed bee will become a scout once the "trial" exceeds the "limit." The "trial" counter will increase if the scout cannot discover a new food source; otherwise, it will be reset to zero.
Assume that the abandoned source is x i and j ∈ {1, 2,...,D}, then the scout discovers a new food source to be replaced with The limit parameter l is computed using: where CS is the colony size and D is the dimension of the problem.

C. Related Works
According to the no-free-lunch theorem [29], no single approach can solve all optimization problems. Thus, the original implementations of metaheuristics are modified to perform better. Two outstanding FA versions incorporating the ABC algorithm are discussed below.
A hybrid of firefly and multi-strategy ABC for optimizing single-objective problems is presented in [27]. The FA performs the global search, while the novel multi-strategy ABC does the local search. Nevertheless, this approach displayed computational complexity because two independent search techniques coexisted throughout the search process. Furthermore, switching the search from FA to the multistrategy ABC employs a diversity measure that raises computational costs. www.ijacsa.thesai.org The work of [23] is another impactful study that enhanced the exploration of FA using the scout bee search mechanism of the ABC algorithm. In their approach, non-improving fireflies will be replaced by new fireflies at random locations within the specified lower and upper bounds ( based on the formula: where signifies the ith firefly and the corresponding jth element; and rand is a uniform random number.
The above method provides an entirely random position for fireflies that exhibits no improvements above a specific threshold limit. This can cause fireflies already nearing convergence to spread farther away, necessitating additional exploitation and exploration. This implementation method may impact both the convergence accuracy and the convergence rate.

III. SCOUTING FIREFLY ALGORITHM
The Scouting FA aims to improve the standard FA's exploration ability by allowing the fireflies stuck in the local optimum over a specific threshold limit ("limit") to take directed extra random walks to scout unfamiliar regions in the search space further. The formula for "limit" is identical to that stated in Eq. 6. Afterward, a greedy selection will be utilized. If the new solution has a higher fitness value than the previous one, its position will be updated by Eq. 8; otherwise, no movement will occur.
The directed extra random walk formula is defined as: (8) where x i+1 refers to the new position of the firefly after taking a random walk, x i is the current position, α i denotes a random number drawn from uniform distribution U(0, 1), while ub stands for upper bound and lb for the lower bound.
will ensure that a directed extra random walk is provided, such that, if the generated α i is < 0.50, the firefly will move backward, and if it is > 0.50, a forward movement will be made.
The novelty of Scouting FA over [23] is that instead of providing an entirely random position for fireflies that exhibits no improvements, directed extra random walks with greedy selection is applied. This is to avoid spreading away fireflies that were already nearing convergence. Furthermore, unlike [27], as an alternative for having two independent search techniques that coexisted throughout the search process and the required diversity measure for switching between searches, this study complemented the standard FA as the extra random walks will only be executed when it improves the fitness value even further. The pseudo code of the Scouting FA is described in Algorithm 1.  1, 2, ..., n). Light intensity Ii at xi is determined by f(xi). Define FA parameter: α, β, γ. Set value for the threshold limit value, limit, using Eq. 6 while (t < maxGeneration),

IV. EXPERIMENTAL SET-UP
Five well-known benchmark functions were used to validate the performance of the Scouting FA compared to the original implementation. Table I lists these functions, their formula, variable limits, and global optimum.
The control parameter values used in the simulations are given in Table II.   TABLE II. CONTROL PARAMETERS OF STANDARD FA AND SCOUTING FA AS IMPLEMENTED IN THE STUDY

Parameter Value
Maximum generation (maxGeneration) 300 Population size (n) 30 Randomization parameter 1.0 All experiments were carried out in Python 3.10.5 on an Intel(R) Core (TM) i7-11370H processor running at 3.30 GHz and with 40 GB of random-access memory.

V. RESULTS AND DISCUSSION
Due to the stochastic nature of the metaheuristic algorithms, each iteration is seeded with a random number to ensure that each solution is unique. Experimental results are shown in Table III. The best, worst, and mean optimal fitness value were noted and compared. The results of the mean optimal fitness value were generated in 100 independent runs to eliminate the effect of the stochastic simulation discrepancy [28]. If an algorithm gets the best results for the performance metric, the results are shown in bold and in a slightly bigger font size.   As shown in Fig. 2, early runs of the standard FA reveal an early convergence nearing 0.20 of the fitness value. When tested using the Booth function, the application of the Scouting FA is more effective. The graph demonstrates the solution progresses towards convergence at the global optimum, f(x)=0 at x= (1,3), in more than 150 iterations. As depicted in Fig. 3, in terms of the Easom function, the premature convergence occurs very quickly at nearly -0.80 in the standard FA. Contrary to that, Scouting FA yielded a better result, as escaping from the local optimum is evident. In this problem, the global minimum, f(x)=-1 at x=(,), is nearly achieved at below 50 iterations.
When the Scouting FA optimized the difficult Rosenbrock function, as shown in Fig. 4, there was a significant (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 14, No. 3, 2023 449 | P a g e www.ijacsa.thesai.org improvement in achieving a near-optimal result. As illustrated, the Scouting FA's extra random walks slowly improve the solution until it converges close to the global optimum at f(x)=0 at x= (1,1) after the 200th iteration.
For a complex optimization problem like the Ackley function, the graph depicted in Fig. 5 revealed that the Scouting FA is considerably better than its original implementation. While standard FA prematurely converges above the 1.5 fitness value, the extra random walks the Scouting FA provides have progressively improved the fitness value until it achieves close to f(x)=0 at x=(0,0) before it reaches the 300 th iteration. Fig. 6 shows how 30 fireflies in the five test functions converged after 300 iterations when the standard FA was used. In Fig. 7, the Scouting FA was utilized. As depicted, indeed, with Scouting FA, fireflies can escape being trapped in the suboptimal solution by taking directed extra random walks.

VI. CONCLUSIONS AND FUTURE WORKS
This study improved the exploration of the standard FA by adding the behavior of the scout bee from the ABC algorithm. When the novel search method was used to solve global optimization problems, it made the search more precise, significantly improving convergence accuracy. This result implies that the Scouting FA is more powerful than its original implementation.
In the future, researchers will investigate how well the Scouting FA works when used to tune the hyperparameters of machine learning-based methods for solving real-world optimization problems.