# Path Planning of Mobile Robots with an Improved Grey Wolf Optimizer and Dynamic Window Approach
## 2 Standard Gray Wolf Optimization Algorithm and Fitness Function  
### Standard Gray Wolf Optimization Algorithm  
The GWO algorithm is a simulation-based optimization algorithm that mimics social hierarchy and group hunting behaviors observed in gray wolf packs. The algorithm has the advantages of few parameters, simple principles, and strong global search capability [31]. The social hierarchy of gray wolves is a pyramid, divided into four levels: the alpha wolf is the population leader, responsible for decision-making, representing the algorithm's optimal solution; the beta wolf assists the alpha wolf in managing the rest of the pack, representing the suboptimal solution; the delta wolf occupies the third level, responsible for reconnaissance and auxiliary tasks; and omega wolves are the lowest-ranked and most numerous wolves, following the commands of others. The GWO algorithm is divided into three phases: the prey encirclement phase, the prey pursuit phase, and the prey attack phase [32]. The gray wolf pack, as a cohesive unit during the prey encirclement phase, collectively updates its position based on the relative distance to the prey. \[D=\left|CX_{p}(t)-X(t)\right| \tag{1}\]  
\[X(t+1)=X_{p}(t)+AD \tag{2}\]  
where \(D\) is the distance between the prey and the individual gray wolf's current position, \(t\) is the current iteration, \(X_{p}\) is the prey position, and \(X\) is the individual gray wolf's current position. The coefficient vectors \(A\) and \(C\) are expressed as follows:  
\[A=2 ar_{1}-a \tag{3}\]  
\[C=2r_{2} \tag{4}\]  
where \(a\) decreases linearly from 2 to 0 as the iterations progress, while parameters \(r_{1}\) and \(r_{2}\) are random values within the range \([0,1]\). During the prey pursuit phase, each gray wolf calculates the distances to the alpha, beta, and delta wolves based on their current positions. Subsequently, individual gray wolves move closer to the prey using these distance vectors. The position update formula integrates the influence of the leaders with stochastic exploration components, ensuring that the pack remains within the potential vicinity of the globally optimal solution. The position update formula is as follows:  
\[D_{\alpha}=\left| \begin{array}{cc}C_{1}X_{\alpha}-X\end{array} \right|\ \ \ \ \ \ \ \ \ \ \ X_{1}=X_{\alpha}-A_{1}D_{\alpha} \tag{5}\]  
\[D_{\beta}=\left| \begin{array}{cc}C_{2}X_{\beta}-X\end{array} \right|\ \ \ \ \ \ X_{2}=X_{\beta}-A_{2}D_{\beta} \tag{6}\]  
\[D_{\delta}=\left| \begin{array}{cc}C_{3}X_{\delta}-X\end{array} \right|\ \ \ \ \ \ \ X_{3}=X_{\delta}-A_{3}D_{\delta} \tag{7}\]  
\[X(t+1)=\frac{X_{1}+X_{2}+X_{3}}{3} \tag{8}\]  
where \(D_{\alpha}\), \(D_{\beta}\), and \(D_{\delta}\) represent the relative position difference between the current positions of individual gray wolves and those of alpha, beta, and delta wolves, respectively; \(X_{\alpha}\), \(X_{\beta}\), and \(X_{\delta}\) represent the current positions of alpha, beta, and delta wolves, respectively; \(X_{1}\), \(X_{2}\), and \(X_{3}\) are the updated positions of omega wolves based on alpha, beta, and delta wolves, respectively. Finally, omega wolves recalculate the new mean position based on the updated positions. The attacking prey phase is a critical stage in the optimization process, during which the algorithm approaches the global optimal solution with greater precision. As \(a\) decreases, the value of \(A\) changes accordingly. When \(|A|<1\), the gray wolf performs a local search and attacks the prey, and when \(|A|>1\), gray wolves perform a global search and gradually disperse. In summary, the gray wolf optimization algorithm has the following drawbacks:  
1. The initial population of gray wolves in the encirclement phase is randomly generated, and the initial population is unevenly distributed, which negatively affects the exploration ability in the initial phase;
2. \(A\) is an important parameter controlling global and local search, and its value varies with \(a\). The linear decay of \(a\) has limitations;
3.