War Strategy Optimization Algorithm: A New Effective Metaheuristic Algorithm for Global Optimization

This paper proposes a new metaheuristic optimization algorithm based on ancient war strategy. The proposed War Strategy Optimization (WSO) is based on the strategic movement of army troops during the war. War strategy is modeled as an optimization process wherein each soldier dynamically moves towards the optimum value. The proposed algorithm models two popular war strategies, attack and defense strategies. The positions of soldiers on the battlefield are updated in accordance with the strategy implemented. To improve the algorithm’s convergence and robustness, a novel weight updating mechanism and a weak soldier’s relocation strategy are introduced. The proposed war strategy algorithm achieves good balance of the exploration and exploitation stages. A detailed mathematical model of the algorithm is presented. The efficacy of the proposed algorithm is tested on 50 benchmark functions and four engineering problems. The performance of the algorithm is compared with ten popular metaheuristic algorithms. The experimental results for various optimization problems prove the superiority of the proposed algorithm.


I. INTRODUCTION
The use of advanced technology in various fields of science is increasing the complexity of the problems to be solved. The shortcomings of traditional optimization techniques resulted in the emergence of the metaheuristic optimization algorithm for solving complex engineering problems. As a result, new optimization algorithms become a ray of hope.
Meta-heuristic methods: Meta-heuristics methods are considered to be global best optimization algorithms and possess several advantages, such as robustness, performance reliability, simplicity, ease of implementation, etc. Meta-heuristic algorithms have been classified into different literary categories, such as: (a) Evolutionary-based algorithms: These algorithms are originated from the theory of evolution.
The associate editor coordinating the review of this manuscript and approving it for publication was Wei Liu.
(b) Swarm-based algorithms: These algorithms emulate the social behavior and the collective decision-making of various social groups. In these algorithms, the explanation for reaching a given objective is usually based on bio-community intelligence and collective action.
(c) Physics-based algorithms: The physics-based algorithms have been influenced by the laws of natural physics (d) Human behavior-based algorithms: Recently optimization algorithms inspired by human beings' social behavior have been proposed in the literature.
(e) Hybrid and advanced algorithms: Hybrid algorithms combine features of two or more optimization algorithms to achieve better results.
Examples of various categories proposed in the literature are given in Table 1.

II. LITERATURE SURVEY
Every algorithm proposed in the literature has its own characteristics and uniqueness in order to achieve the desired VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ objective. Features like adaptive mechanism [54], [55], Chaotics [56]- [58] learning mechanisms [59]- [62], novel mutation strategies [63], [64], fuzzy logic [65], [66], quantum computing [67] etc., are added to the basic algorithms to achieve better convergence and robustness. The original version of PSO has deficiencies when applied to complex functions, such as premature convergence, limiting to local optima, and slow convergence. Aside from slow convergence, GWO has low precision in the majority of problems. Algorithms such as PSO, Jaya, GWO updating mechanisms are based on a global best position, and thus these algorithms may converge to a local optima. Some of the issues/challenges with the existing literature are as follows: i. One of the major issues is that slower convergence and a high computational burden are required to achieve global optimum value. ii. The majority algorithms lack good balance between exploration and exploitation capabilities [33].
iii. Some of algorithms prematurely converge to the local optimum and therefore are not suitable to real-world engineering problems. iv. Another issue is the algorithm's vast number of algorithm-specific parameters and selecting appropriate values entails a significant computational burden.
As per No Free Lunch [NFL] [68], there is no single optimization algorithm which gives satisfactory results for all the optimization problems. Hence the research is still attractive in this domain which results into unearthing of new optimization algorithms by different authors' thought process. This paper proposes a new meta-heuristic optimization technique based on the war strategy. The concept is based on the dynamic movement of soldiers during wartimes. Each soldier continuously updates his position based on the positions of the King and the commander. This war strategy is modeled as an optimization process wherein each soldier dynamically moves towards the optimum value. Each soldier is assigned a rank and a weight. The soldier's weight is updated based on his or her success in improving the attacking force or fitness value. The proposed war strategy algorithm is first tested for the 50 benchmark test functions and four engineering problems. The results obtained are compared with popular metaheuristic algorithms.
The following are the contributions of the proposed algorithm: i. This article proposes a new meta-heuristic algorithm named 'War Strategy Optimization' and in this algorithm, we have developed two war strategies, the first is concerned with attack strategy, while the second is concerned with a defense strategy. ii. The proposed algorithm employs a unique (soldier) updating policy, in which the soldier's current position is determined by the war strategy iii. A new policy for updating the weak soldiers (particles) has been incorporated. iv. The developed algorithm includes an adaptive weight updating policy for each particle as well as a specific weight assignment for each particle. v. The proposed algorithm's performance has been evaluated on 50 benchmark functions, and its results are compared with the popular meta-heuristic algorithms. vi. The proposed algorithm is applied for the design of the engineering models. The paper is organized is as follows: Section-2 gives an introduction to WSO. Section-3 details the mathematical model of the algorithm. Section-4 analyzes the performance of the algorithm on various benchmark functions and engineering problems. Finally, the concluding remarks with the future scope are given in the last section.

III. WAR STRATEGY OPTMIZATION
Ancient kingdoms maintained a military to fight themselves from attacks by other dynasties. The kingdom's army is comprised of various forces such as infantry, chariots, elephants, and so on. During the war, each kingdom devises a strategy known as ''Vyuha'' to attack the opposing army to win the battle and thus establish their supremacy. A Vyuha is a pattern or arrangement of various army troops used to conquer the opposing kingdom during a war [69]. To ensure that their army meets the intended targets and achieves the goal, the emperor and commanders of each unit will coordinate their forces in a specific pattern. The warfare strategy was formulated in light of the mission's objectives, threats, difficulties, and prospects. War strategy is a continuous dynamic process in which armed forces simply coordinate and fight the opposition. This strategy can adapt to changing conditions as the war progresses. The positions of the king and commander have a constant impact on the army soldier's position. The flags on top of the king's and army commander's chariots represent their location, which is observable to all soldiers. Soldiers on the team are trained to follow a strategy based on the sounds of a drum or another musical instrument. When one of the military commanders dies, the strategy changes, and every other commander must learn how to rebuild and continue the war strategy's establishment. The King's target is to conquer the opposing king/leader, whereas the army soldier's main objective is to attack the opposing team and progress in rank.
The various steps involved in the war strategy are as follows:

A. RANDOM ATTACK
In the battlefield, the army troops randomly distribute over the entire battle ground in a strategic manner and attack the opposite army. The strongest of the army personnel with highest attacking force is considered as the army chief or the Commander. The King is the leader of various such army chiefs.

B. ATTACK STRATEGY
The primary objective of this strategy is to attack the opposition. The King takes the lead and guides the army troops. Army troops identify the weak positions (promising search space) of the opponent and continue to attack. The King and the Commander travel in two different chariots strategically with flags at the top. The Soldiers dynamically change their position based on the positions of the king and the Commander. If a soldier is successful in improving his attacking force (fitness value), his rank will be improved. As the soldier advances, he will serve as a good example for the others. However, if the new position is not suitable to fight, the soldier moves back to his previous position. At the beginning of the war, army troops move in all directions and takes large steps to change their position.

C. SIGNALING BY DRUMS
The King changes the strategy dynamically based on the prevailing situation in the battle ground. Accordingly, a group of soldiers beat the drums with a rhythm. The soldiers will change their strategy and adjust their positions based on the rhythm of the drums.

D. DEFENSE STRATEGY
The primary objective of this strategy is to protect the King without losing the battle. The commander or the Army chief takes the lead and forms like a chain and surround the King by using the army troops. Thus, every soldier changes the position based on the positions of the nearby soldier and the king position. Army troops try to explore a large area of war field (search space) during the war. To confuse the opposing army, the army dynamically changes its strategy from time to time.

E. REPLACEMENT/RELOCATON OF WEAK SOLDERS
During the battle, the soldier whose combat skills is lowest or an injured soldier can be treated as good as an enemy soldier. With his poor performance, the credibility of the Army altogether is at stake (algorithm efficiency). Few soldiers die during the war and this may impact the result of the war. Here there are two options available with the army. One is replacing the injured/weak soldiers with new soldiers. The second option is to relocate the weak soldier. Hence, he will be guided (mean position of all the soldiers) and insulated by all the other soldiers to protect him and thereby maintain the army morale and making the chances of winning in the war battle high.

F. TRAPS BY OPPOSITION
The opposing army employs a variety of strategies, depending on its capabilities, to force the former army to move in the wrong direction or to reach the wrong target (local optima).

IV. MATHEMATICAL MODEL OF THE WAR STRATEGY
At every iteration, all the soldiers have equal probability to become either King or Commander depending on their Combating Strength (Fitness Value). Both the King and the Commander act as Leaders in the War field. The movement of the King and the Commander in the War field will guide the rest of the soldiers. There is a possibility for either the King or the Commander to face stiff competition from the opponent's soldier (Local Optima) who has enough strength to trap the Leaders. To avoid this, soldiers in war will be guided not only by the King's or Commander's position, but also by their combined movement tactics.

A. ATTACK STRATEGY
We have modeled two war strategies. In the first case, every soldier updates his position based on the positions of the King and the Commander. This updating mechanism of the attack model is illustrated in Figure 1. The king assumes an advantageous position to launch a massive attack on the opposition. As a result, the soldier with the greatest attack force or fitness is regarded as the king. All soldiers will have the same rank and weight at the start of the war. If the soldier successfully executes the strategy, his rank rises. However, as the war progresses, the ranks and weights of all soldiers will be updated based on the strategy's success. As the war nears its conclusion, the position of the King, Army commander, and soldiers remain very close as they approach the target.
where, X i (t + 1) is the new position, X i is the previous C position, is the position of the commander, K is the position of the king, W i is the weight.
The colored circles round the soldier in Figure 1 represents of locus points of W i × k − X i (t) based on the King position.
is beyond the king position and the hence the updated position of the soldier is beyond the commander position. If W i < 1, then position of W i × k − X i (t) is in between the king position and the soldier current position. The updated position of the soldier is closer when compared to the previous case. If W i tends to zero, then updated position of the soldier moves very close to the commander position which represents the final stage of the war.

B. RANK AND WEIGHT UPDATION
The position update of each search agent depends on the interaction of the position of the King, the Commander and the rank of each soldier. The rank of each soldier depends on his success history in the war field governed by equation (4) which will subsequently influence the weighing factor W i . The rank of each soldier reflects how close the soldier (search agent) is to the target (fitness value). It can be noted that the weighing factors in other competitive algorithms like GWO, WOA, GSA, PSO will vary linearly whereas in the current proposed WSO algorithm, the weight (W i ) varies exponentially as a factor of α.
If the attack force (fitness) in the new position (F n ) is less than that of the previous position (F p ), the soldier takes the previous position.
If the soldier updates the position successfully, the rank R i of the soldier will be upgraded Based on the rank, the new weight is calculated as: The second strategy position update is based on the positions of King, the army head and a random soldier. Whereas the ranking and weight updating remains same.
This war strategy explores more search space when compared to the previous strategy as it involves the position of the random soldier. For large values of W i , soldiers take large steps and update their position. For small values of, W i soldiers take small steps while updating the position.

D. REPLACEMENT/RELOCATION OF WEAK SOLDIERS
For every iteration, identify the weak soldiers having worst fitness. We have tested multiple replacement approaches. One simplest approach is replacing the weak soldier with a random soldier as given in (6).
The second approach is relocating the weak soldier closer to the median of entire army in a war field as given in (7). This approach improves the convergence behavior of the algorithm.
E. SALIENT FEATURES OF THE PRPOSED ALGORTHM i. The proposed algorithm achieves good balance between exploration and exploitation. ii. Each solution (soldier) has a unique weight based on his rank. iii. The weight of each soldier is updated if the soldier successfully improves his fitness in the updating step. Thus, the weight updating purely depends on the particle position relative to King's and commander position. iv. The weights will vary nonlinearly. The weights vary in large values during the early iterations and vary in small values during the last iterations. This leads to faster convergence to the global optimum value. v. The position updating process involves two stages. This improves the exploration capability to the global optimum solution. vi. The proposed algorithm is simple and requires a less computational burden.

F. EXPLORATION AND EXPLOITATION
The exploration (for global optima) and exploitation (for convergence) are the two main criteria for any metaheuristic optimization algorithms [70]. A good trade-off between these two phenomena will make the algorithm more robust and efficient. Attack strategy represents the exploitation while defense strategy represents the exploration. The other major factors which influence the exploration and exploitation capability of the proposed algorithm are: i. Firstly, the variable 'rand' which can take any value randomly between '0' to '1'. This 'rand' variable decides whether the soldier moves is to be exploration oriented or exploitation oriented. ii. Secondly, the factor ρ r helps the user in giving flexibility to choose a value depending on the objective function. From the experiments performed on different test functions, it is inferred that a low value of ρ r in the range of (0-0.5) suits best for the unimodal functions and the values in the range of (0.5-1) suits best for multimodal functions. iii. Thirdly, the movement of the search agent in the direction of X rand makes the algorithm more explorative to search the prominent areas in the search space so as to settle at the global optima. iv. Lastly, W i factor influences the direction of the search agent towards the best possible location. W i makes the search agents move globally and do exploration and as the search process advances and reaches final stage, it will make the search agents to be exploitative. The flow chart for the proposed war strategy optimization algorithm is shown in Figure 2. The weights assigned to each soldier are adaptive and changes from iteration to iteration. The soldier with a large fitness level will have less weight and the soldier with less fitness will have a large weight. At the start of the war, every soldier takes large steps, and their weight varies in large steps. As the war nears its conclusion, the soldiers take small steps to reach the goal, and the weight varies in small steps. Because the strategy is chosen at random, the soldiers move in a random direction and do not precisely follow the king. This improves the algorithm's exploration capability. The target area is identified by army troops at the end of the war (prominent search space). Army troops surround the target as well as the King and Commander are very close to the target. Thus, from equations (1) and (5), the entire troop moves in small steps and converges to the target position. Thus, we can say that the algorithm possesses the exploitation feature also.

G. THE PSEUDO CODE OF WAR OPTIMIZATION ALGORITHM IS GIVEN AS FOLLOWS
See Algorithm 1.

V. RESULTS AND DISCUSSION
The robustness and convergence efficiency of the proposed war strategy optimization (WSO) algorithm was tested on 50 benchmark functions and four different engineering problems.

A. RESULTS ON BENCHMARK TEST FUNCTION
A comprehensive set of benchmark functions with a good combination of features such as Unimodal & multimodal, variable/fixed dimensions, separability, and continuity is used to assess the versatility of WSO. The proposed WSO algorithm is evaluated on the 50 benchmark test functions. Out of 50, first 25 functions are Unimodal function and remaining 25 are multimodal functions. The complete details of the functions are given in Table 12 and 13.

B. PARAMETER SELECTION
General setting for ρ r is 0.5. However, for unimodal test functions like {F 1 , F 2 , F 3 , F 4 } the parameter ρ r is set to 0.1 and Multi-modal functions like {F 26 , F 28 , F 29 , F 30 } , ρ r is set to be 0.95. The general setting of W i is 2×ones (1, S) and this can be adjusted on the need basis. The results are analyzed based on the features of exploitation, exploration, convergence, search history, trajectories etc,

C. COMPARISON WITH POPULAR METAHEURISTICS ALGORITHMS
To prove the efficacy and robustness of the proposed algorithm; it is compared with eleven state of the art and popular metaheuristic algorithms. The algorithms used for comparison are PSO [71], GA [1], DE [2], GWO [7], ALO [8], Chimp [21], MVO [72], JS [73], SSA [10], SDCS [74], DA [93]. The parameter settings for these eleven algorithms and maximum function evaluations are given in Table 2. For   (2) Update the rank and weight of each soldier based on the success using equation ( Table 3 and Table 4. The bold values in the tables represents the best optimum values obtained for a given benchmark function when compared to other algorithms. One can clearly visualize from the Table 3 that WSO dominates other metaheuristic algorithms in the list in the case of Unimodal functions. In the case of multimodal functions, the WSO algorithm performs similarly to the influential SDCS algorithm.

D. PERFORMANCE ANALYSIS OF THE WSO ALGORTHM
The performance of the algorithm is analyzed by testing the algorithm under various conditions to project the salient features/uniqueness of the proposed WSO algorithm. As discussed in section 3.4, one of the main reasons for faster convergence is adaptive weight mechanism assigned to each soldier. To understand the importance of this weight assign mechanism, we have examined the algorithm with multiple operating cases. i. A constant weight for all soldiers for all iterations ii. A linearly varying weight which is same for all soldiers iii. A nonlinear varying weight which varies from soldier to soldier based on the success in the position updating process For case-1 for test function F26, the average function value for 30 runs is 1.38E-01. Whereas for case-2, the average function value is 4.57E-03. However, in the third case, it is 1.273E-05.
Another unique feature of the WSO algorithm is replacement/relocation of weak soldiers. To examine this feature, we have tested the algorithm for three cases.
i. Algorithm without replacement feature ii. Algorithm with replacement feature given in (6) iii. Algorithm with replacement feature given in (7) The average function values with 20 runs on test function F26 for the three cases are 2.89E+02, 1.27E-05, 2.68E+02 respectively. The test results on test function F31 gives the function values for the above three cases as 4.89E-05, 3.18E-12, 7.77E-62 respectively. The test results on test function F1 gives the function values for the above three cases as VOLUME 10, 2022   3.78E-123, 0.00E+00, 5.97E-255 respectively. This proves that replacement strategy is another unique feature of the algorithm. For most of the test function, replacement strategy given in (7) works superior. Research engineers who apply this algorithm for design of practical systems must wisely choose the relocation strategy.

E. SENSITIVITY OF CONTROL PARAMETERS
Selection of suitable algorithm specific parameters is important as it decides the overall performance of the algorithm. Now the performance of the WSO algorithm is analyzed with different parameter variations. For optimization functions like {F3, F8, F15}, the impact of the parameter variations is negligible. However, on certain functions the impact is high. The most dominant parameter which impacts the global optimum selection is ρ r . The impact of variation of the parameter ρ r is shown in Figure 5 and Figure 6. From this we can clearly understand for low values of ρ r (attack strategy) represents the exploitation phase and higher values of ρ r (defense strategy) represents the exploration phase. For robust performance of the algorithm requires a good balance between exploration and exploitation. The impact of other parameters on the performance of the algorithm is negligible.

F. ANALYSIS ON EXPLORATION AND EXPLOITATION CAPABILITIES
Exploration refers to the search for the global optimum by exploring a large search space, whereas exploitation focuses on previously discovered local area possibilities for convergence into an optimal solution. A meta-heuristic algorithm will frequently start with more exploration and less exploitation. However, as the search progresses to the final moment, this feature reverses.
The exploitation capability of the WSO is evaluated with 25 unimodal test functions. For the first 16 functions i.e., F1-F16 outperform other algorithms for the variable dimension functions. Even for the fixed dimension problems,    factors embedded in the algorithm for improving the exploration capability of the WSO algorithm. To illustrate the exploration capability of the proposed algorithm, search history is recorded for selected multimodal function as depicted in Figure 3 C. The search history of various functions visualizes the exploration capability of WSO algorithm.

G. ANALYSIS CONVERGENCE BEHAVIOUR
Convergence is one of the prominent features in evaluating the performance of any population based meta-heuristic algorithm. The positions of the soldiers take large steps in the proposed WSO algorithm and this helps in improving the exploration of the large search space. As the iterations       agents (soldiers) takes large steps initially and takes small steps as they converges to optimum position. The search history at 2nd iteration, 50th iteration, 100th iteration and 150th iteration for selected functions are illustrated in Figure. From these figures, we can understand that as iterations increases the search space scale down to the global optimum point. Convergence curves shown in Figure 4 for selected functions prove that WSO converges faster as compared to other algorithms. Nonlinear weight function is the main reason for faster convergence of WSO algorithm. Thus we can conclude that the proposed WSO possess good convergence behavior.

H. SCALABLITY ANALYSIS
The efficacy of the proposed WSO is evaluated by testing the algorithm on variable dimension unimodal and multimodal functions with dimensions 50, 500 and 1000. The average, mean and standard deviation values are recorded in Table 5. After analyzing the results, it has been observed that the efficiency of the algorithm is same irrespective of the dimension of the problem and thus We can conclude that increasing the dimension has little impact on the algorithm's performance.

I. STATISTICAL ANALYSIS and COMPARISON
The performance of the WSO algorithm is compared with other algorithms using Wilcoxon rank sum test. The comparison results for Unimodal and multimodal functions are recorded in Table 6. The p-values are corrected to avoid type I errors following Bonferroni-Holm procedure [94], [95]. From the table it is evident that the p-values are less than 0.05. This clearly shows that WSO algorithm outperforms other algorithms.

J. TIME COMPLEXITY ANALYSIS
The proposed WSO algorithm is simple and takes lesser time for computing the optimized solution. The average run time is calculated for one benchmark function for different dimensions and the same is compared with different optimization algorithms. The average running time for different dimensions is illustrated in Figure 8. WSO runs faster to the compared algorithms. The run time increases with increase in dimension of the search space. The time complexity of the proposed WSO algorithm is calculated with big-O notation. The computational complexity of initialization is O(N×D), function evaluation is O(N) and position update is O((N+1)×D) and thus the overall complexity is O((N+1)×D×Max-iter).

K. ANALYSIS OF WSO FOR ENGINEERING DESIGN PROBLEMS
Many engineers nowadays use meta-heuristic algorithms to achieve optimum values for problem engineering VOLUME 10, 2022  designs/plans. In this section, we applied the WSO algorithm to four classic engineering design problems and compared its performance to that of other popular metaheuristic algorithms. For dealing with the constraints, we used a simple death penalty function-based approach.

i. Tension Spring Design Problem
The primary objective here is optimal spring design with three design variables and four constraints. The performance of WSO is compared with other popular metaheuristics algorithms in terms of worst, best, mean and standard deviation and the statistical results are presented in Table 7. From the results, we can understand that the proposed WSO algorithm outperform other algorithms, ii. Welded Beam design Problem In welded beam design problem, the key objective is to minimize the manufacturing cost of the welded beam. The simulation results for the welded design problem are shown in Table 8. The comparison results show that WSO algorithm rank first when compared to other algorithms.

iii. Speed Reducer Design Problem
Weight minimization is the objective of this problem. The comparison results with other metaheuristic algorithms are presented in Table 9. The comparison results show the efficacy of the proposed method when compared to other algorithms. iv. Pressure vessel Design The objective for this engineering problem is to minimize the cost in the design of a pressure vessel. The statistical results shown in Table show the superiority of the algorithm.
v. Three-bar truss design The objective of this problem is to design a three-bar truss with minimum weight. The design includes a selection of two optimal parameters and the results are shown in Table 11.

VI. CONCLUSION
A new stochastic optimization algorithm 'War Strategy Optimizatio' inspired by the ancient war strategies has been proposed in this paper. In this algorithm, two war strategies have been developed to update the current position of the soldier. An adaptive weight mechanism has been introduced in the algorithm which varies from one solution (soldier) to another solution and is updated based on the rank achieved by the soldier during the updation stage. The proposed algorithm was tested with 50 benchmark test functions and has shown a significant performance when compared with the popular meta-heuristic algorithms in the literature. WSO algorithm achieves good tradeoff between exploration and exploitation stages. The proposed war strategy optimization algorithm can be developed with a multi-objective feature in future studies and can be applied for multi-objective functions.