{'fraction_non_alphanumeric': 0.02582216808769793, 'fraction_numerical': 0.008891595615103533, 'mean_word_length': 5.026055045871559, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An enhanced artificial bee colony algorithm for numerical function optimization

In response to the problems of slow convergence, low convergence accuracy and easy to fall in local optimum of the standard artificial bee colony (ABC) algorithm, this paper proposed the following two improvement measures: Firstly, on the basis of using the current optimal solution, the gradient modification strategy was used to reduce the leading role of the current optimal solution, so that the nectar resources could be fully searched to ensure the diversity of the population; Secondly, the crossover and mutation operation in genetic algorithm was used to replace the random search of scout bees, and the prior information was effectively utilized, which not only improved the search efficiency but also ensured the diversity of population to a certain extent. The numerical experiment results show that the proposed algorithm has good convergence accuracy and robustness, and also presents an excellent performance in multi-dimensional optimization.


Introduction
Artificial bee colony (ABC) algorithm is a global and random optimization algorithm based on bees foraging, which is proposed by Karaboga in 2005 [1]. The algorithm has a few parameters, simple operation and strong robustness. Since the algorithm has been put forward, it has attracted great attention from many scholars around the world and they have conducted in-depth research on the theoretical research and application of algorithms. So far, the algorithm has been successfully applied to artificial neural network training, combinatorial optimization, power system optimization, data mining and image recognition and so on [2][3][4][5][6].
As a novel swarm intelligence algorithm, ABC has obviously been widely recognized and affirmed by domestic and foreign academic circles for its excellent performance for solving high-dimensional problems. However, as other optimization algorithms, traditional ABC algorithm also has the disadvantages of premature convergence and slow convergence and tending to fall into the local optimal solution [7][8][9]. In response to these, researchers have put forward a large number of effective methods for achieving a better balance of the ABC algorithm's exploration and exploitation [10][11][12][13][14][15][16][17][18]. GABC algorithm [19] is an example of many successful improved ABC algorithms, which is mainly inspired by the current optimal solution guidance mechanism in particle swarm optimization (PSO) algorithm. It introduces the current optimal solution in the local search formula, which obviously improves the global search ability of the algorithm. The convergence of this algorithm has also been proved by literature [19]. However, research [20] points out that the improved measure may reduce the algorithm's local optimization ability to some extent. This is due to it will quickly guide the employees to the vicinity of the current optimal solution, while other nectar sources of mining value have not been fully searched. In order to optimize the performance of the algorithm further, this paper improves it from two aspects. On one hand, the gradient information of the global optimal solution is introduced into the search formula for properly weakening the global optimal solution's guiding effect, which results in a fully search in the neighbourhood under a lower convergence speed. On the other hand, inspired by the genetic algorithm, the mechanism of crossover and mutation is introduced in the scouters' global search, in which crossover can make full use of prior information and mutation can ensure the diversity of individuals, which make the random searchers obtain extra nectar information thus improve their search efficiency. Prior to this, some mixed algorithms about ABC and GA have been proposed in references [20], [21] and [22]. In these references, their genetic operators are all implemented to manipulate all the populations in each generation so as to prefer superior species to the next generation. These may lead to unsatisfactory optimization results due to incomplete local search and premature optimization. This paper tried to use genetic operator to generate new nectar resource in the case of that any nectar resource has not been updated exceeding the limit, which can effectively avoid the premature convergence, and make full use of the prior information and ensure the diversity of the population. These measures can better achieve the balance between the exploration and exploitation ability of the ABC algorithm in theory and a series of classical test functions are used to attest the improved algorithm's rationality and superiority in this paper at last.

Overview of artificial bee colony algorithm
The standard ABC algorithm which simulates behaviors of gathering nectar by bees, searches out the nectar resource which contains the maximum nectar through sharing information among the different divisions of bees. The bees are divided into three categories based on division of labor: employees, onlookers and scouters. The employees share the information of nectar resource to onlookers by their "8" type of dance in dance-floor, onlookers wait in hive and search around the self-considered ideal nectar resource since employees sharing the information and scouters randomly search for a new valuable nectar resource near the hive. The process of ABC algorithm for solving problem actually is the process of searching in potential solution space. The position of each nectar resource represents a feasible solution to the problem and the amount of nectar indicates the corresponding solution's fitness. In each generation, the number of employees is equal to the number of nectar resources, and there is a one-to-one relationship between the employees and nectar resources.
In order to ensure the diversity, employees are required to carry on a local search for better nectar resources around the corresponding resources in each generation based on the following formula, Where ij x is the value of generated nectar resource in jth dimension, ij x is the value of ith nectar resource in jth dimension, kj x is the value of kth nectar resource in jth dimension, in which k is a random number that is less than population quantity and not equal to i. Comparing the generated nectar resource with the original one, the one with higher fitness is retained. The fitness is calculated as follow.
According to the information of nectar resources transmitted by employees, each onlooker will choose a nectar resource based on roulette strategy. The formula of possibility of being selected is as follow.  roulette strategy. Meanwhile, employees update the nectar resources by fitness on basis of the greedy strategy. If any nectar resource has not been updated within a given limit of generation, the corresponding employee gives up the nectar resource, and searches for a new one according to the following formula, Where id x is the value of ith nectar resource in dth dimension. min id x and max id x are the lower and upper bounds of ith nectar resource in dth dimension, respectively.

Enhanced artificial bee colony algorithm
The exploitation and exploration are two important performances of swarm intelligent algorithms [23]. The former is reflected in algorithms' local search capability and the latter is reflected in the global search capability. The ABC algorithm's local search is performed by employees and onlookers and global search is mainly reflected in the search process of scouters. In order to achieve a better balance of exploitation and exploration, the standard ABC algorithm is improved from the below two aspects.

Global optimal solution guidance and gradient adjustment strategies
Local search is based on Eq. (1) in standard artificial bee colony algorithm. It will be found by analyzing the Eq.(1) that the standard ABC algorithm's local search is to select one dimension from one nectar resource as its local optimization variable, take the selected dimension of this nectar resource as the center and regard projection distance between the nectar resource and another one in this dimension as the search scope. In Eq. (1), the coefficient is a totally random number in [-1,1], xk,j is a random individual in the population and the possibility of selecting a good solution is nearly equal to that of selecting a bad solution. Therefore, the new candidate solution is not promising to be a solution better than the previous one and it also confirms the statement that the artificial bee colony algorithm is tired of local search. To solve this problem, the literature [19] presents GABC to introduce the global optima into the search formula for improving the exploitation which refers to particle swarm optimization and the specific is shown in Eq. (5).
is the d-dimension value of the current optimal solution,  is a random number which subjects to a uniformly distributed in the range [0, C], and the study found that the performance of the algorithm is the best when C is equal to 1.5. However, the research [20] has shown that the GABC algorithm inherits the feature of fast convergence speed of PSO, but leads to incomplete local search of other valuable individuals because of the effects of quick guide to the local optima. Aimed at the problem, this paper proposes a gradient adjustment strategy which reduces the speed of the bees falling into the local optimum through the reverse effect of the current optima's gradient, which can make full search of the other individuals and ensure a good species diversity.
It is assumed that the N-ary function has first-order continuous partial derivative in the space region G, where 12 ( , , ) N g x x x G  , the gradient of point g can be expressed as follow. 12 12 Similarly, if the current spatial solution of the optimal solution is marked as x global = (x1,x2,...,xD), the gradient of the current optimal solution is expressed below Global grad .

( , , )
Global  After introducing the current optimal solution and gradient adjustment strategy into the local search of the ABC algorithm, the local search of the algorithm is transformed from formula (1) to formula (9).
Where k is the direction control parameter, if , is the scalar of gradient unit vector in d dimension, and it is the control parameter of step size change. The gradient unit vector is expressed as follow. 2 2 2

Crossover and mutation strategy
In ABC algorithm, the nectar source can be considered to be exhausted if the number of nectar source that has not been updated reaches the limit. At this time, the employee corresponding to the nectar source will change its role as a scout bee, abandon the mined nectar source, and then randomly search in the search space to generate a new one. The mechanism makes the algorithm possible jump out of the trap when it falls into the local optimal state, which is also a highlight in the design of ABC algorithm. In the standard ABC algorithm, global random search is conducted according to formula (4), but it is undoubtedly inefficient to search for nectar sources in the complex solution space, especially in the later stage of optimization.
As is known to all, the GA has the characteristics of self-organization, self-adaptation and selflearning [24], and it realizes the continuous evolution of population through selection, crossover and mutation. Selection is to reserve some preferred individuals directly to the next generation, or to provide an operational basis for crossover operators and mutation operators, so as to protect the good genes. Crossover generates two new individuals through the recombination of the selected parent generation, which is used for the crossover combination to generate new individuals to search the solution space effectively and reduce the probability of destroying the effective mode. Mutation randomly selects an individual from the population to exchange its gene position to increase the diversity of the population. It has good global search ability, and can quickly search out the approximate optimal solution in the solution space [24 , 25].
Considering the inefficiency of scout's random search in the standard ABC algorithm and the good global search capability of GA, the idea of crossover and mutation is introduced, instead of the original random searching. On one hand, crossover can make full use of the prior information of the population and improve the search efficiency of scout bee. On the other hand, mutation retains the original character of random search which can still guarantee the diversity of population with a certain probability. So the formula is changed from equation (4) to equation (11).
In the formula, λ is a uniformly distributed random number within the range of [0, 1], k and l are two nectar sources randomly selected by roulette based on sorting probability; pc is the probability of cross, pm is the probability of mutation, pm=1-pc.   5 2) The bees randomly select N nectar resources in solution space. Calculate fitness values with Eq.(3) and record the initial sign the res_times(1)=0.

Enhanced artificial bee colony algorithm flow 1) Total number of bees is initialized
3) Each employer randomly search around its located nectar resource according to the Eq.(9). Calculate each fitness value, if it is better than the original source, update the position of the employed bees and res_times(i)=0. Otherwise, res_times(i+1)= res_times(i)+1. 4) Calculate selection probability according to the Eq.(2), each onlooker selects a nectar reource to follow according to the Eq.(3), update the nectar resource and res_times(i). 5) Determine whether res_times(i) is greater than limit. If it is, continues. Otherwise, switch to 7.
6) The ith employee gives up its nectar resource and searches for a new one according to Eq.(11). 7) Record the current optimal solution and iterations iter=iter+1.Determine whether iterations is greater than Max_Cycle. If it is, termination. Otherwise, skip to 4.

Benchmark functions
In order to test the performance of EABC algorithm on numerical function optimization, a series of benchmark functions shown in table 1 are used here.

Parameter setting
The experiment in this paper includes two parts: one is to evaluate the improvement effect of EABC algorithm by comparing with the results of ABC and GABC algorithm in the reference [19]；the other one is to evaluate the optimization performance of EABC algorithm by comparing with the results of the representative optimization algorithms, such as GA, PSO and PS-EA in the reference [26]. In order to ensure the objectivity, the parameters in this paper are set as consistent with the relevant literatures.The population size is 80 and the maximum generations is 5000 in the first part， the population size is 125 in the other one. Each experiment was repeated 30 times independently.

Experimental results
The comparison with the results in the reference [19] is shown in table 2. As can be seen that EABC is obviously superior to the traditional ABC algorithm in the optimization results of different dimensions of each test function, which proved that the optimization performance of EABC has been greatly improved compared with the traditional ABC algorithm. Compared with GABC test results, EABC is also significantly better than other algorithms in terms of mean and standard deviation, except for that in the optimization of 30-dimensional test Griewank function. Therefore, compared with ABC and GABC, the optimization performance of EABC algorithm has been greatly improved, indicating the effectiveness of the improvement measures in this paper. For the sake of intuition, figures 1 and 2 respectively show the convergence of the optimal solutions of ABC, GABC and EABC algorithm in The values obtained by GA, PSO, PS-EA and EABC after 500, 750 and 1,000 cycles for dimensions 10, 20 and 30

Conclusion
An enhanced artificial bee colony algorithm is proposed in this paper, which is optimized by using the gradient correction strategy and the crossover and mutation of genetic algorithm. The experimental results show that the improved algorithm has high convergence accuracy, strong robustness, and remarkable effect. And compared with the current advanced algorithms, the EABC algorithm has some superiority, and has certain advantages for the high dimensional optimization problems.