Abstract
The Whale Optimization Algorithm (WOA) is a recent meta-heuristic that can be explored in global optimization problems. This paper proposes a new parameter adjustment mechanism that influences the probability of the food recognition process in the whale algorithm. The adjustment is performed using a fuzzy inference system that uses the current iteration number as input information. Our simulation results are compared with other meta-heuristics such as the conventional version of WOA, Particle Swarm Optimization (PSO) and Differential Evolution (DE). All algorithms are used to optimize ten test functions (Sphere, Schwefel 2.22, Quartic, Rosenbrock, Ackley, Rastrigin, Penalty 1, Schwefel 2.21, Six hump camel back and Shekel 1) in order to obtain their respective optimal values for be used as criteria for analysis and comparison. The results of the simulations show that the proposed fuzzy inference system improves the convergence of WOA and also is competitive in relation to the other algorithms, i.e., classical WOA, PSO and DE.
Keywords
Introduction
Mathematical optimization is a branch of engineering that deals with the selection of the ideal solution for a specific function (or a problem), in order to either minimize or maximize the function’s result [1]. In layman’s terms, the optimization can be described as a process to select the best elements present among a series of available alternatives, in order to obtain the best possible results while solving a specific problem.
Methods of optimization can be divided into two major groups: deterministic and stochastic. The deterministic techniques include a classical approach and most of them utilize gradient operators, whereas the stochastic approach includes the utilization of heuristics and meta-heuristics that simulate the behavior of different natural processes [2, 3]. Recently, several heuristic methods with interesting results have been proposed. These approaches utilize our scientific comprehension of biological, natural, or social behavior which at some level of abstraction, can be represented as processes of optimization, as an inspiration.
The first nature-inspired algorithms to come under the spotlight were the evolutionary algorithms, such as the Genetic Algorithm (GA) [4]. However, the social and collective behavior of some animals has drawn some attention. In the face of this observation, many algorithms have been developed in order to solve complex daily problems. Among these algorithms, there are methods based on Particle Swarm Optimization (PSO), such as the case of the technique that’s based on the cooperative behavior of beehives (Artificial Bee Colony) [5], the method that’s based on the emulation of bats behavior (Bat Algorithm) [6] and the technique that’s based on the mating behavior of fireflies (Firefly Algorithm) [7].
One of the most recent meta-heuristics used in this group is the algorithm proposed by Mirjalili e Lewis, known as Whale Optimization Algorithm (WOA) [8]. This meta-heuristic is inspired by the feeding strategy of humpback whales, which utilize a “bubble net” to entrap clusters of small fish and crustaceans. In the literature, it is possible to find applications of the WOA in several problems of optimization, which aim at improving their properties [11]. For instance, Kaur and Arora [12] introduced the Chaos Theory into the WOA, aiming to improve the velocity of global convergence. In another application [13], the authors proposed two hybrid models based on WOA algorithms and simulated annealing, in which this hybridization process improved the recognition phases and exploration of WOA. In [14], the application of the whale algorithm on the issue of optimal reactive energy dispersion shows to be as well succeeded. The works [12, 13] and [14], demonstrate that the whale algorithm was successfully implemented in different applications, hence the recent meta-heuristic does have a great potential that can be explored in new applications.
This paper proposes a new mechanism to adjust the parameter of the process of food recognition of WOA, based on a system of Fuzzy logic. The proposed Fuzzy model utilizes the number of current iterations as input information, aiming to improve the convergence of the conventional WOA. The proposed mechanism aims to improve the convergence of the WOA, so as to obtain optimal values that better approach the global minimum of the test functions used in this work.
Besides this introduction, the rest of this paper is structured in three parts. We introduce the WOA fundamentals, as well as the adopted criteria of analysis and comparison in Section 2. The proposed fuzzy system is introduced to the objective of this paper in Section 3. Throughout the results in Section 4, we show the performance of the proposed Fuzzy system. Finally in Section 5 we present conclusions and further works.
WOA Algorithm
Whales are mesmerizing animals and considered to be the largest mammals on the planet. There are seven main species of whales in nature, which are: blue whales, humpback whales, killer whales, minke whales, finback whales and southern right whales. According to Mirjalili and Lewis [8], whales are predators and present an elevated level of intelligence and emotions.
The WOA is inspired by the social behavior of humpback whales, which are social animals that utilize a “bubble net” strategy while hunting fish collectively [9]. As long as whale groups are able to easily protect their calves, humpback whales developed this hunting/feeding behavior on behalf of the group [3]. In this method, whales dive under a large cluster of preys and produce bubbles that entrap the fish into the so called “bubble-net feeding”. Humpback whales utilize this foraging method in order to hunt large clusters of small fish and crustaceans, such as krills. As long as humpback whales are toothless and have a very narrow throat, they can only swallow whole small preys. This behavior is showed on Fig. 1 [3].

Humpback whale’s bubble-net feeding behavior [10].
The humpback whale’s behavior model is divided in 3 phases: encircling phase, exploitation phase and exploration phase [8]. On WOA, the circling phase presumes that the best candidate is the prey or the whale that’s closer to the optimal position, whereas the latter influences the position updating of the other agents. This behavior can be represented by the following equations [8]:
where t indicates the current iteration,
Vectors
where the coefficient
In the exploitation phase, the whales create a bubble net in order to attack the prey. This behavior is represented by a mathematical model that presumes the two following approaches: a mechanism to shrink the area around the prey (shrinking encircling mechanism) and a mechanism to update the population in a spiral fashion (spiral updating position). The first approach represents the reduction of the value of
where
In the exploitation phase, the update of the whales’ position is done by choosing one of the aforementioned approaches. This process is done with a 50% probability rate, and is mathematically represented by [8]:
where p is a value randomly generated in the interval [0,1] with an uniform distribution.
In the exploration phase, the whales are forced to distance themselves from the preys. During this phase, the values of vector
where
The updated position of each whale is evaluated by the fitness that represents the optimal value of the test functions. According to these principals, the WOA algorithm can be represented by pseudocode presented at Algorithm 1 [8].
The WOA algorithm starts with a series of random solutions. To each iteration, the survey agents update their positions regarding either a survey agent randomly chosen or the best solution obtained so far. The parameter a is decreased from 2 to 0, so as to provide exploitation and exploration respectively. A random survey agent is chosen when
The fuzzy inference system is a development made by Zadeh [15], in which this Artificial Intelligence (AI) technique converts the verbal, imprecise, vague and qualitative expressions inherent to the human communication, to numerical values. A series of work involving this methodology can be seen in [16] and [17].
This paper’s proposal consists in a fuzzy inference system that adjusts the value of the feeding recognition mechanism’s probability (Equation 7) of the WOA algorithm. On the conventional version, the value of the probability is equal to 0.5. The fuzzy inference system receives the number of current iterations as an input signal, which is normalized in order to assume values of the interval [0, 1], which is done through the ratio between the number of the current iteration and the total number of iterations. Next, this value is “fuzzed” by its respective pertinence functions. Then, it obtains its respective linguistic values with a pertinence degree, whereas these values are applied to a set of rules that establish the semantic value of the probability with its respective degree of pertinence. Finally, this value is applied to the process of “defuzzification”, in order to estimate the numeric value of the probability that will affect the choice between one of the approaches (either shrinking the area around the prey or updating the population in a spiral fashion).
The Fuzzy inference system of this work, utilizes the linguistic model of Mamdani e Assilian [18] with triangle-shaped pertinence functions, aggregation operator of maxim rules and “deffuzing” by a centroid. The linguistic terms of pertinence functions used in our work, in order to describe the semantic values of the input variable “Iteration”, are declared as: IN (Beginning); ME (Middle) e FM (End). Regarding the output variable “Probability”, the semantic values are declared as: BA (Low); MD (Medial) e AL (High). The pertinence functions were empirically adjusted, whereas the fuzzy inference system is represented in the Fig. 2.

Proposed Fuzzy inference system.
The set of rules presented in Table 1, of production type “If <precedent or condition>Then <consequent or action> ” was designed according to the following conditions:
Role set of fuzzy inference system
The whales are seeking food at the beginning of WOA’s optimization process. That means that the probability value must be low in order to facilitate the global survey. During the initial iterations, the update of the whales positions will have more influence with the approach of the population update in a spiral fashion; At the end of the optimization process, the whales are surrounding the prey to feed themselves. That means that the probability value must be high to facilitate the local survey. During the final iterations, the update of the whales position will have more influence with the approach of shrinking the area around the prey.
In this section it will present the test functions used in the process of algorithmic optimization. After, the criteria of analysis and comparison will be introduced and finally, the obtained results will be presented. For this paper, the implementation of the algorithms and achievement of their respective results was done using the software Matlab®.
Test functions
In order to evaluate the convergence of the fuzzy mechanism proposed, we used ten test functions of optimization and minimization, which are very well known in the literature and were used to evaluate the performance of the optimizing meta-heuristics [19].
The test functions used to validate the meta-heuristics of this paper are described in Table 2, where the dimension and optimal of each test function are defined by D and f min , respectively. The variable x i represents the parameters that will be optimized. At the same table, the values of the parameters n and f min are the same ones used in [8], [20] and [21].
Test functions
Test functions
In order to evaluate the performance of the meta-heuristics these test functions are used to obtain and solve challenging and complex problems of optimization, whose solution requires an expressive computing cost [22, 23]. In Table 2, four out of ten test functions are unimodal type (Sphere, Schwefel 2.22, Quartic and Rosenbrock), whereas the other four are multimodal type (Ackley, Rastrigin, Penalty 1 and Schwefel 2.21), while two of them are multimodal type with a fix dimension number (Six hump camel back and Shekel 1).
Simulation results of this paper is to compared with other meta-heuristics such as the conventional version of WOA, Particle Swarm optimization (PSO) [20] and Differential Evolution (DE) [21]. These algorithms were submitted to a series of 30 independent runs, where each simulation was composed by 30 individuals and the specific parameters of each one were the same ones used in the work of Mirjalili and Lewis [8]. We used the average (μ) and standard deviation (σ) of optimal values of each test function obtained during the 30 simulations as algorithmic analysis criteria.
The Friedman test was used as a statistical method in order to compare the results obtained by the algorithms. The Friedman test is a type of non-parametric statistical test largely used in multiple comparisons, where it is used to test if there is a significant difference between the experimental results [24]. This test was used in the work of [16] to evaluate a fuzzy variable proposed by the GWO algorithm (Grey Wolf Optimizer). The procedure of this test consists in organizing the performance of the algorithms by means of classification (ranking) and then making the analysis of variables and their values [25].
In this paper, the Friedman test was carried out following Derrac’s et al tutorial [25] which instructs the utilization of non-parametric statistic tests with a methodology aimed at comparing swarm intelligence algorithms. The Friedman test was applied in order to make a comparison between all the algorithms, whereas each algorithmic pair is compared once one. In this case, the Friedman test conducts m comparisons by algorithmic pairs.
The post-hoc control method was not used for this tests. The value of the probability p is directly determined by the curve’s area average of the normal distribution. In order to establish this area, we used the value of statistic test Z
t
which compares the ranking value of two different algorithms. This value is calculated by:
where R i and R j are ranks of the algorithm i (the worst comparing result) and the algorithm j (the best comparing result), respectively. The variable k represents the quantity of algorithms used in the Friedman test, while N represents the quantity of test functions used in the comparison.
A comparison between two algorithms is associated to a null hypothesis H i (i = 1, 2, 3, . . . , m) which can be either accepted or rejected according to the values p and α. If the nulls hypothesis H i is accepted (p > α) in a comparison, that means that the algorithm that presented the lower value of the average rank is worse than the one that presented the higher value of the average rank.
Table 3 shows the average values (μ) and the standard deviation (σ) of the respective algorithms applied in the test functions. These values were used to elaborate the Friedman test ranking table. Regarding the comparison of algorithms during the process of optimization of a test function, the algorithms are classified in the ranking table according to the average value, where those that present the lower value will have the best classification, respectively. If some of the algorithms have same average value, then the best classification will be attributed to the algorithm with lower standard deviation.
Values obtained in the optimization of the test functions
Values obtained in the optimization of the test functions
Observing Table 3, the modification proposed on WOA shows average values closely approaching the optimal values in most test functions, as well as small deviations, which ensures strength because the found solutions are always approximated. Regarding WOA’s conventional version, the WOA Fuzzy came on top during the optimization of 7 test functions (Sphere, Schwefel 2.22, Ackley, Penalty 1, Schwefel 2.21, Six hump camel back and Shekel 1). Regarding the PSO, the proposed methodology was better in 8 test functions, and was only inferior during the optimization of the functions “Penalty 1” and “Six hump camel back”. Regarding the DE, the WOA Fuzzy was competitive and presented a better result during half the test functions used in this work (Sphere, Schwefel 2.22, Quartic, Ackley and Rastrigin).
Table 4 shows the algorithmic ranks for the test functions performed. This table was designed from the results of Table 3, in which we are able to observe that the modification proposed on WOA produces the best average rank, which is slightly better than the DE, in which means better performance in most test functions. The average ranks of the algorithms were used to establish the value of Z t and consequently establish both the accepted and rejected null hypothesis of the Friedman test.
Friedman test ranks
Table 5 presents the results of the Friedman test, for a significance level of 5% and shows that the proposed fuzzy mechanism came on top in comparison to the PSO algorithm (the null hypothesis H1 was rejected) and statistically shows that it’s as good as its original version of WOA and the DE (hypothesis H4, H5 and H6 were accepted).
Result of Friedman test
This work proposed a new method of adjusting the probability value of the food recognition mechanism of the humpback whale algorithm, i.e., WOA. The method is based on fuzzy logic that uses the current iteration number as input information of the system. Unlike other approaches to the WOA algorithm, our method proposed in this article based on fuzzy logic does not need to adjust the parameters
In order to validate the new method, test functions were used, which are often used to compare the performance of meta-heuristics. Our results showed that the proposed modifications resulted in improvements in 70% of the tests, in which the average values were smallest and closer to the optimum values. Regarding the Friedman test, the WOA fuzzy has been proven better than the PSO meta-heuristic, the traditional WOA, and slightly better than DE meta-heuristic. Still, results show that the WOA meta-heuristic is better because its standard deviations are smaller and present the repeatability of the results.
In future works, other authors can utilize this method proposed with the WOA in order to solve multi-objective optimization problems. This fuzzy mechanism still can be explored and implemented to other WOA variants in order to improve their convergence rate. Thus, the proposed method that influences the probability parameter could be a complement to other techniques that manipulate
