A Percentile Methodology Applied to Binarization of Swarm Intelligence Metaheuristics

A ABSTRACT The binarization mechanisms of continuous metaheuristics are of interest in operational research. This is mainly due to the fact that there are a lot of combinatorial problems that are NP-hard. In this article, we exploit the concept of percentile as a mechanism of binarization of swarm intelligence continuous metaheuristics. To evaluate the behavior of our binary operator, the Multi-verse metaheuristic is used and applied to solve the combinatorial problem of the knapsack. The binary algorithm obtained, the binary multi-verse Optimizer (BMVO) shows good performance in solving the most difficult problems of the knapsack.


INTRODUCTION
In the industry, optimization problems are relevant, particularly at the level of decision making. Behind a decision-making process, there is always an optimization problem. Many of these problems have their domain in binary spaces. For example, we can find binary space problems in Civil Engineering, Bio-Informatics (Barman and Kwon, 2017), Operational Research Garcia and Măntoiu, 2014;García et al., 2019a), resource allocation , September, 2019bValenzuela et al., 2019, June) scheduling problems , February, 2018a, routing problems among others.
Another line of research that has had an important impact is the design of algorithms inspired by natural phenomena to solve optimization problems. Many natural phenomena are developed in continuous spaces, so it is common to find a large number of these algorithms that work properly continuously, As examples of these algorithms we have Cuckoo Search, Black Hole, Bat Algorithm, and Multi-verse Optimization Algorithm (Mirjalili et al., 2016) among others. It is a challenge to transform a continuous algorithm into its binary version without altering the exploration and exploitation processes characteristic of each metaheuristic and that subsequently it adequately performs in combinatorial problems.
When a state of the art is realized, there are several techniques that give a solution to the complexity of passing an algorithm designed for continuous spaces in an algorithm that solves binary problems. We have general and specific techniques. However, these techniques work well for some problems and not for others. In general, the main techniques are transfer functions, angle modulation and the design of quantum operators. If you want to deepen this line, we recommend reading . The objective of this article is to use the binarization technique that uses the percentile method and performs a binarization process. The multiverse optimizer (MVO) technique was chosen because it has been used in several continuous problems but in few combinatorial problems. MVO has been applied to voltage stability and voltage deviation problems in Trivedi et al. (2016, March). In Kumar and Suhag (2017), they applied MVO to control multi source hydrothermal power system.
Three concepts use the MVO algorithm, the white hole, the black hole who performs the exploration in the search space and wormholes that are in charge of performing the exploitation. The analogy says that each solution corresponds to a universe and associates a parameter called inflation rate which is proportional to the value of its fitness function. The black and white holes allow to exchange of objects of the universes and the probability that an exchange is made is handled by the inflation rate indicator. The solutions are ordered at the end of their inflation rate after each solution generates a white hole and the solution that is sent through the white hole is selected randomly. The replacement of the different objects is regulated by Equation 1. According to this equation, the lower the inflation rate, the greater the probability that the objects of that solution are replaced. However, there is only an exchange between universes, but there is no concept of mutation or disturbance of a universe.
where indicates the th parameter of the ith solution, corresponds to th solution, ( ) is normalized inflation rate of the th solution, 1 is a random number in [0,1], and indicates the th parameter of th solution selected by roulette wheel selection.
To mutate the objects, the concept of wormhole is used. The whormhole is established between each of the solutions and the best solution. The exchange of objects is produced from the best solution and a perturbation of the original object is made. The mechanism that regulates this perturbation is shown in Equation 2.
In this expression WPE and TDR correspond to coefficients defined in Equations 3 and 4 respectively. lbj corresponds to the lower bound and ubj to the upper bound of the jth variable. xi j represents to the variable of the jth dimension of the i solution. The numbers r2, r3 and r4 correspond to a random numbers between [0,1].
To check the binary multi-verse optimizer algorithm (BMVO) using percentile technique, we use the wellknown knapsack problem. Experiments were developed using a random operator to validate the contribution of the percentile technique in the binarization pro-cess of the multi-verse optimizer algorithm. In addition, local search operator is used to strengthen the results. Moreover, the binary artificial algae (BAAA) and K-means transition ranking (KMTR) algorithms were used to compare our results. (BAAA) was developed in Zhang et al. (2016) and uses transfer functions to perform the binarization process. KMTR was developed in García et al. (2018b) and uses a K-means algorithm to perform the binarization. The results show that the percentile technique obtains results superior to those obtained by the random operator and that our BMVO algorithm shows competitive results against the BAAA and KMTR algorithms.

KnapSack PROBLEM
One of the NP-hard problems that has been studied most, corresponds to the Knapsack problem considering the large number of variants that it has. In this article, we will use the multidimensional knapsack problem to test our percentile binarization. The problem of the multidimensional knapsack (MKP) focuses on resource allocation problems. The objective is to find a subset of objects that produce greater benefit satisfying the different restrictions of the problem. Despite a large number of studies, this problem remains a challenge due to the difficulties in solving medium and large-sized instances. Performing a small state of the art of MKP, we find that this has been addressed in Haddar et al. (2016) using a quantum binarization technique, in García et al. (2018b) they applied the technique of grouping k-means to perform binarization, an improved optimization of The fruit fly in Meng and Pan (2017), in Liu et al. (2016) a differential algorithm with transfer functions was used, and in Bansal and Deep (2012) a modification of the PSO equations was used. MKP can be configured as: with ∈ {1, … , }. corresponds to the profit of element . represents a cost associated with dimension and element . The constraints in each dimension are represented by . The solution can be modelled using a binary representation, in this representation a 0 means the element is not included in the knapsack.

BINARY MULTI-VERSE OPTIMIZER ALGORITHM
Due to the high computational complexity of MKP, the binary multi-verse optimization algorithm (BMVO) is composed of 4 operators to successfully solve the MKP. The operators corresponding to an initialization operator, a local search operator, the binary operator that uses the percentile technique and a repair operator in the case of solutions that do not meet any of the restrictions. The general flow chart of the algorithm is shown in Figure 1. The first stage corresponds to the initiation of solutions which will be detailed in section III-A. Subsequently, it is verified if the algorithm meets the detention conditions which is associated with a maximum number of iterations. In case of not complying with them, the MVO algorithm is executed in its original form and the solutions obtained by MVO are binarized by the percentile operator, this part of the algorithm is detailed in III-B. After having performed the binarization, we must verify the consistency of the solutions with their constraints and the results obtained are compared against the best solution generated so far. If the new solution is superior, it is replaced and a local search operator is executed.

Initialization and Element Weighting
As BMVO is a swarm algorithm, to begin the exploration and exploitation of the search space, the list of solutions must be initialized. For the generation of each solution, an element is randomly chosen first. The next step is to check if other elements can be incorporated, for this we must evaluate the constraints of our problem. To select the new element, we generate a list of possible elements that comply with the constraints. For each element is calculated its weight and the element which has the best weight is selected. This procedure is repeated until no additional element can be incorporated. In Figure 2, the initialization algorithm is displayed.
To calculate the weight of each element, several methods have been developed. In Pirkul (1987) a pseudo-utility in the surrogate duality approach was proposed. The way to calculate it is shown in the equation 7. In this equation the variable corresponds to the surrogate multiplier whose value is between 0 and 1. This multiplier can be interpreted as a shadow prices of the th constraint.
A more intuitive measure focused on the avergage resource occupancy was proposed by García et al. (2017, September). It is shown in equation 8.
In this article we used a variation of this last measure focused on the average occupation and proposed in García et al. (2018b). this variation considers the elements that exist in knapsacks to calculate the average occupancy. In each iteration depending on the selected items in the solution the measure is calculated again. The expression of this new measure is shown in equation 9.

Percentile Binary Operator
Due to the iterative nature of swarm intelligence algorithms and considering that MVO works in continuous space. The velocity and position of the solutions are updated in ℝ . a general way of writing the update is shown in the equation 10. In this equation =1 represents the position of the particle at time + 1. To obtain the position, we consider the function ∆, which is specific to each algorithm. For example in black hole ∆( ) = ⨁ ( )( ), and in PSO, Firefly, and Bat algorithm ∆ can be written in simplified form as ∆( ) = ( ). =1 = ∆ +1 ( ( )) (10) For the case of MVO, it is considered a binary percentile operator to perform the passage of the continuous space to the binary space. Given the particle , let us consider the magnitude of the displacement ( ) in the th component and we group these magnitudes for all solutions in order to obtain the values for the percentiles 20, 40, 60, 80, 100. At each percentile, we will assign a transition probability where the values are shown in the Equation 11. Using these transition probabilities together with the Equation 12, binarization of the solutions is performed. The algorithm is detailed in Algorithm 1.

Repair Operator
Local search and binary percentile operators can generate infeasible solutions. There are different mechanisms to address these infeasible solutions. In this article, the repair of the solutions was considered. To perform the repair, the measure described in the equation 9 was used. If the solution requires repair, the element with the maximum measure is chosen and it is removed from the solution, this process is iterated until a valid solution is obtained. The solution is then improved by exploring the possibility of incorporating new elements. This stage of improvement is iterated until there are no elements that can be incorporated without violating the constraints. The pseudocode is shown in Algorithm 2. Algorithm 2. Repair Algorithm

Insight of BMVO Algorithm
This section aims to find out the contribution of the per-centile binary operator to the performance of the algorithm. To carry out the comparison problems cb.5.250 from the OR-library were selected. Violin charts and the Wilcoxon non-parametric signed-rank test were used to perform the statistical analyzes. In the charts, the X axis identifies the studied instances and the Y axis the % -Gap described in the equation 13. The Wilcoxon test is run to determine if the results obtained by BMVO have significant difference with respect to other algorithms. The parameter settings and browser ranges are shown in Table 1 1) Evaluation of percentile binary operator: A random operator was designed to evaluate the contribution of the percentile binary operator. This random operator has the pe-culiarity of performing the transitions with a fixed probability of 0.5 without considering in which percentile the variable is located. Two configurations were studied: The first one where the local search operator is included and the second where the local operator is not considered. BMVO corresponds to our standard algorithm. random.ls is the random variant that includes the local search operator. BMVO.wls corresponds to the version with percentile binary operator without local search operator. Finally, random.wls describes the random algorithm without local search operator.
When we compared the Best Values between BMVO and random.ls which are shown in Table 2. BMVO outperforms to random.ls. However, the Best Values between both algorithms are very close. In the Average comparison, BMVO outper-forms random.ls almost in all problems. The comparison of distributions is shown in Figure 3. We see the dispersion of the random.ls distributions are bigger than the dispersions of BMVO. In particular, this can be appreciated in the problems 1, 2, 4, 5, 6, and 9. Therefore, the percentile binary operator together with local search operators, contribute to the precision of the results. Finally, the BMVO distributions are closer to zero than random.ls distributions, indicating that BMVO has consistently better results than random.ls. When we evaluate the behaviour of the algorithms through the Wilcoxon test, this indicates that there is a significant difference between the two algorithms.

Figure 3. Evaluation of percentile binary operator with Local Search operator
Our next step is trying to separate the contribution of local search operator from the percentile binary operator. For this, we compared the algorithms wls and random.wls.
When we check the Best Values shown in the Table 2, we note that wpe performs better than 05.wpe in all problems except 1, 6 and 7. However the results are quite close. In the case of the average indicator, wpe outperforms in all problems to 05.wpe. The Wilcoxon test indicates that the difference is significant. This suggests that wpe is consistently better than 05.wpe. In the violin chart shown in the Figure 4 it is further observed that the dispersion of the solutions for the case of 05.wpe is much larger than in the case of wpe. This indicates that the percentile binary operator plays an important role in the precision of the results.

BMVO Comparisons
In this section we evaluate the performance of our BMVO with the algorithm BAAA developed in Zhang et al. (2016). BAAA uses transfer functions as a general mechanism of binarization. In particular BAAA used the function to perform the transference. The parameter τ of the tanh function was set to a value 1.5. Additionally, a elite local search procedure was used by BAAA to improve solutions. As maximum number of iterations BAAA used 35000. The computer configuration used to run the BAAA algorithm was: PC Intel Core(TM) 2 dual CPU Q9300@2.5GHz, 4GB RAM and 64-bit Windows 7 operating system. In our BMVO algorithm, the configurations are the same used in the previous experiments. These are described in the Table 1. Additionally we made the comparison with KMTR-BH and KMTR-Cuckoo binarizations. KMTR uses the unsupervised K-means learning technique to perform the binarization process. In the article García et al. (2018b), the Black Hole and Cuckoo Search algorithms were binarized using KMTR.
The results are shown in Table 3. The comparison was per-formed for the set cb.5.500 of the OR-library. The results for BMVO were obtained from 30 executions for each problem. In black, the best results are marked for both indicators the Best Value and the Average. For the best value indicator BAAA was higher in 4, KMTR-BH in 11, KMTR-Cuckoo in 7 and BMVO in 11. We should note that the sum is greater than 30 because in some cases there was a tie between some of the algorithms. In the Average indicator BAAA was higher in 2 instances, KMTR-BH in 9, KMTR-Cuckoo in 4 and BMVO in 15. We should also note that the standard deviation in most problems was quite low, indicating that BMVO has good accuracy.  of parameters. From the theoretical point of view, it would also be interesting to understand how the exploration and exploitation of space are altered when we present the percentile operator. Also, we believe that the incorporation of reinforcement learning techniques for decision making in the binarization mechanism can be an interesting line to explore and that integrates two areas that are developing strongly. Finally, it is interesting to use the percentile operator to binarize other swarm intelligence algorithms in addition to solving other NP-hard problems.