## 5 Algorithm Design
To be specific, \(x_{l,i}=0\) represents local computing, \(x_{l,i}=1\) means local satellite edge computing, \(x_{l,j}=j,j\in\mathcal{M}\) denotes neighboring satellite \(j\) edge computing. After such coding, Equations (7) and (7) are satisfied. The grey wolves' hunting of prey consists of three phases, i.e., encircling, hunting, and attacking. During the encircling phase, the grey wolves scour the prey, and then approach and encircle it gradually. The distance between \(l\) and the prey \(p\) is denoted by \(\vec{D}=\left|\vec{C}\cdot\vec{X}_{p}(t)-\vec{X}_{l}(t)\right|\), \(\forall l\in\mathcal{N}^{\omega}\), and the updating of \(\vec{X}_{l}\) is \(\vec{X}_{l}(t+1)=\vec{X}_{p}(t)-\vec{A}\cdot\vec{D}\), where \(t\) is the number of iterations, \(\vec{X}_{l}\) is the position of \(l\), \(\vec{X}_{p}\) is the position of \(p\), and \(\vec{A}\) and \(\vec{C}\) are coefficient vectors. \(\vec{A}=2\vec{a}\cdot\vec{r}_{1}-\vec{a}\), \(\vec{C}=2\cdot\vec{r}_{2}\), where \(\vec{a}\) is the convergence factor, which reduces from 2 to 0 linearly as \(t\) increases, \(\vec{a}=2\cdot(1-t/t^{\max})\). Both \(\vec{r}_{1}\) and \(\vec{r}_{2}\) are random vectors in \([0,1]\). \(t^{\max}\) is the maximum number of iterations. During the hunting phase, the grey wolves \(\omega\) identify and track the location of prey according to the command of \(\alpha\), \(\beta\), and \(\delta\). The distance between \(l\) and \(\alpha\), \(\beta\), \(\delta\) are expressed as \(\vec{D}_{\alpha}=\left|\vec{C}_{1}\cdot\vec{X}_{\alpha}-\vec{X}_{l}\right|\), \(\vec{D}_{\beta}=\left|\vec{C}_{2}\cdot\vec{X}_{\beta}-\vec{X}_{l}\right|\), and \(\vec{D}_{\delta}=\left|\vec{C}_{3}\cdot\vec{X}_{\delta}-\vec{X}_{l}\right|\) respectively, where \(\vec{X}_{\alpha}\), \(\vec{X}_{\beta}\), and \(\vec{X}_{\delta}\) are the positions of \(\alpha\), \(\beta\), and \(\delta\) in that order. \(\vec{C}_{1}\), \(\vec{C}_{2}\), and \(\vec{C}_{3}\) are all random vectors. The step length and direction that \(l\) moves forward to \(\alpha\), \(\beta\), and \(\delta\) are \(\vec{X}_{1}=\vec{X}_{\alpha}-\vec{A}_{1}\cdot\left(\vec{D}_{\alpha}\right)\), \(\vec{X}_{2}=\vec{X}_{\beta}-\vec{A}_{2}\cdot\left(\vec{D}_{\beta}\right)\), and \(\vec{X}_{3}=\vec{X}_{\delta}-\vec{A}_{3}\cdot\left(\vec{D}_{\delta}\right)\) respectively. The updating of \(\vec{X}_{l}\) is \(\vec{X}_{l}(t+1)=\left(\vec{X}_{1}+\vec{X}_{2}+\vec{X}_{3}\right)/3\). During the attacking phase, the prey stops moving and the grey wolves attack it. As the value of \(\vec{a}\) decreases from 2 to 0 linearly, the value of \(\vec{A}\) varies within the interval \(\left[-\left|\vec{a}\right|,\left|\vec{a}\right|\right]\). When \(\left|\vec{A}\right|<1\), the grey wolves the prey. When \(\left|\vec{A}\right|>1\), the grey wolves move away from it to find a better one, which is conducive to jump out of the local optimum. In addition to \(\vec{A}\), another search coefficient, i.e., \(\vec{C}\) also helps obtain the global optimal solution. \(\vec{C}\) is composed of random values in \([0,2]\), which can provide random weights for the prey, so that the search of prey by grey wolves has randomness, thus helping to avoid falling into the local optimum. The fitnesses of \(l\), \(\alpha\), \(\beta\), and \(\delta\) are \(U_{l}\), \(U_{\alpha}\), \(U_{\beta}\), and \(U_{\delta}\), respectively. During each iteration, the GWO algorithm compares \(U_{l}\) with \(U_{\alpha}\), \(U_{\beta}\), and \(U_{\delta}\), and then updates \(\vec{X}_{\alpha}\), \(\vec{X}_{\beta}\), \(\vec{X}_{\delta}\), \(U_{\alpha}\), \(U_{\beta}\), and \(U_{\delta}\). When \(t^{\max}\) is reached, \(\vec{X}_{\alpha}\) is the optimal solution to the problem, and \(U_{\alpha}\) is the optimal objective function value. According to \(\vec{X}_{\alpha}\), \(y_{i,0}^{*}\), \(y_{i,1}^{*}\), and \(y_{ij}^{*}\) can be determined. In this paper, we propose an inter-satellite cooperative task offloading scheme based on the GWO algorithm. We make some modifications to the GWO algorithm.