Egret Swarm Optimization Algorithm: An Evolutionary Computation Approach for Model Free Optimization

A novel meta-heuristic algorithm named Egret Swarm Optimization Algorithm (ESOA) is proposed in this paper, which is inspired by two egret species’ hunting behavior (Great Egret and Snowy Egret). ESOA consists of three primary components: a sit-and-wait strategy, aggressive strategy as well as discriminant conditions. The learnable sit-and-wait strategy guides the egret to the most probable solution by applying a pseudo gradient estimator. The aggressive strategy uses random wandering and encirclement mechanisms to allow for optimal solution exploration. The discriminant model is utilized to balance the two strategies. The proposed approach provides a parallel framework and a strategy for parameter learning through historical information that can be adapted to most scenarios and has well stability. The performance of ESOA on 36 benchmark functions as well as 3 engineering problems are compared with Particle Swarm Optimization (PSO), Genetic Algorithm (GA), Differential Evolution (DE), Grey Wolf Optimizer (GWO), and Harris Hawks Optimization (HHO). The result proves the superior effectiveness and robustness of ESOA. ESOA acquires the winner in all unimodal functions and reaches statistic scores all above 9.9, while the scores are better in complex functions as 10.96 and 11.92.


Introduction
General engineering applications involving manipulator control, path planning, and fault diagnosis can be described as optimization problems. Since these problems are almost non-convex, conventional gradient approaches are difficult to apply and frequently result in local optima [1]. For this reason, meta-heuristic algorithms are being increasingly utilized to solve such problems as they are able to find a sufficiently good solution, whilst not relying on gradient information.
Meta-heuristic algorithms imitate natural phenomena through simulating animal and environmental behaviours [2]. As shown in Figure 1, these algorithms are broadly inspired by four concepts: the species evolution, the biological behavior, the human behavior as well as the physical principles [3,4].
Evolution-based algorithms generate various solution spaces by mimicking the natural evolution of a species. Potential solutions are considered as members of a population, which evolve over time towards better solutions through a series of cross-mutation and Survival of the fittest. The Darwinian evolution-inspired Genetic Algorithm (GA) has remarkable global search capabilities and has been applied in a variety of disciplines [5]. Comparable to GA, Differential Evolution (DE) has also shown to be able to adapt to a Biologically inspired algorithms mimic behaviours like hunting, pathfinding, growth, and aggregation in order to solve numerical optimization problems. A well known example of this is Particle Swarm Optimization (PSO), a swarm intelligence algorithm inspired by bird flocking behavior [16]. PSO leverages information exchange among individuals in a population to develop the population's motion from disorder to order, resulting in the location of an optimal solution. Alternatively, ref. [17] was inspired by the behaviour of ant colonies, proposing the Ant Colony Optimization (ACO) algorithm. In ACO, a feasible solution to the optimization problem is represented in terms of the ant pathways, where a greater number of pheromone is deposited on shorter paths. The concentration of pheromone collecting on the shorter pathways steadily rises over time, which causes the ant colony to focus on the optimal path due to the influence of positive feedback.
With the widespread application of PSO and ACO in areas such as robot control, route planning, artificial intelligence, and combinatorial optimization, meta-heuristic algorithms have enabled a plethora of excellent research. Authors in [18] presented Grey Wolf Optimizer (GWO) based on the hierarchy and hunting mechanism of grey wolves. In [19], authors applied GWO to restructure a maximum power extraction model for a photovoltaic system under a partial shading situation. GWO has also been utilized in non-linear servo systems to tune the Takagi-Sugeno parameters of the proportional-integral-fuzzy controller [20]. Paper [21] introduced the Sparrow Search Algorithm (SSA), inspired by the collective foraging and anti-predation behaviours of sparrows. Authors in [22] suggested a novel incremental generation model based on a chaotic Sparrow Search Algorithm to handle large-scale data regression and classification challenges. An integrated optimization model for dynamic reconfiguration of active distribution networks was built with a multi-objective SSA by [23]. Authors in [24] constructed a tiny but efficient meta-heuristic algorithm named Beetle Antennae Search Algorithm (BAS), through modelling the beetle's predatory behavior. Paper [25] integrated BAS with a recurrent neural network to create a novel robot control framework for redundant robotic manipulator trajectory planning and obstacle avoidance. BAS is applied in [26] to optimize the initial parameters of a convolutional neural network for medical imaging diagnosis, resulting in high accuracy and a short period of tuning time.
In recent years, there has been a proliferation of swarm-based algorithms for various situations due to the massive adoption of swarm intelligence in engineering applications [27][28][29][30][31][32][33][34][35][36]. Authors in [37] proposed a novel meta-heuristic algorithm named Artificial Hummingbird Algorithm (AHA), influenced by the flight skills and hunting strategies of hummingbirds. In addition, paper [38] introduced the African Vultures Optimization Algorithm (AVOA) inspired by vultures' navigation behavior. Meanwhile, the Starling Maturation Optimizer (SMO) and Orca Predation Algorithm (OPA) were proposed in [39,40] to suit complex optimization problems by mimicking bird migration and orca hunting strategies. Other notable examples include Aptenodytes Forsteri Optimization (AFO) inspired by penguin hugging behaviour [41], Golden Eagle Optimizer (GEO) inspired by golden eagle feeding trails [42], Chameleon Swarm Algorithm (CSA) inspired by Chameleon dynamic hunting routes [43], Red Fox Optimization Algorithm (RFOA) inspired by red fox habits, and Elephant Clan Optimization (ECO) inspired by elephant survival strategies [44,45]. Unlike most other bio-inspired methods, authors in [46] proposed a Quantum-based Avian Navigation Optimizer Algorithm (QANA) that contains a V-echelon topology to disperse information flow and a quantum mutation strategy to enhance search efficiency. Overall, it can be observed that swarm intelligence algorithms have gradually progressed from simply imitating the appearance of animal behavior to modelling the behavior with a deeper understanding of their underlying principles.
Not only that, the evolutionary algorithm performs well on some benchmark functions [47][48][49][50][51][52]. Paper [53] introduced IPOP-CMA-ES utilizing CMA-ES [54] within a restart method with the increasing population size for each restart. Paper [55] integrated IPOP-CMA-ES with an iterative local search as ICMAES-ILS that generated better solution adopted in the rest of evaluations. Authors in [56] developed DRMA that utilizing CMA-ES as the local searcher in GA and dilivering solution space into different parts for global optimization. In addition, there are a series of evolutionary algorithms such as GaAPPADE [57], MVMO14 [58], L-SHADE [59], L-SHADE-ND [60] and SPS-L-SHADE-EIG [61].
Although meta-heuristics algorithms have shown to be well suited to various engineering applications, as Wolpert analyses in [62], there is no near-perfect method that can deal with all optimization problems. To put it another way, if an algorithm is appropriate for one class of optimization problems, it may not be acceptable for another. Furthermore, the search efficiency of an algorithm is inversely related to its computational complexity, and a certain amount of computational consumption needs to be sacrificed in order to enhance search efficiency. However, the No Free Lunch (NFL) theorem has assured that the field has flourished, with new structures and frameworks for meta-heuristics algorithms constantly being developed.
For instance, most metaheuristic algorithms contain just a single strategy, typically a best solution following strategy, and without learnable parameters, which are just deformations built on stochastic optimization. Although this category of algorithms performs well on CEC benchmark functions, they produce disappointing results in praticle application settings because of lacking feedback and parameter-learning mechanism [63,64]. In the field of robotics, the control of a manipulator is a continuous process. If the original metaheuristic algorithm is utilized, the algorithm needs to iterate and converge again at each solution, resulting in a possible discontinuity in the solution space, which affects the control effect [65]. In contrast, the method proposed in this paper includes a learnable tangent surface estimation parameter, which makes it possible to have a base reference to assist in each solution, reducing computational difficulty while ensuring continuity of understanding. Despite the proliferation of studies into meta-heuristic algorithms, the balance between exploitation and exploration has remained a significant topic of research [66,67]. The field requires a framework that balances both, enabling algorithms to be more adaptable and stable in a wider range of situations. This paper proposes a novel meta-heuristic algorithm (Egret Swarm Optimization Algorithm, ESOA) to examine how to improve the balance between the algorithm's exploration and exploitation. The contributions of Egret Swarm Optimization Algorithm include: • Proposing a parallel framework to balance exploitation and exploration with excellent performance and stability. • Introducing a sit-and-wait strategy guided by a pseudo-gradient estimator with learnable parameters. • Introducing an aggressive strategy controlled by a random wandering and encirclement mechanism. • Introducing a discriminant condition that are capable of ensembling various strategies. • Developing a pseudo-gradient estimator referenced to historical data and swarm information.
The rest of the paper is structured as follows: Section 2 depicts the observation of egret migration behavior as well as the development of the ESOA framework and mathematical model. The comparison of performance and efficiency in CEC2005 and CEC2017 between ESOA and other algorithms is demonstrated in Section 3. The result and convergence of two engineering optimization problems utilizing ESOA are discussed in Section 4. Section 5 represents the conclusion of this paper as well as outlines further work.

Egret Swarm Optimization Algorithm
This section reveals the inspiration of ESOA. Then, the mathematical model of the proposed method is discussed.

Inspiration
The egret is the collective term for four bird species: the Great Egret, the Middle Egret, the Little Egret, and the Yellow-billed Egret, all of which are known for their magnificent white plumage. The majority of egrets inhabit coastal islands, coasts, estuaries, and rivers, as well as lakes, ponds, streams, rice paddies, and marshes near their shores. Egrets are usually observed in pairs, or in small groups, however vast flocks of tens or hundreds can also be spotted [68][69][70]. Maccarone observed that Great Egret fly at an average speed of 9.2 m/s and balance their movements and energy expenditure whilst hunting [71]. Due to the high consumption of energy when flying, the decision to prey typically necessitates a thorough inspection of the trajectory to guarantee that more energy would be obtained through the location of food than what would be expended through flight. Compared to Great Egrets, Snowy Egrets tend to sample more sites, and they will observe and select the location where other birds have already discovered food [72]. Snowy Egrets often adopt a sit-and-wait strategy, a scheme that involves observing the behavior of prey for a period of time and then anticipating their next move in order to hunt with the least energy expenditure [73]. Maccarone indicated in [74] that not only do Snowy Egrets applying the strategy consume less energy, but they are also 50% more efficient at catching prey than other egrets. Although the Great Egret adopt a higher exertion strategy to pursue prey aggressively, they are capable of capturing larger prey since it is rare for large prey to travel through an identical place multiple times [75]. Overall, Great Egrets with an aggressive search strategy balance high energy consumption for potentially greater returns, whereas Snowy Egrets with a sit-and-wait approach, balance lower energy expenditure for smaller but more reliable profits [74].

Mathematical Model and Algorithm
Inspired by the Snowy Egret's sit-and-wait strategy and the Great Egret's aggressive strategy, ESOA has combined the advantages of both strategies and constructed a corresponding mathematical model to quantify the behaviors. As shown in the Figure 2, ESOA is a parallel algorithm with three essential components: the sit-and-wait strategy, the aggressive strategy, and the discriminant condition. There are three Egrets in one Egret squad, Egret A applies a guiding forward mechanism while Egret B and Egret C adopt random walk and encircling mechanisms respectively. Each part is detailed below. The individual roles and search preferences of the Egret Squad can be seen in Figure 3. Egret A will estimate a descent plane and search based on the gradient of the plane parameters, Egret B performs a global random wander, and Egret C selectively explores based on the location of better egrets. In this way, ESOA will be more balanced in terms of exploitation and exploration and will be capable of performing fast searches for feasible solutions. Unlike gradient descent, ESOA refers to historical information as well as stochasticity in the gradient estimation, meaning it is less likely to fall into the saddle point of the optimization problem. ESOA also differs from other meta-heuristic algorithms by estimating the tangent plane of the optimization problem, enabling a rapid descent to the current optimal point.

Sit-and-Wait Strategy
Observation Equation: Assuming that the position of the i-th egret squad is x i ∈ R n , n is the dimension of problem, A( * ) is the Snowy Egret's estimate approach of the possible presence of prey in its own current location.ŷ is the estimation of prey in current location, then the estimate method could be parameterized as, where the w i ∈ R n is the weight of estimate method. The error e i could be described as, Meanwhile,ĝ i ∈ R n , the practical gradient of ω i , can be retrieved by taking the partial derivative of w i for the error Equation (3), and its direction isd i . Figure 4 demonstrates the Egret's following behavior, where Egrets refer to better Egrets during preying, drawing on their experience of estimating prey behavior and incorporating their own thoughts. d h,i ∈ R n is the directional correction of the best location of the squad while d g,i ∈ R n is the the directional correction of the best location of all squad.
The integrated gradient g i ∈ R n can be represented as below, and r h ∈ [0, 0.5), r g ∈ [0, 0.5): An adaptive weight update method is applied here [76], β 1 is 0.9 and β 2 is 0.99: According to Egret A's judgement of the current situation, the next sampling location x a,i can be described as, where t and t m ax is the current iteration time and the maximum iteration time, while hop is the gap between the low bound and the up bound of solution space. step a ∈ (0, 1] is Egret A's step size factor. y a,i is the fitness of x a,i .

Aggressive Strategy
Egret B tends to randomly search prey and its behavior could be depicted as below, where r b,i is a random number in (−π/2, π/2), x b,i is Egret B's expected next location and y b,i is the fitness. Egret C prefers to pursue prey aggressively, so the encircling mechanism is used as the update method of its position: D h is the gap matrix between current location and the best position of this Egret squad while D g compares with the best location of all Egret squads. x c,i is the expected location of Egret C. step b ∈ (0, 1] is Egret B's step size factor. r h and r g are random numbers in [0, 0.5).

Discriminant Condition
After each member of the Egret squad has decided on its plan, the squad selects the optimal option and takes the action together. x s,i is the solution matrix of i-th Egret squad: If the minimal value of y s,i is better than current fitness y i , the Egret squad accepts the choice. Or if the random number r ∈ (0, 1) is less than 0.3, which means there is 30% possibility to accept a worse plan.

Pseudo Code
Based on the discussion above, the pseudo-code of ESOA is constructed as Algorithm 1, which contains two main functions to retrieve the Egret squad's expected position matrix and a discriminant condition to choose a better scheme. ESOA requires an initial matrix x 0 ∈ R P×N of the P size Egret Swarm position as input, while it returns the optimal position x best and fitness y best .
We will analyse the computational complexity of each part of ESOA in turn and provide the final results. For sit-and-wait strategy, Equation (4) requires n + 1, Equations (5) and (6) need the same 2n + 1 while Equation (7) require 3n + 1 floating-point operators. Weight updating Equation (8) and position search need 2n + 4 as well as n + 1 respectively. Then the total operators of sit-and-wait strategy is 11n + 9. As for aggressive strategy, random wander Equation (11) and encircling mechanism require both n + 1 then in total 2n + 2 operators. Discriminant condition need n operators. So ESOA requires a total of 14n + 11 floating-point operators and then its computational complexity is O(n). Assuming that the population size of ESOA is k, the complexity then becomes O(kn).

Algorithm 1 Egret Swarm Optimization Algorithm
Input: x 0 : the P size Egret Swarm position ∈ R P×N , step a as the Egret A's step size factor while step b as the Egret B's; Output: x best : Optimal or approximate optimal solution; y best : Optimal or approximate optimal fitness; 1: function SITANDWAIT(x) 2: Update the integrated gradient g via Equations (4)- (7) 3: Update the weight of observation method ω by Equation (8) 4: Get the expected position x a of Egret A by Equation (9) 5: Retrieve the Egret A's fitness y a 6: return x a , y a 7: end function 8: function AGGRESSIVE(x) 9: Get the expected position x b of Egret B by Equation (11) 10: Get the expected position x c of Egret C by Equation (13) 11: Retrieve the fitness of Egret B y b and Egret C y c 12: return x b , x c , y a , y a 13: end function 14: while t < t max do 15: x t a , y t a ← SITANDWAIT(x t ) 16: Get next position x t+1 via Equations (15)-(18) 18: end while 19: return x best , y best

Parameters
The two parameters required for ESOA are the step factors step a ∈ (0, 1] and step b ∈ (0, 1] for Egret A and Egret B respectively. Larger step coefficients represent more aggressive exploration behavior. Table 1 shows how the parameters required for ESOA compare to other state-of-the-art algorithms. ESOA requires two parameters, which can be easily adjusted to obtain better optimization results when optimizing the problem. In fact, as ESOA's Equation (8) in the sit-and-wait strategy contains adaptive mechanisms, it is able to respond to different parameter changes by self-adjusting. In the general case, both step a and step b can be set to 0.1 to deal with most problems. Figure 5 presents the effect of various step a and step b on the step size. step a larger a will significantly increase the search step of Egret step a during the original iterations, but will gradually close the gap with a smaller step a after many iterations. In simple applications or unimodal problems, step a can be appropriately tuned up for faster convergence, and in multimodal problems or complex applications, step a is appropriately tuned down for scenarios that require continuous optimization. A larger value of step b means that Egret B will wander randomly in larger steps, suitable for complex scenarios, to help ESOA perform a larger search and jump out of the local optimum solution where possible.

Experimental Results and Discussion
In this section, the quantified performance of the ESOA algorithm is evaluated by examining 36 optimization functions. The first 7 unimodal functions are typical benchmark optimization problems presented in [8] and the mathematical expressions, dimensions, range of the solution space as well as the best fitness are indicated in Table 2. The final result and partial convergence curves are shown in Tables A3 and A4 respectively. The remaining 29 test functions introduced in [82] are constructed by summarizing valid features from other benchmark problems, such as cascade, rotation, shift as well as shuffle traps. The overview of these functions are shown in Table 3 and the comparison is indicated in Table A5. All of the experiments are in 30 dimensions, whilst the algorithms used have 50 population sizes and are limited to a maximum of 500 iterations.
Researchers generally classify optimization test functions as Unimodal, Simple Multimodal, Hybrid, and Composition Functions. A 3D visualization of several of these functions are shown in Figure 6. As Unimodal Functions, (a) and (b) are F 1 as well as F 4 in CEC 2005, which only have one global minimum value without local optima. (c) and (d), the Simple Multimodal problems, retain numerous local optimal solution traps and multiple peaks to impede the exploration of global optimal search. Hybrid Multimodal functions are a series of problems adding up several different test functions with well-designed weights, and due to the dimension restriction, these are hard to reveal in the 3D graphics. (e), (f), (g) as well as (h) are Composition Functions, the non-linear combination of numerous test functions. These functions are extremely hard to optimize because of the various local traps and spikes, all of which are designed to impede the algorithm's progress.
ESOA was compared with three traditional algorithms (PSO [16], GA [5], DE [6]) as well as two novel methods (GWO [20], HHO [83]) in the 37 benchmark functions. The numerical results from a maximum of 500 iterations is presented in Tables A3 and A5. The initial input for each algorithm is a random matrix with 30 dimensions and 50 populations in [−100, 100]. The specific variables w, c 1 , and c 2 in PSO are 0.8, 0.5, and 0.5 while the mutation value is 0.001 in GA.

Computational Complexity Analysis
The computational complexity test was performed using a laptop with windows 11, 16 GB of RAM, and an i5-10210U quad core CPU. Table 4 indicates the cost time from 100 runs between ESOA and other algorithms on the CEC05 benchmark functions in 30 dimensions. In general, ESOA is medium in terms of computational complexity, with F 4 taking the shortest time of all the algorithms and F 7 the longest.

Evaluation of Exploitation Ability
The exploration and exploitation measurement method utilized in this paper is based on computing the dimension-wise diversity of the meta-heuristic algorithm population in the following way [84,85].
where median(x j ) means the median value of algorithm swarm in dimension j, whereas x j i is the value of individual i in dimension j, n is the population size. Then Div presents the average value of the whole swarm. Moreover, the percentage of exploration and exploitation based on dimension-wise diversity could be calculated as below, where X pl% is the exploration value while X pt% indicates the exploitation value. Div max means the maximum diversity along with the whole iteration process. The exploration, exploitation as well as incremental-decremental are shown in Figure 7. Increment means the increasing ability of algorithms' exploration while decrement presents the contrary. We can find that in most unimodal benchmark functions, due to the fast convergence of ESOA, all agents search the optimal solution swiftly and are clustered together about almost 10 iterations. And in complex functions, ESOA is computed after some iterations and all agents will gradually approach the optimal solution and are distributed around the optimal solution, which is expressed as exploitation gradually overtaking exploration. The Unimodal Function is utilized to evaluate the convergence speed and exploitation ability of the algorithms, as only one global optimum point is present. As shown in Table 5, ESOA demonstrates outstanding performance from F 1 to F 4 . ESOA trails GWO and HHO in F 5 to F 7 , however, the result is considerably superior to PSO, GA, as well as DE. Therefore, the excellent exploitation ability of ESOA is evident here.

Evaluation of Exploration Ability (F 3 -F 19 )
In the MultiModal Functions and Hybrid Functions, there are numerous local optimum positions to impede the algorithm's progress. The optimization difficulty increases exponentially with rising dimensions, which are useful for evaluating the exploration capability of an algorithm. The result of F 3 -F 19 shown in Table A5 is clear evidence of the remarkable exploration ability of ESOA. In particular, ESOA has superior performance to the other five algorithms for the average fitness on F 18 . Because of the aggressive strategy component of ESOA, it is capable of overcoming the interference from numerous local optimum points in the exploration of the global solution.
Composition Functions are a difficult type of test function that require a good balance between exploitation and exploration. They are usually employed to undertake comprehensive evaluations of algorithms. The performance of each algorithm in F 20 -F 29 is shown in Table A5, the average fitness of ESOA in each test function is extremely competitive when compared to the other listed algorithms. Especially in F 22 , ESOA outperforms the other approaches and reaches 2346 average fitness while the second method (DE) only obtains 3129. In fact, ESOA possesses a sit-and-wait strategy for exploitation as well as an aggressive strategy for exploration. Both features are regulated by a discriminant condition which is fundamental to the performance of the algorithm in such scenarios.

Algorithm Stability
In general, the standard deviation of an algorithm's outcomes when it is repeatedly applied to a problem can reflect its stability. It can be seen that the standard deviation of ESOA is at the top results in both tables in most situations, and much ahead of the second position in certain test functions. The stability of ESOA is hence proven.
Tables A1 and A2 are two-sided 5% t-test results of ESOA's performance in CEC05 and CEC17, respectively, against other algorithms. Combining this with Tables A3-A5, it can be concluded that ESOA outperforms the other algorithms by a wide margin on the benchmark function.
In addition, for the field of evolutionary computation, hypothesis tests with parameters are more difficult to fully satisfy the conditions, so the Wilcoxon non-parametric test has been added to this section [86]. The Wilcoxon test results of ESOA's performance in CEC05 and CEC17 are indicated in Tables A6 and A7, which could be an evidence that ESOA demonstrates sufficient superiority. Figures 8 and 9 show box plots of the results of multiple algorithms run 30 times on two types of test functions, respectively, where Figure 6 has been ln-processed. The results show that ESOA outperforms the other algorithms in most cases and has a smaller box, indicating a more stable algorithm. In the unimodal test function, ESOA's boxes are significantly smaller than those of the other algorithms and have narrower boxes. With most complex test functions, e.g., F 3 , F 14 , F 22 as well as F 26 , ESOA has a significantly smaller box than the other algorithms and its superiority can be clearly seen.

Analysis of Convergence Behavior
The partial convergence curves of each method are shown in Figure 10. In (a), (b), and (c), the Unimodal Functions, ESOA converges to near the global optimum in less than 10 iterations while PSO, GA as well as DE have yet to uncover the optimal path for fitness descent. The fast convergence in unimodal tasks allows ESOA to be applied to some online optimization problems. In (d), (e), and (f), the Multimodal and Hybrid Functions, after a period of searching the optimization results of ESOA will surpass almost all other algorithms in most cases and would continue to explore afterward. ESOA's effectiveness in Multimodal problems indicates that it has notable potential to be applied in general engineering applications. In (g), (h) as well as (i), the Composition problems, ESOA's search, and estimation mechanism allow for continuous optimization in most cases, and ultimately for excellent results. The performance in the Composition Functions is evidence of ESOA's applicability for use in complex engineering applications.
To complete the experiment and to provide more favorable conditions for demonstrating the superiority of ESOA, we have added a supplementary experiment to this section. The experiment uses the 100 and 200 dimensions of the CEC2005 benchmark, with five fixed sets of CPU runtimes present in each experiment. Figure 11 shows the optimal value searched for by each algorithm for a fixed CPU runtime, with a subplot of the logarithm of the fitness value to show its differentiation. The Figure 11 reveals that ESOA always remains the best at most fixed times, for instance (a), (b) and (c) in Figure 11, while the second place is usually taken by GWO or HHO. This experiment further justice to the superiority of ESOA.

Statistical Analysis
In order to clarify the results of the comparison of the algorithms, this section will count the number of winners, losers, scores as well as rankings of each algorithm on the different test functions. The score is calculated as below, where S i presents the score of i-th algorithm, f j i means the optimal value of i-th algorithm in j-th problem.  Table 8, for the simple multimodal problem, ESOA was slightly behind GWO, but the scores were very close, at 8.99378 and 9.01376 respectively. For the hybrid functions and composition functions, ESOA was again the winner and outperformed others. As the data indicates, ESOA is with the capability of fast convergence in simple problems while maintaining excellent generalization and robustness for complex problems. The beneficial properties of ESOA stem from the algorithmic framework's coordination, where the discrimination conditions effectively balance the exploitation of the sit-and-wait strategy with the exploration of the aggressive strategy.
In order to better reflect the superiority of ESOA, two generic ranking systems, ELO and TrueSkill, are utilized in additional ranking [87]. Tables 9-11 indicate the ranking performance of each algorithm on the CEC05 and CEC17 benchmark test sets respectively.
In CEC05 benchmark, ESOA reached first place under both ELO rankings and maintained scores above 1450 (ELO applies benchmark score as [1500, 1450, 1400, 1350, 1300, 1250]), and their performance at CEC17 was consistent. ESOA continues to show leadership in the CEC05 test set with scores of 29+ and first place in all CEC17 results under TrueSkill's evaluation metrics.
In conclusion, this section revealed ESOA's properties under various test functions. The sit-and-wait strategy in ESOA allows the algorithm to perform fast descent on deterministic surfaces. ESOA's aggressive strategy ensures that the algorithm is extremely exploratory and does not readily slip into local optima. Therefore, ESOA has shown excellent outcomes in both exploration and exploitation.

Typical Application
In this section, ESOA is utilized on three practical engineering applications to demonstrate its competitive capabilities on optimization constraint problems. We compare not only ESOA with the original metaheuristic algorithm used in the previous section, but also with some improved variants, such as IWHO [88], QANA [46], L-Shade [59], iL-Shade [89] as well as MPEDE [90]. The results show that although the improved variant of the algorithm is able to achieve better optimization, it still falls short in terms of the adaptability of the constraints, in contrast, ESOA is comfortable with all constraints. Although some methods perform very well in CEC test functions, they may show weak results when applied to real scenarios or applications, which is because each optimisation method has its own aspects that are suitable and is not exhaustive.
In order to simplify the computational procedure, a penalty function is adopted to integrate the inequality constraints into the objective function [91]. The specific form is as below,f wheref (x) is the transformed objective function and φ is the penalty parameter while f (x) and g j (x) is the origin objective function as well as the inequality constraints respectively, j ∈ [1, 2, . . . , p] and p are the number of constraints. sgn(g j (x)) is used to determine whether the independent variable violates a constraint.

Himmelblau's Nonlinear Optimization Problem
Himmelblau introduced a nonlinear optimization problem as one of the famous benchmark problems for meta-heuristic algorithms [92]. The problem is described below, Minimize f (x) = 5.3578547x 2 3 + 0.8356891x 1 x 5 + 37.293239x 1 − 40,792.141 For this problem, the φ in Equation (22) is set to 10 100 , the number of search agents used by each algorithm is set to 10, and the maximum number of iterations is set to 500.
The optimal result is presented in Table 12 while the statistic result from 30 trials for each algorithm is shown in Table 13. PSO is the best performing algorithm in terms of optimal results, with the best result reaching −30,665.5 of variables [78,33,29

Tension/Compression Spring Design
The string design problem is described by Arora and Belegundu for minimizing spring weight under the constraints of minimum deflection, shear stress, and surge frequency [93,94]. Figure 12 illustrates the details of the problem, P is the number of active coils, d is the wire diameter while D represents the mean coil diameter. The mathematical modeling is given below, For this problem, the φ in Equation (22) is set to 10 5 , the number of search agents used by each algorithm is again set to 10, and the maximum number of iterations is set to 500. Tables 14 and 15 show the optimal and statistic results from 30 independent runs for the six algorithms respectively. The average fitness of DE achieves the best result at 0.0127371, whilst ESOA achieves the second best result at 0.0127839. The standard deviation of ESOA outperforms other algorithms, which demonstrates ESOA's exceptional stability. The optimal result of ESOA was 0.0127434 of variables [0.05, 0.317168, 14.0715].

Three-Bar Truss Design
Three-bar truss design was introduced in [95], whose objective is to optimize the weight under the constraints of stress, deflection, and buckling. Figure 13 presents the structure of three bar truss and the parameters to be optimized. The specific mathematical formula is as below, For this problem, the φ in Equation (22) is set to 10 16 , the number of search agents used by each algorithm is again set to 10, and the maximum number of iterations is set to 500.

Conclusions
This paper introduced a novel meta-heuristic algorithm, the Egret Swarm Optimization Algorithm, which mimics two egret species' typical hunting behavior (Great Egret and Snowy Egret). ESOA consists of three essential components: Snowy Egret's sit-andwait strategy, Great Egret's aggressive strategy as well as a discriminant condition. The performance of ESOA was compared with 5 other state-of-the-art methods (PSO, GA, DE, GWO, and HHO) on 36 test functions, including Unimodal, Multimodal, Hybrid, and Composition Functions. The results of which demonstrate ESOA's exploitation, exploration, comprehensive performance, stability as well as convergence behavior. In addition, two practical engineering problem instances demonstrate the excellent performance and robustness of ESOA to typical optimization applications. The code developed in this paper is available at https://github.com/Knightsll/Egret_Swarm_Optimization_Algorithm; https://ww2.mathworks.cn/matlabcentral/fileexchange/115595-egret-swarm-optimizationalgorithm-esoa (accessed on 26 September 2022).
To accommodate more applications and optimization scenarios, other mathematical forms of sit-and-wait strategy, aggressive strategy, and discriminant condition in ESOA are currently under development. the support of EPSRC grant PURIFY (EP/V000756/1), and the Fundamental Research Funds for the Central Universities.

Conflicts of Interest:
The authors declare no conflict of interest.