An Improved Cuckoo Search Algorithm for Maximizing the Coverage Range of Wireless Sensor Networks

The issue of increasing the range covered by a wireless sensor network with restricted sensors is addressed utilizing improved CS employing the PSO algorithm and opposition-based learning (ICS-PSO-OBL). At first, the iteration is carried out by updating the old solution dimension by dimension to achieve independent updating across the dimensions in the high-dimensional optimization problem. The PSO operator is then incorporated to lessen the preference random walk stage's imbalance between exploration and exploitation ability. Exceptional individuals are selected from the population using OBL to boost the chance of finding the optimal solution based on the fitness value. The ICS-PSO-OBL is used to maximize coverage in WSN by converting regional monitoring into point monitoring utilizing the discretization method in WSN. In the experiments, the ICS-PSO-OBL with the standard CS and three CS variants (MACS, ICS-2, and ICS) are utilized to execute the simulation experiment under different numbers of nodes (20 and 30, respectively). The experimental results reveal that the optimized coverage of ICS-PSO-OBL is 18.36%, 7.894%, 15%, and 9.02% higher than that of standard CS, MACS, ICS-2, and ICS when the number of nodes is 20. Moreover, it is 16.94%, 9.61%, 12.27%, and 7.75% higher when the quantity of nodes is 30, the convergence speed of ICS-PSO-OBL, and the distribution of nodes is superior to others.


Introduction
Wireless sensor network (WSN) comprises a self-organizing distributed system composed of numerous small sensor nodes, each equipped with wireless communication and computational capabilities 1 .These nodes gather various data types within the monitored region, such as sound and temperature.Subsequently, this data is transmitted to a central management center for in-depth statistical analysis and processing 2 .The effectiveness of WSN heavily relies on their coverage, which plays an integral role in their overall performance.Consequently, addressing the coverage optimization challenge in WSN involves strategically deploying sensor nodes throughout the designated monitoring area while maintaining network connectivity 3 .Hence, It has been a research focus to maximize coverage of the region with a small number of sensor nodes, and Swarm Intelligence (SI) Algorithms, which can find an approximate solution https://doi.org/10.21123/bsj.2024.9707P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal to the optimization problem in an acceptable time 4 , provide a means to address the issue of WSN coverage optimization.Currently, SI has produced beneficial achievements in the area of WSN coverage optimization 5 .Duan et al. used the sparrow search algorithm (SSA) to optimize network coverage.Compared to the standard SSA, the upgraded SSA balances network coverage, energy use, and coverage redundancy 6 .As a way to tackle the Maximum Coverage Set Scheduling (MCSS) problem, Mottaki et al. suggested a hybrid approach by combining genetic algorithm (GA) and tabu search.Experiments reveal that the new algorithm is more effective in locating the nearly ideal scheduling coverage set 7 .He et al. introduced a novel model for optimizing the coverage of WSN.This model elevates the improved marine predator algorithm's efficacy by amalgamating a multi-echelon stochastic leadership approach with a dynamically adjustable inertia weight strategy 8 .
There are various SI algorithms available for solving WSN coverage optimization problems.Musa et al. concludes his article by comparing the Cuckoo Search (CS) algorithm with various SI algorithms (e.g., GA, ACO, PSO, and so on), and concludes that CS performs better with respect to the relative ones 9 .Therefore, it is a useful attempt to apply CS to the WSN coverage optimization problem.
The CS, a relatively recent swarm intelligence optimization technique, has gained widespread popularity in various domains, its broad adoption can be attributed to its robust global search capabilities, limited control parameters, and high applicability 10,11 .Scholars have made various improvements to the standard CS in terms of its parameter configuration and combining it with other algorithms in response to the problems of unbalanced exploration and exploitation capacity, readily prone to local optimal, and mutual interference between dimensions of overcoming challenges in high-dimensional optimization.Ye et  al. proposed an innovative CS referred to as ICS-ABC-OBL.
In this approach, they synergistically integrated an ABC algorithm with opposition-based learning (OBL), resulting in improved system performance and the effective mitigation of the early convergence issue 12 .Nonlinear inertia weights and differential evolution (DE) are combined in Zhang et al.'s proposed improved CS (CSDE).The nonlinear inertia weights ensure that the algorithm makes it difficult to enter the local optimum, and the DE operator successfully enhances the information interchange between algorithm individuals.Through trials, the performance of CSDE is improved 13 .Due to the results, Li et al.'s proposed improved cuckoo search method significantly increases the algorithm's convergence accuracy and speed.It is based on elite OBL and the golden sine operator 14 .By making these changes, the conventional CS's shortcomings were improved and its ability to solve optimization issues will be enhanced, and all of them have achieved good results.Therefore, it is a valuable attempt to propose and apply an improved CS to WSN coverage optimization.
This study of this paper could be separated into three phases to fulfill this goal.First, an improved CS using PSO operator and OBL, namely ICS-PSO-OBL, is used to balance exploration and exploitation capabilities and enhance the susceptibility to local optima and interference among dimensions.Then, the coverage of WSN is modeled by transforming the area into point monitoring using a discretization.Finally, in terms of performance validation, ICS-PSO-OBL is compared with CS and CS variants through simulation experiments when the number of nodes is 20 and 30, and the experiments show that ICS-PSO-OBL can be more effectively applied to the network coverage problem to improve the quality of network node coverage, which demonstrates the practicality.
The remainder of this text is divided into the following sections.The key ideas discussed in this study, including WSN and the CS, are reviewed in Section 2. In Section 3, a thorough explanation of the planned ICS-OBL-OBL is given.In Section 4 and Section 5, the optimization of ICS-PSO-OBL is tested, and Section 5 applies it to the coverage optimization problem of WSN.A summary of Section 6's major conclusions and contributions comes at the end of the section.https://doi.org/10.21123/bsj.2024.9707P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal

Related notions
Sensor network node coverage model The monitoring area of the WSN is characterized as a rectangular region with a length denoted as L and a width denoted as W, resulting in a total area of L ×W.Inside this monitoring region, n sensor nodes are distributed randomly.This n-node set is referred as as A={A i =(x i ,y i ) | i=1,2,…,n}, where each node A i is characterized by its coordinates (x i , y i ).The sensor nodes in the network employ a Boolean sensing model, meaning that they could detect events or targets within a certain distance and could not sense anything beyond that distance.Each node's sensing radius is represented by the letter R, indicating the radius of the circular region centered at the node within which it could sense events or targets.Furthermore, each node has a communication radius denoted as r, representing the maximum distance over which it could establish wireless communication with other nodes in the network.
To determine the network coverage, the monitoring area is discretized into L × W cells of equal size.
The center point of each cell represents a monitoring point, and the set of these monitoring points is denoted as B={B j =(x j ,y j ) | j=1,2,…,L×W}.
As illustrated by Eq.1, the Euclidean distance serves as the metric for determining the separation between a monitoring point and a sensor node.
The probability of a monitoring point Bj is sensed by a sensor node Ai, given that the sensing radius of the nodes is R, is represented by Eq.2.In this equation, Bj is considered to be sensed by Ai if it falls within the circle centered at Ai with a radius of R.
Each monitoring point, denoted as Bj, has the potential to be detected by multiple sensor nodes, labeled as Ai.The collective sensing probability, quantifying the likelihood that Bj will be detected by at least one of the sensor nodes Ai, is precisely defined in Eq.3.
( all ,   ) = 1 − ∏ (1 − (  ,   )) =1 3 The coverage area is established as the summation of the joint sensing probabilities across all monitoring sites, with A all representing the entire ensemble of sensor nodes within the region.
The coverage rate (Cr) is then formally defined as the proportion of the coverage area in relation to the overall area of the region, as depicted in Eq.4.

Standard CS
CS is an intelligent search algorithm that combines the brood parasitism behavior of cuckoos and the L évy flight pattern observed in insects like fruit flies.
The principle of CS is to map the cuckoo's brood parasitism behavior to the solutions in the algorithm's population space, using the quality of the cuckoo's nest as a measure of the solution's fitness.To establish a correlation between the brood parasitism behavior, three idealized rules are taken into account 15 : Assumption 1: Only one egg is laid by each cuckoo at a time, and the nest chosen for incubation is at random.
Assumption 2: From a random selection of nests, the one situated in the best location is retained for the subsequent generation.
Assumption 3: The probability Pa denotes the possibility that a host bird will come into contact with a foreign egg, and the number of nests is constant.Upon such an encounter, the host bird can choose to abandon the foreign egg or initiate a new nest.
In accordance with these assumptions, the fundamental process of the standard CS algorithm unfolds as follows: Step 1: Set the parameters for the algorithm and define the problem.
Step 2: Generate N nests in the D-dimensional Step 3: Lévy flight updates the nest positions.
Assume that the position of the ith nest is , 1 , for the tth generation of nests t i x by Eq.6 to obtain the t+1th generation of nests where  is the step control volume;  is the point-to-point multiplication.
are calculated through Eq.8: Step 4: Preference random wandering.Following the removal of a portion of the solutions using a specific probability termed the discovery probability (Pa), the algorithm proceeds to generate an equal number of new solutions based on Eq.9.
During this process, it evaluates the nest information subsequent to the update while preserving the existing optimal nest information.
where r is a scaling factor obeying a (0,1) uniform distribution, and xgt and xkt are two randomly selected nests in the population of the tth generation.
Step 5: The algorithm's evaluation hinges on the fulfillment of the termination condition.The algorithm completes and outputs the optimal value if the termination condition is satisfied.Conversely, if the termination condition remains unsatisfied, the process advances to step 3, and iteration persists.

ICS-PSO-OBL algorithm
It is clear from examining the conventional CS's iterative approach that the optimization process is bifurcated into two distinct phases: global search and local search.The algorithm largely relies on Lévy flights to investigate and locate the best answer during the global search.The approach uses a differential operation between two randomly produced solutions during the local search phase to further focus the search.
Nonetheless, the CS faces a challenge in balancing exploration and exploitation.This predicament arises from the pronounced randomness associated with Lévy flights and the relatively limited local search capabilities stemming from the differential operation.Additionally, in high-dimensional optimization problems, there is interference between different dimensions, further complicating the search process.
The proposed improved CS using PSO operator and OBL (ICS-PSO-OBL) is used to address these challenges and better balance global and local search due to following three improvements.

Integration with PSO Operator
The PSO algorithm will retain two sets of information, the personal optimum and the global optimum, to guide the particle-in search during the run 16 .This search method has a stronger local search capability compared with the CS's double stochastic solution as a difference search method.https://doi.org/10.21123/bsj.2024.9707P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal So in the preferred random wandering phase of CS, an adaptive inertia weight PSO operator is used to replace the differential operation between two randomly generated solutions to enhance the local optimization capability.
For the i th individual in the t th generation, its position is updated by the following formulas (10)  and (11).
Where, vit, vit+1 represent the speed of the ith individual in the tth and t+1th generation, respectively; xit, xit+1 represent the position of the i th individual in the t th and t+1 th generation, respectively; pbest i t represents the optimal value of the i th individual from the 1st generation to the t th generation; gbest i t represents the optimal value among all individuals in the t th generation; c 1 , c 2 are learning factors , representing the "self-awareness" and "social awareness" of the individuals in the algorithm; r 1 and r 2 are random numbers between [0,1];  is the inertia weight, which determines how the speed of the next generation is influenced by the speed of the previous generation.The variance, i.e., the aggregation of individuals in the population, is updated adaptively.As the iterations continue, when the algorithm starts to converge, i.e., the variance decreases, the distribution of individuals in the population gradually concentrates and the population diversity decreases,  increases accordingly at this time to avoid premature convergence of the algorithm, and  is updated in the following way.
where E is the fitness variance for the entire population as determined by Eq.14.
Where，   i fx is the adaptation value of the current ith individual; is the average adaptation value of all current individuals.

OBL Strategy
OBL is a search strategy that compares the separation between a point and a random point in its opposite position and the optimal solution, recursively halving the search interval to search for the optimal solution faster 17.ICS-PSO-OBL incorporates the OBL strategy to broaden the search space exploration and enhance the population's diversity.To further solve the problem of substantial computational effort caused by the OBL strategy to form the reverse solution for all individuals in high-dimensional optimization problems, ICS-PSO-OBL divides the elite individuals by fitness value and only performs the reverse solution operation on the elite individuals to reduce the computational effort and improve the search efficiency.
Let the set , , , be the elite individuals in the current cuckoo population, and its corresponding inverse solution , , , is calculated using Eq.15: Where:  is denoted as the dynamic boundary of the search space in the jth dimension, xj, yj are the upper and lower bounds respectively, which could be calculated by x j =min(B i , j ),y j =max(B i , j ).

Dimension-by-dimension Updating
When solving multidimensional optimization problems using the approach of updating old solutions in all dimensions, one commonly faces the issue of interferences among different dimensions 18 .This means that when the solution is updated, each dimension changes, which may deteriorate the solution's fitness.Consequently, the new solution might be discarded, neglecting the impact of https://doi.org/10.21123/bsj.2024.9707P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal individual dimension changes on the solution's fitness.To address this problem, the strategy of evaluating dimensions one by one (the sequential update evaluation strategy) is introduced to effectively mitigate the coupling phenomenon among dimensions in issues with high-dimensional optimization.The specific strategy is as follows: A new solution is created whenever a value in the t th dimension of a solution is updated by combining it with the vectors of all other dimensions.If the quality of the new solution does not improve, the update in the current dimension is discarded, and the old value from the t th dimension is retained.The evaluation then continues with the t+1 th dimension.
If the quality of the new solution improves, the new value from the t th dimension is retained, and the evaluation proceeds to the t+1th dimension.In the CS, applying the sequential update evaluation strategy in the local search stage effectively utilizes the exceptional information from individual dimensions to guide the current solution in local search, resulting in higher-quality solutions.
The implementation steps for ICS-PSO-OBL are as follows.
Step 2: The process begins with creating a new population, and each individual's fitness is evaluated.Eq.5 stochastically generates the initial population within the search space.
Step 3: Update the positions of all nests using Eq.6-8 and greedily select nests with higher fitness to retain.
Step 4: For each nest, generate a random number in the range of 0 to 1, and compare it with the discovery probability (Pa) to determine the nests that need to be updated.Determine the inertia weight using Eq.12-14 and update the nest positions using the sequential update strategy in Eq.10-11.Greedily select nests with higher fitness to retain.
Step 5: After selecting the top 1/10 individuals based on fitness, generate reverse solutions using Eq.15 and update the current nest positions.Greedily select nests with higher fitness to retain.
Step 6: Output the best solution if the termination condition is satisfied after the current iteration; otherwise, return to Step 3.

Selection of benchmarking functions
Ten benchmarking functions are chosen in this part to evaluate the viability of the suggested ICS-PSO-OBL, and numerical comparisons of the optimization results are made with the standard CS 10 and three other CS variants, MACS 19 , ICS-2 20 , ICS 21 .Each algorithm was optimized independently for each test function 30 times, and a maximum of 1000 iterations was established to assure the test's impartiality and reduce the impact of randomness in the algorithmic optimization process.Table 1 records the selected functions.Table 1 records the selected functions.

Table 2. Initialization parameters of all algorithms.
Initialization parameters for each algorithm CS  Table 3 lists the five methods' outcomes of optimization in a 30-dimensional space for the functions F1-F8 after 1000 iterations, and Table 4 lists the 5-algorithm optimization outcomes in 2-dimensional space for the functions F9-F10 after 1000 iterations.min denotes the optimal value of the algorithms in 30 optimization attempts, mean represents the average value of the algorithms' outcomes over 30 different optimization efforts, while std represents the algorithms' standard deviation.By studying Figs 1-2 and Tables 3-4, the following conclusions may be made.

Optimization test results
For F1, for this kind of continuous single-peaked spherical function with only a unique global minimum, the other algorithms except ICS-PSO-OBL have a gentle downward trend.At the same time, the convergence curve of ICS-PSO-OBL is sometimes horizontal.Sometimes, there is a jump, and the overall shape is a ladder.In addition, ICS has a similar iteration trend compared with the standard CS, which does not show a significant advantage.In contrast, MACS and ICS-2 show significant differences in the iteration trend with the standard CS, which has a faster convergence speed.
For F2, because the values of such functions are distributed in each dimension in a step-like manner and are not derivable at the step boundaries, it is more difficult to the correct direction toward the global optimal solution.All the functions cannot converge stably to the global optimum, in which all four algorithms significantly outperform the standard CS.The ICS-PSO-OBL shows a clear advantage when facing this kind of function, with an iterative tendency that is better than the other three CS variants and a higher search accuracy for the optimum.
For F3, the solution space of such functions will show intense complexity at higher dimensions.However, in the 30-dimensional search space, all four CS variants can be optimized efficiently, among which, ICS-2 decreases faster in the early stage while maintaining similar convergence accuracy with MACS in the later stage; the iterative trend of ICS-PSO-OBL has a slanting trend, which indicates that the dimension-by-dimension updating strategy allows the current optimal solution of ICS-PSO-OBL to be updated efficiently at each iteration.
For F4, MACS, ICS-2, and ICS-PSO-OBL converge to the theoretical optimum within 400 iterations.However, ICS-PSO-OBL combined with the PSO operator significantly outperforms the other two CS variants regarding convergence speed.ICS does not converge to the global optimum, but its convergence trend is still better than standard CS.
For F5, for this kind of test function with multiple extreme points, MACS and ICS-2 with adaptive discovery probability can balance their own local and global search ability, which makes them have strong optimization ability in the face of multiple extreme points, whereas ICS has added the current optimal solution as a guide in the local search phase, which does not show a good effect in the face of this kind of function with multiple extreme points; and ICS-PSO-OBL is not converged to the global optimal value, but it has the optimal iterative tendency.
For F6 and F7, the two test functions are similar, with ample search space and many local minima.However, the performance of ICS-2 is diametrically opposite in F6 and F7: ICS-2 achieves the optimal convergence accuracy in F6.At the same time, the iterative tendency of ICS-2 is even worse than that of the standard CS in F7.The improvement strategies of ICS-2 and MACS may not be as effective as those of the standard CS, suggesting that the improvement strategies of ICS-2 and MACS may not achieve better results when facing such functions with ample search space.Meanwhile, MACS is not as good as standard CS, indicating that the improved strategies of ICS-2 and MACS may not achieve good results when facing this kind of function with ample search space.ICS-PSO-OBL shows a stepwise decrease, indicating that the For F8, ICS-2, ICS, and standard CS show similar iterative trends, with no significant difference in convergence accuracy and convergence speed compared to standard CS, and standard CS has the lowest standard deviation and higher stability compared to ICS-2 and ICS.convergence accuracy and speed of MACS are far higher than those of the CS but still insufficient compared to ICS-PSO-OBL.ICS is similar to ICS-PSO-OBL, which combines PSO operators.Both add the current global optimal solution as a guide during the local search process.However, the addition of the other search strategies of ICS-PSO-OBL leads to the final optimization result of ICS being inferior to that of ICS-PSO-OBL.Inferior to ICS-PSO-OBL.
For F9 and F10, for such low-dimensional test functions, MACS, ICS-2, and ICS all converge stably to the optimal value, compared to which the iterative trend of ICS-PSO-OBL is even worse than that of the standard CS, which suggests that the improvement strategy of ICS-PSO-OBL fails to achieve a better result when facing such low-dimensional test functions.
Overall, in the optimization experiments on 10 test functions, ICS-PSO-OBL has a better iteration trend in the face of high-dimensional test functions and has the best iteration trend, convergence accuracy, and algorithmic stability, except for function F6; however, its improvement strategy is ineffective in the face of low-dimensional test functions and even reduces the convergence accuracy and speed.The above results show that ICS-PSO-OBL, which integrates PSO operator, dimension-by-dimension updating, and opposition-based learning strategy, has more vital optimization ability and stability than the standard CS and the rest of the three CS variants when facing high-dimensional functions, which also verifies the effectiveness of ICS-PSO-OBL from the side.

Parameter setting
To verify the CS's efficiency in solving the WSN coverage issue, the standard CS is used to optimize the problem with the coverage rate (Cr) (Eq.4) as the fitness value.In addition, the MACS, ICS-2, ICS, and ICS-PSO-OBL algorithm are also included for comparison in the same environment to demonstrate the superiority of the ICS-PSO-OBL over the other algorithms.According to reference 3, the experimental parameter settings are created as presented in Table 5.The comparison algorithm is parameterized based on the Table 2. From Table 6, it could be observed that in the case of 20 nodes, the coverage rate of the ICS-PSO-OBL is 18.36% higher than that of the CS, 7.89% higher than that of the MACS, 15% higher than that of the ICS-2, and 9.02% higher than that of the ICS.Similarly, in the case of 30 nodes, the coverage rate of the ICS-PSO-OBL is 16.94% higher than that of the CS, 9.61% higher than that of the MACS, 12.27% higher than that of the ICS-2, and 7.75% higher than that of the ICS.Therefore, the ICS-PSO-OBL consistently achieves higher coverage rates compared to the CS and CS variants, regardless of the number of nodes.

Conclusion
The ICS-PSO-OBL is the foundation of the network coverage approach proposed in this paper.ICS-PSO-OBL effectively balances the algorithm's capability for local and global search, and reduces the interference between dimensions in high-dimensional optimization problems by combining the PSO operator with the dimension-by-dimension update local search method.By choosing elite individuals based on their fitness scores, the algorithm performs reverse solution operations to broaden the search area and increase optimization precision, and its advantages over the other three CS variants are examined by optimization tests with ten benchmark functions.
Finally, the application of ICS-PSO-OBL is extended to address optimization challenges in WSN coverage.Through simulation experiments, it is found that ICS-PSO-OBL could significantly improve the WSN coverage compared to the standard CS and its three variants.It achieves a more uniform distribution of sensor nodes.Moreover, applying ICS-PSO-OBL reduces the number of nodes and lowers deployment costs.

2024, 21( 2
Special Issue): 0568-0583 https://doi.org/10.21123/bsj.2024.9707P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal space using Eq.5 and evaluate the randomly generated nest positions.Retain the information of the best nest: x = LB + rand(D) × (UB − LB) 5 where x is the set of randomly generated nests; The upper and lower boundaries of the search space are, respectively, UB and LB; A D-dimensional random number, rand(D), has values in each dimension ranging from 0 to 1.

7 where
where  is the random step size obtained from the Lévy flight.Due to the relative difficulty of performing integration operations on the Lévy distribution, Lé vy flight is generally simulated by Eq.7. and  are random numbers obeying normal distribution: ω t = ω min + (ω max − ω min ) × D t12Where, t  represents the inertia weight  in the tth generation; maximum of  , respectively; and Dt is the diversity function and calculated by Eq.13.

Fig. 1 Figure 1 .
Fig. 1 represents the average convergence curve of 5 algorithms for functions F1-F8, independently 2024, 21(2 Special Issue): 0568-0583 https://doi.org/10.21123/bsj.2024.9707P-ISSN: 2078-8665 -E-ISSN: 2411-7986 Baghdad Science Journal algorithm has fallen into the local optimum many times, possibly due to the dimension-by-dimension updating strategy to ensure that each dimension has been updated.However, the final combination of PSO ICS-PSO-OBL, which combines the PSO operator, dimension-by-dimension updating, and the opposition-based learning strategy, still achieves the best optimization results.ICS has the lowest standard deviation in function F6, which indicates that it has the highest stability.At the same time, it takes 200 iterations to enter a local optimum in function F7, which makes it ineffective for optimization.
(a)Node count set at 20 (b)Node count set at 30 Figure 7. Optimize coverage of sensor networks using ICS-PSO-OBL.

Fig. 3 Figure 8 .
Fig. 3-7 show that, whether with 20 or 30 sensor nodes, the optimization results of CS, MACS, ICS-2, and ICS algorithms are inferior to that of the ICS-PSO-OBL algorithm.The four algorithms

Fig. 8
Fig. 8 shows that in the optimization of WSN coverage, the standard CS enters a stagnation state too early and gets trapped in local optima for both 20 and 30 sensor nodes.While MACS, ICS-2, and ICS algorithms show effectiveness in optimization, their convergence speed and accuracy are inferior to