FOX: a FOX-inspired optimization algorithm

This paper proposes a novel nature-inspired optimization algorithm called the Fox optimizer (FOX) which mimics the foraging behavior of foxes in nature when hunting preys. The algorithm is based on techniques for measuring the distance between the fox and its prey to execute an efficient jump. After presenting the mathematical models and the algorithm of FOX, five classical benchmark functions and CEC2019 benchmark test functions are used to evaluate it’s performance. The FOX algorithm is also compared against the Dragonfly optimization Algorithm (DA), Particle Swarm Optimization (PSO), Fitness Dependent Optimizer (FDO), Grey Wolf Optimization (GWO), Whale Optimization Algorithm (WOA), Chimp Optimization Algorithm (ChOA), Butterfly Optimization Algorithm (BOA) and Genetic Algorithm (GA). The results indicate that FOX outperforms the above-mentioned algorithms. Subsequently, the Wilcoxon rank-sum test is used to ensure that FOX is better than the comparative algorithms in statistically significant manner. Additionally, parameter sensitivity analysis is conducted to show different exploratory and exploitative behaviors in FOX. The paper also employs FOX to solve engineering problems, such as pressure vessel design, and it is also used to solve electrical power generation: economic load dispatch problems. The FOX has achieved better results in terms of optimizing the problems against GWO, PSO, WOA, and FDO.


Introduction
Currently, meta-heuristic optimization algorithms are widely used to solve real-world application problems [1].These algorithms are predominantly inspired by biological or physical behavior.Algorithms that are inspired by physical behavior include space gravitational optimization (SGO) [2] and the gravitational search algorithm (GSA) [3].These algorithms are derived from the theory of relativity, the law of gravity, and interactions between objects.
Consequently, different metaheuristic algorithms have been proposed by researchers since 1948, when Alan Turing broke the code of the Enigma cipher machine.After the idea of Turing's heuristic method, the genetic algorithm (GA) [4] was proposed, which mimics natural evolution.After the GA was proposed, many algorithms have been developed, such as simulated annealing (SA) [5], tabu search [6], ant colony optimization (ACO) [7], particle swarm optimization (PSO) [8], and differential evolution (DE) [9].Some of the recent algorithms in this family are dragonfly optimization algorithm (DA) [10], whale optimization algorithm (WOA) [1], grey wolf optimization (GWO) [11], butterfly optimization algorithm (BOA) [12], cat swarm optimization (CSO) [13], the fitness-dependent optimizer (FDO) [14], [15], the donkey and smuggler optimization algorithm (DSO) [16] and the learner performance-based behavior algorithm (LPB) [17], K-means GWO [18], chimp optimization algorithm (ChOA) [19].Each algorithm has different inspirations and operators.For example, GA uses three basic operators: selection, crossover, and mutation [20].The GA and its operators are used by researchers to solve optimization problems.Genetic algorithm is quite efficient but the problem presentation is always a challenge for researchers due to the use of discrete chromosomes.GA also has premature convergence and it has many parameters to set, such as population size, crossover rate, mutation rate, and the selection method [21] [22].PSO [23] was proposed by Kennedy in 1995 that mimics the behavior of swarm particles.Each particle represents a solution in the search space [24].PSO uses the global best position of the particle and the local best position of particles to calculate new velocity.The new velocity is based on the memory of the previous particles and the neighbor's experience.Then, the new position of the particle is found based on the previous position and the velocity [25].Despite using PSO for solving problems in different areas including neural network training, estimation, and face recognition, it has disadvantages of falling into local optima and having low convergence when dealing with high dimensional problems as discussed in [26], [27], [28].
DA is a meta-heuristic algorithm inspired by the static and dynamic swarming behavior of dragonflies in nature [29].DA is using these behaviors either for migration or hunting.DA has three basic operators to explore and exploit food sources.These operators are separation, alignment, and cohesion [10].DA had been used in different areas to solve real-world applications: image processing, machine learning, and networking.Results proved that DA outperformed against PSO for solving multidimensional functions.DA is also superior to PSO while it is evaluated on CEC2019 benchmark functions.According to [10], DA achieved competitive results against common algorithms.DA also has drawbacks due to trapping into local optima and premature convergence.Using levy flight also makes more interruption in the search space due to the implementation of big steps.It also uses more time in the exploitation phase.
After DA, another algorithm was proposed which is called WOA.Humpback whales are the source of inspiration for this algorithm proposed in 2016 [1].WOA consists of different methods to catch prey.Firstly, it uses an encircling mechanism to create a search space around the prey.Then, it uses the bubble net attacking method to shrink the circle and update whales' position toward the prey.The exploratory method is activated due to discovering better prey based on a random walk and best positions [30].WOA had been used to solve many applications in different fields, such as electronic engineering, economic scheduling, civil engineering, fuel and energy, and medical engineering.Such diverse application areas demonstrated that WOA achieved high performance in terms of exploration and exploitation.WOA also has a high chance of escaping local optima by balancing both the exploration and exploitation phases.WOA has limitations regarding convergence speed and achieving optimum results.One of the problems is the randomization methods in WOA, these methods increase the computational time when it deals with a problem that has many dimensions.Having poor convergence is another disadvantage of WOA because both exploration and exploitation phases depend on a single variable.Besides, WOA tends to be trapped into local optima in large-scale problems because it uses an encircling mechanism [30].
BOA is inspired by the butterflies foraging behavior.This behavior is responsible for moving the butterflies towards the food position.BOA was proposed in 2018 [12].Butterflies discover the direction of the food source via their senses and analyze the smell of the food in the air.BOA consists of three phases which are the initialization phase, iteration phase, and final phase.The searching process is done in the iteration phase while the best position is found the final face is terminated [12].BOA has been used to solve different applications: spring design, gear train design, and welded beam design problems.It is also used to solve the green vehicle routing problem.Results proved that BOA obtained high performance against PSO, Artificial Bee Colony (ABC), and Differential Evolution (DE) [12].Despite having better performance, BOA has difficulties due to low convergence [31].
FDO is a recent meta-heuristic algorithm that was inspired by the reproduction process of bees while searching for better hives [14].The main aim of FDO is how scout bees try to find better food sources among various hives.FDO works based on two parts which are the pace and positions of the scout bees.The pace is the velocity of the scout bees toward the food source.Therefore, the updating positions of the scout bees are based on the new velocity and the previous position of the scout [32].FDO is a state-of-the-art algorithm used to solve different applications: antenna design, economic load dispatch problems, and power systems [33].It achieved superior results compared to other common algorithms: GA, PSO, DA, ChOA, WOA.FDO has an O(n) time and space complexities.Despite achieving these results, there are still chances for improving FDO in terms of improving solutions [32], [15].In addition, slow convergence and not having a proper balance between exploration and exploitation are disadvantages of FDO [34].Therefore, it can be said that active nature-inspired algorithms entail being proposed by researchers to solve the issues of the state-of-the-art algorithm.
Chimp Optimization Algorithm (ChOA) is a recent metaheuristic algorithm that mimics the behavior of chimps while they are hunting in a group proposed in 2020 [19].It works based on individual intelligence and the sexual behavior of chimps.Therefore, four types of chimps are used in ChOA which are attacker, barrier, chaser, and driver.These types of chimps are responsible for exhibiting diverse intelligence.ChOA also has four main steps to hunt preys which are driving, chasing, blocking, and attacking [35].ChOA has been used to solve many applications.According to [19] ChOA was used to solve ten design problems.ChOA achieved the best results against GA, PSO, and GWO for solving benchmark functions.However, it has limitations due to the transition between the exploration and exploitation phases [36].It also has issues solving binary problems [37] and the solution requires more enhancement [35].
Lion Optimization Algorithm (LOA) was inspired by lion's behavior and social interaction.LOA use social mechanism and encircling mechanism to hunt prey [38] while TIGER algorithm uses eight different technics to catch prey such as birth and breed, migration of children, migration, death, suicide, prowl, mating, and signing [39].These metaheuristic algorithms mentioned above are used to optimize real applications in various fields, such as structural optimization [18], [40], scheduling and routing [41], software testing [42], image processing [43], and data mining [44].However, metaheuristic algorithms may have issues related to their poor search capability and falling into local optima [45], [46].
For example, the WOA falls into local optima when confronting high-dimensionality problems because of having only an encircling mechanism in the exploration phase [47].Therefore, this problem has been solved by using a new method, which is used to update the position and enhance the capability of the exploration phase [48].In [47], chaotic local search is combined with the WOA to enhance the capacity of the WOA to overcome local optima.
GWO is another example that falls into local optima when solving high-dimensional problems and complex multimodal problems [49], [50].However, this problem is solved by using weight variables for different types of wolves in GWO.By using the weight variables and changing the control parameter , GWO can achieve the maximum admissible error (MAE), which is required in engineering optimization problems [49].
The bat algorithm (BA) also has difficulties with some multidimensional functions because it can be trapped in local optima.Thus, this problem is solved by modifying the exploitation phase by changing the dimensional size to a dynamic dimension and adding an inertia weight [50].
Additionally, having an improper balance between the exploration and exploitation phases is problematic in WOA [51], [52].As a result, an improved WOA is proposed in [53] and hybridized with DE's mutation operator.The modified WOA is called improved WOA (IWOA).The mutation operator is integrated inside the exploration phase of the WOA, and the exploitation phase of the IWOA is the same as that of the WOA.Besides, in [51], researchers solved this issue by hybridizing GWO with the WOA to improve the performance of the WOA and achieve a better balance between the two phases.Like WOA, GWO has the same problem.Consequently, researchers proposed improved GWO combined with DE to achieve a proper balance between the phases [54].Therefore, the position of the wolves is updated based on the principle of the survival of the fittest (SOF).After adding the operation of DE, the position is updated in GWO.Similar to GWO, the BA also has this problem.Thus, an inertia weight is added to update the velocity of the bat to improve the efficiency of the BA in terms of balancing both phases [55], [51].The inertia weight dynamically decreases throughout the iterations.It has a high value, in the beginning, to allow the BA to perform a global search.Decreasing the value allows the BA to have better local searchability.
It should be noted that there are other fox-inspired algorithms in the literature.However, none of them used the solo hunting strategy modeled in this work.To the best of our knowledge, there are two papers published in the literature that attempted to propose an optimization algorithm inspired by fox's behaviours.One of them was published in 2016 under the name fox hunting algorithm (FHA) [56] and the other was published in 2021, which is called the red fox optimization algorithm (RFO) [57].FHA mimics the hunting behavior of the hunters who tries to hunt the red fox by using horses and hounds.Therefore, the FHA is related to the way the hunter wants to catch the fox.The RFO also uses the behavior of searching and hunting mechanism of red fox.However, RFO uses the reproduction mechanism and leaves behind the herd by red fox.RFO also uses a sorting mechanism inside the exploration phase while FOX's exploration is based on the best position and random search.Despite proposing both FHA and RFO, FOX is different from them because it uses the behavior of red fox for searching and hunting in the snow environment.It also mimics the jumping technic in order to dive into the snow to hunt the prey.In the exploitation phase, distance of red fox is measured by the prey and then it estimates the jump technic in order to dive and hunt the prey.FOX also requires an artificial fox to jump in northeast direction and its opposite.Therefore, the new position is found based on the distance of the prey, jump value, and the direction range value.
The main aim of this paper is to overcome the stagnated local optima problem and not have the proper balance between exploration and exploitation phases.Therefore, the proposed FOX algorithm effectively balances the exploration and exploitation phases better than its alternatives.FOX is evaluated using CEC2019 benchmark functions.It can also be used to solve various optimization problems.Additionally, decreasing a specific parameter provides support for avoiding local optima.Using the exploration phase based on the best position and average time variable has a great impact on not trap into local optima.
Therefore, the main contributions of this paper are: 1. Proposing the FOX optimization algorithm based on fox hunting behavior.2. Solving the pressure vessel design problem and economic load dispatch problem.

Using a unique technique in the exploration phase that can be adapted to propose new algorithms or modify algorithms.
The rest of this paper is organized as follows: Section 2 describes fox life, and fox behavior, and then, the FOX is described in detail in Section 3. Section 3 describes the results and gives a discussion of the FOX, and then the pressure vessel design problem and economic load dispatch problem are explained and solved by the FOX.Finally, the conclusion and future work are presented.

Inspirations, mathematical models, and the algorithm of FOX
In this paper, a novel red fox in the snow optimization algorithm is proposed which is inspired by the hunting behavior of red fox.The algorithm uses both the searching and hunting techniques of the red fox.The following subsections present red fox life, red fox behavior in the snow, and the FOX algorithm.

Fox life
A fox can live in a species-poor environment that has low production [58].Foxes have different colors, but the most common colors are white and red.Two common types of foxes are the red fox and arctic fox.The red fox is the most widespread animal, and it has colonized urban areas in the USA, Europe, Canada, Japan, and Australia [39,40].The arctic fox has a strong ability to hunt its prey either from above or below.Fox diets include geese and lemmings in North America.However, a large part of the fox diet is lemmings in Fennoscandia, Siberia.The fox also lives on islands such as the Pribilof Island and Svalbard.On these islands, the fox focuses on resources in the sea, such as fish and birds [59].According to [59], foxes that live on these islands have acquired a mouth that opens wider to catch more prey.The main difference between these two foxes is that Arctic foxes live at lower temperatures compared to red foxes.Arctic foxes have difficulties living in their habitat because of human interference [60].
The red fox is an example of a fox that eats mammals and plants.It lives between approximately 2 to 4 years, and the weight of this animal is between 6.5 and 24 pounds [61].It lives in diverse locations, such as grassland, forest, desert, and mountains [62].
By being an omnivore, the fox can adapt itself to its habitat in terms of food resources.Consequently, the fox eats vegetables, fruit, frogs, and fish [63].However, the arctic fox eats lemmings and geese [64].Foxes use intelligent methods to hunt their prey [65].

Red fox behavior in snow
The FOX algorithm mimics the hunting behavior of a red fox when it dives into the snow to hunt its prey.The main techniques are based on the red fox trying to hunt the best prey [64], [66].The steps are described below: 1.When snow covers the ground, the snow blocks the sight of the prey.Red fox tries to search for prey randomly.2. Consequently, the red fox finds the prey by hearing ultrasound from the prey.Then, it takes time to get to close the prey.3.By listening to the sound of the prey and the time difference, the red fox can determine the distance between itself and the prey.4.After determining the distance, the red fox estimates the jump that is needed to catch the prey. 5. Walking is performed randomly according to the minimum time and best position.
In the beginning, the red fox moves randomly in the search space to discover prey.It can find prey via hearing ultrasound of the prey.This random walk is what we inspired and use for providing exploratory behavior in FOX.While the red fox searches, it may hear the sound of the prey.After hearing the sound, the red fox is in the exploitation phase.The red fox can hear ultrasound, so the sound of the prey takes time to reach the red fox.The distance sound travels can be calculated by multiplying it by the speed of sound travel in the air, which is 343 meters per second.However, because of having static value, a different method is used to investigate the speed of sound travel in the air.The red fox tries to move forward the prey decides to jump against the prey.Therefore, the red fox tries to jump depending on the time the sound takes to catch prey.A study showed that a fox prefers to jump northeast based on the magnetic alignment effect [66].If it jumps in the northeastern direction, then the chance of killing its prey is 82%.However, if it jumps in the opposite direction, then the chance of catching the prey is 18%.Consequently, it can be said that there are two to catch the prey.Fig. 1 shows the hunting behavior of the red fox.

The FOX optimization algorithm
In the beginning, FOX initializes the population, which is called the X matrix.An X is the position of red foxes.Then, the fitness of each search agent is calculated by using standard benchmark functions in each iteration.To investigate the BestFitness and best position (BestX), the fitness value of each search agent (each row in an X matrix) is compared to the fitness of other agents (other rows).BestFitness and BestX are conducted using a condition that is used to compare the fitness of the new row ( +1 ) and fitness of the previous row(  ) throughout iterations are returned.
Then, to balance the exploration and exploitation phases, a condition is used with a random variable.This variable aims to divide the phases equally in terms of the number of iterations.Using a random variable called r, we assign 50% probably to do either exploration or exploitation in FOX.In other words, nearly half of the iterations are used for exploration and the other half for exploitation.The proposed algorithm is essential in terms of balancing and avoiding local optima.Thus, a condition statement is used to divide the iterations equally for both exploration and exploitation.The variable a is used to decrease the search performance according to the BestX, and after each iteration, the value is decreased, which means that the agent pursues the prey better in every iteration.In addition to providing the condition to update the position, the fitness value affects the search agents to avoid local optima, because if the new position does not change, the exploration phase deactivates to allow other phases to be activated.The following two sections explain exploitation and exploration.

Exploitation
In the exploitation phase, we have a condition relating to the chance of killing the prey as mentioned in Section 2.2.The value of the random variable p is in the range of [0,1].Therefore, if the random number p is greater than 0.18, the new position of the red fox needs to be found.To find a new position, the distance sound travels __  , the distance of the red fox from the prey __  and jumping value   must be calculated.Consequently, we generate a random number ranging from 0 to 1 for the sound travel time __  .The distance of the sound from the red fox is found by multiplying the speed of sound in the air _ with time sound travels time __  [67]: where the speed of sound in the medium _ is equal to 343 in the air and __  is a random number in the range [0, 1].Then, it is the number of iterations, which ranges from 1 to 500.However, another equation is constructed to find _, which is based on the best position found so far by dividing the time sound takes to travel between the fox and prey.__  is a random and   is the best search agent in the population.Equation (2) shows how to find the speed of the sound _ based on the best position.

𝑆𝑝_𝑆 = 𝐵𝑒𝑠𝑡𝑃𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑖𝑡 𝑇𝑖𝑚𝑒_𝑆_𝑇 𝑖𝑡 (2)
To find the distance sound travels, equation ( 1) is used, which means that distance (__  )= velocity (_) * time (__  ).Consequently, the distance of the fox from the prey; __  can be calculated by halving __  .Therefore, to calculate the distance between sensor and object in physics, the distance of sound travels is divided by 2 since the distance between the sensor and the object is one-half of the distance that has been found by the sound wave [67].Fig. 2 presents the sensor, which sends a sound wave signal to an object and then receives the signal.Therefore, the sensor multiplies the distance of the sound travels time by 0.5 or ½.Both multiplying by 0.5 or dividing by ½ are the same because half of the sound wave is considered [67].So equation ( 3), is taken from techniques of sensors and objects to find the distance from Fig. 2: s Fig. 2 Calculating distance by ultrasound sensor [67] After finding the distance between a fox and the prey, the red fox needs to find a new position so that the red fox requires to jump to catch the prey.Therefore, the fox needs to calculate the jump height   .Thus,   can be calculated by the following equation: where 9.81 is the acceleration due to gravity and t is equal to the average time that sound takes to travel and it is squared because of the up and down steps in the jump.The time transition tt value is calculated by dividing the sum of the __  to dimensions.Equation (7) shows the tt and MinT calculation.Then average time t is found by dividing tt by 2. The average time and gravity are multiplied by 0.5 because the jump value takes two different times to go up and down.As a result, both gravity and average time must be multiplied by 0.5.Then, the Jump value is multiplied by __  and  1 .The variable  1 has a range, which is within [0, 0.18] when the red fox jumps Object Sender

Receiver
Original wave

Reflected wave
to the northeast direction.The equation below shows the calculation of the new position of the red fox if the p, which random number in the range [0,1], is greater than 0.18.
Both Equations ( 5) and ( 6) are used to find a new location for the red fox.Only one of them is executed in each iteration because of using the p condition.However, the only difference is in the second part of the p condition in Equation ( 5).If the else condition of the p is different, the equation ( 5) is multiplied by  2 instead of  1 if the value of p is less than or equal to 0.18.Therefore, if the p is greater than 0.18, then the new position is calculated by equation ( 5).However, if the value is less than 0.18, then the new position is calculated by equation ( 6).The range of  2 is within [0.19,1].
The value of  1   2 are 0.18 and 0.82 respectively.These values are based on the jump movement of a red fox, which either jumps to the northeast or the opposite.Therefore, if the p value is greater than 0.

Exploration
To control the random walk, the fox searches randomly in this phase according to the best position of the fox that has been found so far.The fox does not have a jumping technique in this phase because it has to walk randomly to explore prey in the search area.To ensure that the fox walks randomly toward the best position, a minimum time variable  and the variable a are used to control the search.Equations ( 7) and (8) show the calculation of the  and variables.MinT is calculated by finding the minimum of tt.
Summation of __  (, : ) is divided by the dimension of the problem to find the minimum time average .
where   , is the maximum iterations.Calculating both  and a variable has a vital effect on the search phase to move toward the solution that is close to the best solution.Using (1, ) to ensure that the fox walks stochastically to explore the prey.However, to strengthen the searchability of FOX, both  and a variable are used.Variable r, which is a random number, is also used to balance the exploration and exploitation phases.The best solution   that has been found so far has a great impact on the exploration phase.Equation (9) shows the exploration technique of the fox in searching for a new position in the search space  (+1) .The equations in this phase can be adapted to existing algorithms to enhance their performance.They can also be used to propose new metaheuristic algorithms.
The equations in both phases do not need any modification rather than adaptation to a specific problem while FOX is used to solve the multidimensional space problem.The details of the FOX can be seen in Algorithm 1 and Figure 3. Calculate distance from fox to prey using Eq.(3) 16:

21:
Initialize time randomly; 22: Calculate Distance_Sound_travels using Eq.(1) 23: Calculate Sp_S from Eq. (2) 24: Calculate distance from fox to prey using Eq.(3) 25: Tt= average time; 26: T=Tt/2; 27: Calculate jump using Eq.(4) 28: Find  (+) using Eq. ( 6); 29: EndIf3 30: else 31: Find MinT using Eq. ( 7) 32: Explore  (+) using Eq. ( 9  Overall, FOX begins by initializing the population of the red fox randomly.Then, in the first iteration, the population is checked whether the position of each red fox is inside the boundary of the benchmark function or not.After that, the fitness value of the benchmark function is calculated based on the row of the population.Following these steps, the BestFitness value and the best position (BestX) are selected.Then, a condition is started by comparing the random number r.If it is greater than or equal to 0.5, then the exploitation phase is activated.Also, a p condition exists inside the exploitation phase.If the p value is greater than 0.18, then the new position of the red fox is found based on Equations ( 1), ( 2), ( 3), (4), and (5).However, if p value is less than or equal to 0.18, then the new position is calculated based on Equations ( 1), ( 2), ( 3), ( 4), and ( 6).If r is less than 0.5 in the else condition, the exploration phase is activated.Therefore, the new position is found based on the best position, random number, and multiplying MinT variable by variable a.Thus, the BestFitness is returned in the first iteration.After modifying the population, the same steps are done repeatedly in the second iteration to find the best fitness and best position.

Regarding the computational complexity of FOX: each iteration, has a time complexity of O(SearchAgents * D * it)
where SearchAgents is the population size, D is the dimension of the problem, and it is the number of iterations.Therefore, it can be said that FOX has an O(n 2 ) as time complexity.Also, the space complexity of FOX is calculated based on the vectors and matrices that can be seen in Algorithm 1. So, FOX has an O(n 2 ) space complexity for each iteration.

Results and Discussion
To ensure that the proposed algorithm works well, it must be tested by using different benchmark test functions.Five classical benchmark functions and the recent benchmark test functions are used to evaluate FOX performance.Besides, the results of the proposed algorithm are compared to Butterfly Optimization Algorithm (BOA), DA, ChOA, FDO, WOA, and GA.Then, these results are statistically compared to each other to determine whether the result is significant.Therefore, to ensure that the FOX works well to solve real-world applications, the FOX is used to solve the pressure vessel design problem and economic load dispatch problem.

Classical benchmark functions
Five different classical benchmarks were chosen to evaluate the performance of FOX [68].These benchmark functions are divided into unimodal and multimodal functions.Unimodal functions are better for evaluating the exploitation phase because they have one local optimum.However, multimodal functions are used for the exploration phase due to having more local optima [69].Table 1 illustrates both unimodal and multimodal functions.2 presents results that are conducted from papers [13], [14] and the achieving results of FOX.As a result, FOX obtained better exploitation ability in the first unimodal function while WOA achieved optimum results in the second unimodal function.FOX also outperformed well in functions 3 and 4.However, FDO achieved the third rank which has a superior result in only function 5. Regarding the three multimodal functions, FOX also outperformed the other algorithms in two functions and it means that FOX has greater exploration ability because of dividing nearly half of the iteration for the exploration phase and the other half for the exploitation phase.

CEC2019 benchmark test functions
This modern benchmark suite includes 10 functions that were developed at the CEC conference [70].These ten functions were invented for an annual optimization competition called "The 100-Digit Challenge".The dimensionalities of these functions are different, and all of them are scalable.Functions CEC01 to CEC03 have different dimensionalities [14].However, the other functions have the same dimensionality, which is [-100,100].Table 3 presents the CEC2019 functions.The FOX is compared with GWO, ChoA, GA, and FDO [13].These algorithms are selected because they are very competitive and are commonly used to solve benchmark functions and real-world problems.Therefore, the FOX is implemented in MATLAB code, which can be found at https://github.com/Hardi-Mohammed/FOX,and 30 agents are used by each algorithm to search in the landscape.This search is performed using 500 iterations.The results are determined after running each algorithm 30 times, and then the average results are used for comparison.The results of other algorithms such as FDO, BOA, and ChoA are conducted from [13], [71], [19].The algorithms that are used in this paper have used the following parameters as can be seen in Table 4. Based on Table 3 Table 5 shows that the FOX outperforms all other algorithms on four out of 10 functions except FDO.However, the GA and GWO have the second rank among the six algorithms, both GA and GWO have the best results in only three functions.ChoA and BOA do not have great results against FOX, GA, and GWO.Therefore, ChOA and BOA have the worst result compared to other algorithms.
In addition, FOX has superior results in 9 out of 10 functions compared to BOA, while it outperforms well in 8 functions against ChOA.FOX also achieved the best results compared to GA in 7 functions.However, GWO has competitive results, so FOX is great in only five functions.
FDO is a new metaheuristic algorithm and it achieved the best results.Therefore, FOX was also compared with FDO in Table 5, results proved that FOX obtained well in only two functions while FDO achieved optimum results in 7 functions.Thus, FOX can explore efficiently compared with other algorithms and avoid local optima.It can also better exploit the best solution than the other algorithms in four functions.Using the equations inside FOX and parameters guaranteed that the FOX achieves a better solution, as can be seen in Table 4, which includes five algorithms.Therefore, FOX is very competitive against the other algorithms.
The variable and equations in FOX can be changed because the distance of the fox from the prey can be found by different equations.Additionally, the Jump variable can be found differently: Jump=0.5*9.81*t^2, which is used to find the jump value.However, it can also be used to subtract the current position from the best position.Therefore, by changing the jump equation, the results are changed.These parameters can be tuned as optimization parameters like a value, changing the equation for finding the distance of the fox from the prey.The value of a is one of the vital values that affect the exploration and exploitation phases.Therefore, by increasing the value, the result changes.Consequently, this variable can be used to tune the FOX.
After implementing the FOX, three different versions of the FOX are implemented by changing the a value and jump equation.These modifications are based on the results in Table 4, which shows that FOX is not competitive against FDO.It means that FOX has limitations based on search capability and exploitation performance.Hence, the FOX exploration phase can be enhanced to be more competitive against other algorithms.The exploitation phase of FOX also can be improved based on changing the equations that are used to find the distance of red fox from prey and the jump equation.The convergence of the fitness value can be improved based on changing exploration and exploitation equations.As it can be seen from Fig. 6 FOX (a val+jump) version improves the FOX original.However, the results are required further improvements but it can be said that these parts can be considered as the limitation and improvement part for future work on the FOX.
The FOX versions are the FOX with a val=4, the FOX using different jump equations, and both types of FOX combined (a val+jump equations).The results in the previous sections are related to the original FOX because the other versions do not improve against GWO, the WOA, CSO, and the GA.However, the original FOX can be enhanced based on the previously mentioned versions because they achieve better results than the original FOX.The results of these versions can be seen in Table 6.To analyze the FOX versions in detail, two quantitative metrics were used.These two metrics are used to show the results as a graph to present the exploration and convergence rate of the search agents.Figures 5 and 6 show the results of these two metrics.
The CECE2019 benchmark functions are also used in both metrics.Function 5 is used for the first metric, and then three functions were chosen for analysis randomly by the convergence metric, which are functions 1, 5, and 9.The FOX used 10 search agents using 100 iterations.Then, the results were obtained and put on a graph.
The first experiment is used to illustrate the exploration capability of three different versions of the fox search agents and how they search through the search space.These versions are called a val, jump, and a val+jump.The version of the original FOX represented in this paper with a val has a value of this variable that is changed to 4. The second version is jump, which is the FOX with different jump functions.Finally, a val+jump is a combination of the previous two.In this technique, the best position of each iteration is recorded regarding its dimension.Therefore, the results of function 5 are as shown in Fig. 5.It can be seen that the foxes try to cover the landscape and then move toward optimality.Fig. 5 shows that FOX a val and FOX a val+jump achieve better results than FOX original and FOX jump.This shows the efficiency of search agents using a=4 because they search in a large area compared to the other types.
Besides, the FOX and FOX jump do not explore efficiently compared to FOX a val.
The second experiment is conducted by recording the fitness function of the three functions (functions 1, 5, and 9).Fig. 6 shows that the FOX versions start from a high fitness and then gradually decrease the fitness value until it reaches the optimum value.
The WOA, WOAGWO, GWO, and FDO were used to solve this problem [51].To prove that FOX has better performance against other algorithms, FOX is used to solve this problem.Table 7 shows that the FOX has high efficiency against the other algorithms.Overall, solving this problem is another proof that FOX is very competitive.The economic load dispatch problem is an optimization problem in electrical power.The main aim of optimizing this problem is to minimize the energy production cost while considering the load demand within various equality and inequality constraints [75].Therefore, minimum fuel should be used to optimize the power generation unit to reduce the operation cost of generating energy [76].Equation (15) shows the function of ELD.
Where   is the total cost of fuel,   is the actual power generation by generator i,   is the required cost by generator and n is generator numbers.Therefore, the quadratic function used to represent   as follow and the equation ( 16) has to be optimized: = ∑     2  =1 +     +   (16) where each of   ,   ,    are used as coefficient cost for generator i.The above equation works under two constraints: the sum of the total power generator must be equal to the power demand with the power loss and the power generator must be inside the limitation of the power generator [77], [78].
To solve the economic load dispatch problem with three power generators with a power demand of 150 MW.FOX was applied to solve this problem by using 1000 iterations with 50 independent runs.Table 9 shows the data by three different generators.Then, FOX results were compared against GWO, PSO, WOA, and FDO.All these algorithms are implemented to compare them against the FOX algorithm.Results proved that FOX achieved an optimum result in terms of generating powers while GWO, WOA, FDO, and FOX used nearly the same cost.Table 10 presents that FOX can obtain the required power at the minimum cost compared to other algorithms.

Result analysis
The FOX algorithm demonstrated better exploration and exploitation when solving five classical benchmark functions compared to BOA, DA, ChOA, and WOA.It can be said that FOX has a great characteristic in terms of exploitation because it has optimum results compared to other algorithms in unimodal functions.Table 2 presents the exploitation capability of FOX for solving unimodal functions.FOX also benefits from superior exploratory behavior because it achieved the best results in solving multimodal functions in Tables 2 and 5. Therefore, the reason behind this efficiency is that the FOX avoids local optima because it uses variable a that affects the exploration phase to go toward the best solution.Dividing the iterations so that nearly a half is used for exploration and the other half is used for exploitation by using a condition with a random variable has a great impact on achieving a better balance between the two phases.
Having an exploration phase based on best position, variable a, and MinT variables would have a great impact to explore solutions that are going forward with the global optima.Furthermore, finding the distance between fox and prey with a fox jump method is a vital method that is used to catch the prey in the exploitation phase.As a result, FOX achieved better performance against FDO, BOA, GA, GWO, and ChOA.
FOX optimizer uses a physical method to find its distance from prey by retrieving the sound of the prey under the snow and then trying to use a jump mechanism to catch prey.Finding distance from prey and jump method has benefits over LOA, Tigers, and GWO because these algorithms use social hierarchy and group hunting mechanisms.Despite these technics, the FOX optimizer achieved better performance compared to GWO [11], Tigers [39], LOA [38]in solving benchmark functions.
Three different versions of FOX were compared in Table 6 to show that FOX can be improved by changing the value of variable a and jump equation.These versions can improve FOX but they are not statistically significant.Therefore, it can be used in terms of modifications of FOX.The reason is that the equations of jump can be identified by different methods in the future and also the value of a variable has a great impact on the exploration of FOX, so by increasing the value of a, the performance of FOX is improved.
FOX is also used to solve pressure vessel design problems and economic ELD problems.Then, it achieved better performance against WOA, WOAGWO, GWO, PSO, and FDO.However, FDO performance is better than FOX in solving CEC2019 benchmark functions.These results prove that an algorithm can work well to solve problem A while it does not work well for problem B. The reason is that FOX has better exploration capability to avoid local optima and divide the iterations into both exploration and exploitation phases.
Overall, it can be said that FOX can avoid local optima and it also has proper balancing between exploration and exploitation by using random variable r.FOX also mimics the behavior of the red fox by using physical technics to create different equations from the red fox behavior.Finding the distance between the red fox and prey by taking advantage of the physical experiment in Fig. 2 improves the performance of FOX.

Conclusion
To conclude, this paper presented a new metaheuristic algorithm inspired by foxes' hunting behavior in nature called FOX.It uses a random walk based on the best position in the exploration phase, while it uses a distance measurement method to find the distance between fox and prey.It also uses jump action to catch the prey in the exploitation phase.
The FOX was tested by using five classical benchmark functions and CEC2019 benchmark functions, then compared to the GWO, ChOA, GA, PSO, BOA, and GA.Then, statistical results showed that FOX has the first rank and is better than the compared algorithms.The reason behind the performance of FOX is that FOX uses jump technics to catch prey.The other reason is that FOX searches based on best position, a variable, and MinT.
To provide parameter sensitivity analysis and discover more insights into the search mechanisms of FOX, exploration metric and convergence capability metric were used to present the performance of FOX.Three different versions of FOX are used by the metrics and the results showed that the FOX a val and FOX (a val+jump) have a great ability to explore new positions against the FOX original.As a result, both of these versions perform well in terms of exploration.The convergence metric is implemented by using Functions 1, 5, and 9. Jump+a val FOX versions showed excellent convergence and achieved better results than the other versions in functions 5 and 9. Therefore, FOX requires further research improvement.
The FOX was also applied to solve a pressure vessel design problem and economic load dispatch problem.The FOX achieved results better than WOA, WOAGWO, GWO, KMGWO, and FDO.FOX generated optimum power results because it has efficient exploration and exploitation capabilities.The reason behind the high performance of the FOX is that the FOX uses a proper balance technique between the exploration and exploitation phases to avoid being trapped in local optima.Decreasing the value of a specific variable throughout the iterations enhanced the exploitation phase.
This algorithm can be further extended since the FOX works for single-objective optimization; multi-objective optimization will be studied in the future.The FOX can also be used to solve optimization problems in planning and medical problems.

Fig. 1
Fig. 1 Red Fox Hunting Behavior: Exploration and Exploitation

Fig. 5 FOXFig. 6 Fig. 7 𝑔 4 (
Fig. 5 FOX Capability of exploration using Functions 5 18, it means that the red fox jumps to the northeast direction.Consequently, to find a new position both __  and   are multiplied by  1 .Accordingly, chances of exploiting a new position are great and the red fox goes toward global optima.However, the red fox jumps in the opposite northeast direction, if the p value is less than 0.18, this means that the chances of killing prey are low (%18).Hence, both __  and   are multiplied by  2 .