A Novel Candidate Solution Generation Strategy for Fruit Fly Optimizer

Fruit fly optimization algorithm (FOA) is one of the swarm intelligence algorithms proposed for solving continuous optimization problems. In the basic FOA, the best solution is always taken into consideration by the other artificial fruit flies when solving the problem. This behavior of FOA causes getting trap into local minima because the whole population become very similar to each other and the best solution in the population during the search. Moreover, the basic FOA searches the positive side of solution space of the optimization problem. In order to overcome these issues, this study presents two novel versions of FOA, pFOA_v1 and pFOA_v2 for short, that take into account not only the best solutions but also the worst solutions during the search. Therefore, the proposed approaches aim to improve the FOA’s performance in solving continuous optimizations by removing these disadvantages. In order to investigate the performance of the novel proposed FOA versions, 21 well-known numeric benchmark functions are considered in the experiments. The obtained experimental results of pFOA versions have been compared with the basic FOA, SFOA which is an improved version of basic FOA, SPSO2011 which is one of the latest versions of particle swarm optimization, firefly algorithm called FA, tree seed algorithm TSA for short, cuckoo search algorithm briefly CS, and a new optimization algorithm JAYA. The experimental results and comparisons show that the proposed versions of FOA are better than the basic FOA and SFOA, and produce comparable and competitive results for the continuous optimization problems.


I. INTRODUCTION
In recent years, the behaviors of the biological creatures found in the nature are inspiration of the researchers for development novel optimization algorithms and many novel optimization algorithms have been developed by considering these behaviors. These algorithms are called metaheuristic algorithms. Metaheuristic algorithms are mostly based on swarm intelligence or evolutionary computation and they are used to solve optimization problems with an alternative of classical optimization techniques. Due the structure of the optimization problems, the optimization can be a time consuming and complicated process, and classical techniques are generally problem-dependent. Metaheuristic algorithms can solve optimization problems with different characteristics and they need a little modification because they are The associate editor coordinating the review of this manuscript and approving it for publication was Sotirios Goudos. general-purpose optimizers. Moreover, despite the fact that they cannot guarantee the optimal solution, they guarantee optimal or suboptimal solutions in a reasonable time and efforts. Some of the swarm intelligence algorithms are particle swarm optimization (PSO) [1], firefly algorithm (FA) [2], cuckoo algorithm (CS) [3], ant colony algorithm (ACO) [4], artificial bee colony algorithm (ABC) [5], fruit fly optimization algorithm (FOA) [6], tree seed algorithm (TSA) [7].
The FOA is one of the recently proposed swarm intelligence algorithm and it models the behavior of food search behaviors of fruit flies, which was developed by Pan in 2012 [6]. The important features of FOA are that it has a simple algorithmic structure, few parameters for adjusting, ease of understand and application and fast convergence characteristics. Based on these advantages, it has been applied to solve many optimization problems. For example, financial distress [6], [8]- [10], power load forecasting [11]- [13], scheduling problem [14]- [19], key control VOLUME 7, 2019 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see http://creativecommons.org/licenses/by/4.0/ characteristic optimization [20], PID controller [21]- [25], semiconductor final testing scheduling [26], electricity consumption forecasting [27], web auction logistics service [28], surface vehicles application [29], optimization of LSSVM parameters [30], [31], GRNN optimization [32]- [35], in order to eliminate noise components from machinery sound [36], [37], optimal placement of phasor measurement units [38], knapsack problem [39], [40], joint replenishment problems [41], clustering parameter problems [42], range image registration [43], analysis of large antenna array [44], [45], acoustic-based cutting pattern recognition [46], wind speed forecasting [47]. In order to improve performance of FOA, researchers proposed its variants by modifying structure of the algorithm. Pan [48] proposed the MFOA, which uses a three-dimensional search field. Shan et al. [49] presented the LGMS-FOA, which uses the linear production mechanism. Pan et al. [50] proposed an improved version of IFFO with adaptive control parameter. Yuan et al. [51] used multiple swarm behaviors in FOA. Zhang et al. [52] presented MSFOA, which avoided local optima using the gauss mutation operator. Cong et al. [53] used the least square support vector machine LSSVM and FOA together to solve the traffic flow estimation problem. Lin [28] presented an approach that uses the FOA together with the general regression neural network. Wang et al. [39] suggested a binary FOA to solve the knapsack problem. Zheng and Wang [54] proposed a two-stage adaptive fruit fly optimization algorithm (TAFOA) to solve unrelated parallel machine scheduling problem. Lv et al. [55] improved their swarm diversity and search capability with their hybrid location mechanism. Xiao et al. [56] presents an improved FOA based on the cell communication mechanism (CFOA). Wang et al. proposed JS-FOA, developed through common search strategies driven by biological memory [57]. Despite these advantages, applications and modification of the basic FOA, it has some important disadvantages such as positive search, stagnation and premature convergence. Due to mathematical model of the algorithm, the search is done on the positive side of solution space. Because whole population follows the best solution in the population, the artificial agents become very similar to each other during the optimization. This is useful for convergence to the acceptable solutions, however these cause a stagnation in the population and sometimes premature convergence, especially multimodal optimization problems. When the algorithms is analyzed individually, it is seen that the FOA algorithm is successful in solving the unimodal optimization problems due to fact that its solution generation mechanism is based on the following the best solution in the population. So FOA is good at unimodal optimization with speed convergence characteristics. The JAYA algorithm uses best and worst solution in the population while a candidate solution is generated. This JAYA's mechanism is useful in discovering potential optimal point in the solution space. Therefore, it is good at solving multimodal optimization problems but its convergence characteristics in the unimodal problem questionable.
By combining the FOA with JAYA, we try to obtain better algorithm in solving both unimodal and multimodal optimization problems with acceptable convergence speed. This is the innovation and approach background of the manuscript. The peculiar property of JAYA is the usage of the worst solution in the solution generation mechanism. While more algorithms use the best solution in order to improve local search capability and convergence characteristics, the JAYA use best and worst solution in the solution generation mechanism in order to improve local and global search capabilities. In order to improve global search capability of the FOA, we integrated the solution generation of JAYA with the FOA. In this study, we propose a best-worst-based solution update strategy in the JAYA by modifying its algorithmic structure in order to improve the performance of the algorithm on continuous optimization.
The paper is organized as follows: the study is introduced in Section 1 and a brief literature review is also given in this section. In Section 2 and 3, we give the explanations on basic FOA and JAYA Algoritm and the proposed methodology is presented in Section 4. The experiments are designed in Section 5 and obtained results are discussed in Section 6. The study is concluded in Section 7 and at the same time a future directions is presented in this section.

II. BASIC FRUIT FLY OPTIMIZATION ALGORITHM
The basic version of FOA has been proposed for solving nonlinear global optimization by inspiring the food search behavior of real fruit flies. Fruit flies live in tropical regions, and their smell and vision organs is more capable than the other fly species. Furthermore, it can get the smell of the food that is 40 km away. Firstly, it perceives the smell of food and flies to that area. Then it finds food with a sensitive vision [6]. The FOA algorithm has few parameters with respect to other swarm intelligence algorithms and the algorithmic structure is simple, ease to understand and program. The basic algorithm attracts more attentions because of these features and it is used to solve many optimization problems. The search behavior of fruit flies in the algorithm is given in Fig.1. FOA is composed of two phases as smell and vision. In the smell phase, it takes the smell of the food and flies to this direction. In the vision phase, it reaches food by using sharp vision. The steps of the algorithm are as follows.
Step 1: Determine the initial position of the fruit fly swarm randomly.

Init X axis ; Init Y axis
(1) Step 2: Smell phase. Randomly update of fruit fly locations.
Step 3: Calculate the smell concentration decision value S i of each fruit fly. Use the distance of the fruit fly from the origin Dist i to calculate S i .
Step 4: Substitute smell concentration judgment value (S i ) into the fitness function to calculate the smell (Smell i ).
Step 5: Find the fruit fly with the best smell value.
Step 6: Vision Phase. Record best smell value and x, y coordinate. If this smell value is better than the previous smell value, fruit flies will use this location for vision.
Step 7: If a termination condition is met, report the best solution, otherwise go to Step 2.

III. JAYA ALGORITHM
The Jaya algorithm was proposed by Rao in 2016 [58], [59]. The algorithm always tries to reach the best solution and move away from the worst solution. To achieve this goal, the algorithm uses the following equation 7 to obtain the new solution.
where, k is candidate solution index that is processed on, Best and Worst are the best and worst solution obtained so far, respectively. j is the dimension index, r 1 and r 2 stand for random values produced in range of [0, 1]. The term ''r 1,j * (Best-X k,j )'' indicates the tendency of the solution to move closer to the best solution.
The term ''−r 2,j * (Worst-X k,j )'' indicates the tendency of the solution to avoid the worst solution.
After candidate solution is generated, the fitness values of the candidate and current solutions are calculated. A greedy approach is applied between current and candidate solutions. If the fitness of candidate solution is better than the fitness of the current solution, the candidate solution is replaced with the current solution in the population. The Jaya algorithm is an iterative optimization algorithm and the process given above is repeated until a termination condition is met.

IV. THE PROPOSED APPROACH
When we analyze the basic FOA, we see that all the artificial agents in the algorithm follow the best solution. Therefore, the algorithm shows a fast convergence characteristics but this can cause a stagnation in the population. When the best  solution in the population is a local minimum point on the search space, the fast convergence is premature convergence and the optimum solution cannot be obtained during the search with FOA. Another problem in the basic algorithm is the search only on the positive side of the solution space because the distance is always results with a positive value.
The algorithm has been modified to solve these problems and improve the performance of the proposed algorithm. While the smell phase is the same as in the basic FOA in this study, the visual phase has been modified by considering a new update rule. In the visual phase, the update strategy of the basic FOA and the JAYA algorithm has been used together. At the same time, two different formula (version1 and ver-sion2) has been used to obtain new candidate solutions. The proposed approach is called pFOA_v1 and pFOA_v2.
In pFOA_v1, new solutions are obtained by Eq. 7 which is proposed and used in Jaya algorithm.
In pFOA_v2, we used a bit modified version of Eq.7. The new candidate solutions are obtained using the following equation (Eq. 8).
Being considered new formulae, we restrict the solution space between the best and worst solution in the population, and the intensification capability of the pFOA_v2 has been strengthened.
The changes in the visual phase of the algorithm are as follows; Smell concentration judgment values (S i ) are updated as follows:

For pFOA_v1;
For pFOA_v2; The objective function value (f new i ) specific for the optimization problem is obtained by considering the new smell concentration judgment value (Snew i ) as follows: A greedy selection is applied to the new and current candidate solutions. If the new smell value is better than the current smell value, the new smell and smell concentration judgment values (S i ) of each fruit fly are memorized. This procedure is given as follows: In every twenty percent of the maximum iteration, the fruit fly with the best smell value is fixed by using Eq. 13. The best smell concentration judgment value is assumed to be the initial value, and the fruit flies are reproduced using VOLUME 7, 2019 For pFOA_v2; S i,j = S axis,j + rand 1 * Best j − rand 2 * Worst j (15) This modification makes two major contributions to the basic FOA. The first is to evaluate the best and worst solutions and to achieve the real solution. This improves the global search ability of the basic algorithm and the solution space is effectively searched with FOA. Second, the fitness function can take a negative value. Thus, the developed algorithm can solve problems involving negative solutions. This allows the  improved pFOAs to be used to solve different problems than the basic algorithm. After these explanations, the pseudo-code of the proposed pFOA versions are given in Fig. 2.
As seen from Fig. 2, the modification is given in vision phase and the rest of the algorithm is the same with the basic FOA. Therefore, it can be easily applied to solve optimization problems as the basic version.    The flow chart of the proposed pFOA versions are given in Fig. 3.

V. EXPERIMENTS
The performance of the proposed pFOA_v1 and pFOA_v2 are investigated on well-known 21 numeric benchmark function taken from [60,61]. The benchmark functions are given in Table 1.
In this table, D denotes the dimensionality of the functions. The lower dimensional functions can be solved easily, because when we increase the dimensions of the functions, the solution space grows exponentially. Therefore, solving higher dimensional functions is harder than the solving lower dimensional functions. SR stands for search range and this means that the decision variables can take the values in this range. If a decision value is higher than upper bound or lower than lower bound, this is clamped to these values, respectively. Another important feature of the functions is the characteristics of the function and it is shown in C column. U, S, N, M mean unimodal, separable, nonseparable and multimodal. While unimodal functions have only one local minimum and it is global optimum, multimodal functions have more than one local optimum and one or more global minimum can be in these functions. Separable functions can be written as sum of a decision variables and nonseparable functions cannot be written in this form. Briefly, the performance of the proposed algorithm is investigated on these functions by using these characteristics. The benchmark problems dealt with the study are the difficult problems in terms of two different perspectives. One of them is the characteristics of the problems, unimodal and multimodal. The convergence characteristics of the compared algorithms are tested on unimodal problems, and multimodal problems examines the global search VOLUME 7, 2019 capability of the algorithms. While some of the problems are unimodal, the others are multimodal. The other difficulty for the algorithms is dimensionality of the optimization problems. In our study, 10-, 30-and 50-dimensional problems are considered for verifying the search capability of the proposed algorithm. Therefore, 21 functions with different characteristics and dimensionalities are enough to test the effectiveness of the algorithms. The results obtained by pFOA_v1 and pFOA_v2 are compared with the results of the basic FOA, SFOA [62], SPSO2011 [63], FA, TSA, CS and JAYA. The reasons of the usage of these algorithms are that they are recently proposed state-of-art algorithms, in the same category with the proposed algorithm and successful in solving the problems dealt with study. The control parameters of the algorithm is population size and it is taken as 20 for all the experiments. In order to perform a fair comparison, each algorithm is run 51 times with random seeds on each function. The functions are 10, 30 and 50-dimensional functions. The maximum number of iterations is used for termination condition for the algorithms and it is taken as 100000 for 10-dimensional, 300000 for 30-dimensional, and 500000 for 50-dimensional functions.
Firstly, pFOA_v1 and pFOA_v2 are compared with the basic FOA on the 10, 30 and 50 dimensional functions in Table 2 and Table 3.
As seen from Table 2 and Table 3, the pFOA_v1 and pFOA_v2 are better than the basic version of FOA in almost all cases.
Moreover, a performance comparison between pFOA_v1 and pFOA_v2 has been performed in order to show the better approach. The comparison results of the versions are reported in Table 4 on the test functions.
As seen from Table 4, pFOA_v2 produces better results than pFOA_v1 in almost all cases.
Before the proposed method is compared with the stateof-art algorithms, the proposed algorithm is compared with the JAYA and basic FOA on the 10, 30 and 50 dimensional functions in Table 5, Table 6 and Table 7, respectively.
In accordance with Table 5, 6, and 7, the proposed algorithm is better than the JAYA and FOA because the proposed algorithm uses the effective approach in the FOA and JAYA.
Another important comparison metric in this type of algorithms is convergence characteristics. The convergence comparison of pFOA_v1 and basic algorithm are given in Fig. 4 for 10-dimensional, Fig. 5 for 30-dimensional and Fig. 6 for 50-dimensional functions.
Based in Fig. 4, 5 and 6, the convergence characteristics of the proposed algorithm is good at achieving to optimum or near optimum solution. On almost all cases, the pFOA_v1 is better than the basic version of the algorithm in terms of this measurement.
In the third comparison, the pFOA_v1 is compared with the state-of-art algorithms in Table 8 for 10-dimension functions, Table 9 for 30-dimensional functions and Table 10 for 50dimensional functions.
When we consider the comparison tables, the rank of pFOA_v1 is 1, and therefore, the mean rank value of pFOA_v1 is better than other algorithms. When the dimensionalities of the functions are increased, the performance of the algorithms are decreased but the pFOA_v1 shows better performance than the compared algorithms.
In the fourth comparison, the pFOA_v2 is compared with same algorithms in Table 11 for 10-dimensional functions, in Table 12 for 30-dimensional functions and in Table 13 for 50-dimensional functions.
As we see the comparison of the two versions of the proposed algorithms, the second version is better than the first version, and therefore, the mean rank of the second version is better than both first version and compared algorithms.
Moreover, the execution times of the compared algorithms on dimensions 10, 30 and 50 are given in Fig. 7. In Fig. 7, the reported times are mean running times of 21 benchmark   The running time of FA is higher than all compared algorithm and therefore, it is not included in the time graphic VOLUME 7, 2019  to prevent scaling issues. However, the running times of FA are 26469 seconds on 10-dimensional, 61200 seconds on 30-dimensional, and 79081 seconds on 50-dimensional 21 problems.

VI. RESULTS AND DISCUSSION
The proposed pFOA versions have been compared with the basic FOA, modified FOA called SFOA and other intelligent optimization algorithms including SPSO2011, FA, TSA, CS and JAYA to validate the effectiveness of pFOA versions. The comparison results are shown in Table 2-13. The value highlighted in bold indicates the algorithm with the better value in the benchmark function. pFOAs are more effective and efficient in solving the benchmark functions than the basic FOA. This situation is clearly seen in Table 2 and Table 3. pFOA_v1 has achieved the best values in all dimensionalities in almost all cases, with the exception of 3 functions. pFOA_v2 has achieved the best values in all dimensionalities in almost all cases. Hence, pFOAs have a higher accuracy of optimization than the basic FOA. By looking at the convergence graphs, it appears that pFOAs converges to optimum or near optimum solutions faster than the basic FOA. As a result, the performance of pFOA versions on benchmark functions are better than the basic FOA and compared 6 algorithms in terms of solution quality and robustness. When we discuss all the results, it should be mentioned that the better or comparable results are obtained by pFOA versions. The reason of this result is that the solution update rule is changed with best-worst-based solution strategy, and the agents consider not only best solution but also worst solution. Therefore, the solution space is effectively searched and novel solutions are easily discovered by using this rule. This improves the global search capability but decreases the fast convergence. This trade-off between global search and convergence are acceptable level in the proposed algorithms in contrast to basic version of the algorithm because the basic algorithm tends to improve local search capability and fast convergence due to following the best solutions continuously. Especially, it is seen that the proposed algorithms are more effective than the basic version in solving multimodal problems when the results and convergence graphs of functions are analyzed.

VII. CONCLUSION AND FUTURE WORKS
This study focuses on the improvement of FOA by proposing a novel solution update rule based on best and worst solutions. The proposed algorithms are called pFOA_v1 and pFOA_v2, and they are applied to solve 21 well-known numeric benchmark functions. The proposed algorithms are compared with the basic FOA and state-of-art swarm intelligence algorithms. The experimental results show that the pFOA versions produce competitive and comparable solutions for the numeric functions. The reason of these results is that the pFOA versions follow best and worst solutions in the populations and improve global search capability of the basic algorithm. Briefly, the basic FOA's update strategy has been renewed and improved by considering global search capability. At the same time, an important problem in the basic FOA (the solutions cannot be negative values) and in the novel versions this problem has been solved. The performance of pFOA versions have been compared with basic FOA, SFOA, SPSO2011, FA, TSA, CS and JAYA algorithms. According to the test results, pFOA versions have improved the convergence characteristics and global search ability of basic FOA. The performance of pFOA versions is better than other algorithms in terms of rank-based sorting and convergence characteristics. In near future, the pFOA versions will be applied to solve constrained optimization problems and modified for solving binary optimization problems due to the fact that they have a simple algorithmic structure, few control parameters, and high performance on unconstrained continuous optimization in this study.

COMPLIANCE WITH ETHICAL STANDARDS
Funding : This study is not funding.
Conflict of Interest: The authors declare that there is no conflict of interest regarding the publication of this paper.
Ethical Approval: This article does not contain any studies with human participants or animals performed by any of the authors.
Data Availability Statement: The data used to support the findings of this study are included within the article.
MUSTAFA SERVET KIRAN received the B.S. and Ph.D. degrees in computer engineering from the Institute of Natural and Applied Sciences, Selcuk University, Konya, Turkey, in 2010 and 2014, respectively. He is currently an Associate Professor with the Computer Engineering Department, Konya Technical University. His current research interests include swarm intelligence, evolutionary algorithms, and their real-world applications.
MESUT GUNDUZ received the B.S. and Ph.D. degrees in computer engineering from the Institute of Natural and Applied Sciences, Selcuk University, Konya, Turkey, in 2001 and 2006, respectively. He is currently an Associate Professor with the Computer Engineering Department, Konya Technical University. His current research interests include routing in computer networks, swarm intelligence, evolutionary algorithms, and their applications in networks. VOLUME 7, 2019