## 4 Distributed Real-Time Computation Offloading Algorithm Based on MDPSO  
### Modeling the RCO Problem Based on Multi-Player Static Game  
The coherent noise of a channel increases as the number of users occupying the channel rises. Consequently, users require more energy to transmit real-time sensor data, as indicated by Formula (3). Consequently, the offloading benefits of MUs selecting that channel decrease. Based on the above analysis, it can be observed that there exists an evident competitive relationship among MUs in the process of offloading data (selecting offloading channels). Moreover, user requests in any time slot occur concurrently rather than sequentially, which introduces the RCO problem into the realm of multi-player static game theory. In this chapter,discussions will be conducted on this game problem, and the NE solution will be sought based on the multi-dimensional particle swarm method in heuristic algorithms. In the computation offloading problem, as the popularity of tasks does not change due to users being in different coverage areas of MEC, the requests \(\mu_{n}^{t}\) of any MUs in the terminal layer follow the same probability distribution. Additionally, the RCO decision of any MEC server only affects the data upload efficiency and latency of local users. Therefore, the scope of the computation offloading problem can be atomized, with each server making decisions assisted by the cache ring. This can be represented by each server minimizing the real-time energy consumption function \(q_{d,t}(V^{d,t})\). Thus, the optimization problem becomes  
\[ \begin{split}\text{P1:}&\min_{V^{d,t}}q_{d,t}(V^{d,t })=\sum_{n\in\text{N}_{d},k\in\text{U}_{\text{N}_{d}}}\text{Y}_{n,d,k,t}\\ &\text{s.t.}\quad\eqref{eq:m1},\eqref{eq:m2},\eqref{eq:m3} \end{split}  \tag{22}\]  
where \(\text{V}^{d,t}\) represents an N-dimensional discrete random variable, and each dimension corresponds to the RCO strategy \(v_{n}^{d,t}\) of user \(n\). The effectiveness of a decision is quantified by the difference between the user's computational energy consumption and communication energy consumption. The offloading benefit for user \(n\in\text{N}_{d}\) is defined as  
\[\Gamma_{n}(v_{n}^{d,t})=\text{sgn}(v_{n}^{d,t})(\xi\frac{\phi_{k} ^{3}}{\tau^{2}}-\psi_{n}\frac{\theta_{k}+(1-\epsilon_{k}^{t})\omega_{k}}{b \log(1+\frac{\zeta_{n}\psi_{n}}{\sum\limits_{m=(\{0-n\},d,t}^{d,t}-\omega_{n} ^{d,t}}\zeta_{n}\psi_{m}+\sigma^{2})}), \tag{23}\]  
where \(\Gamma_{n}(v_{n}^{d,t})>0\) represents that implementing the offloading strategy \(v_{n}^{d,t}\) can conserve energy for MUs in comparison to local computations. It is evident that the total offloading benefit \(\sum_{n\in\text{N}_{d}}\Gamma_{n}(v_{n}^{d,t})\) for the local user cluster of server \(d\) is inversely proportional to the real-time energy consumption function \(q_{d,t}(V^{d,t})\), which implies that  
\[q_{d,t}(V^{d,t})\propto\text{1}/\sum_{n\in\text{N}_{d}}\Gamma_{n}(v_{n}^{d,t}). \tag{24}\]  
In further analysis, we deduce that for user \(\forall n\in\text{N}_{d}\), the selection of channel \(f\in F\) for transmission introduces coherent noise \(\sum_{m\in\{Q-n\},v_{n}^{d,t}=v_{n}^{d,t}}\zeta_{m}\psi_{m}+\sigma^{2}\) impacting both the individual benefit \(\Gamma_{n}(v_{n}^{d,t})\) and the overall energy consumption \(q_{d,t}(V^{d,t})\). This suggests that the RCO strategy \(v_{n}^{d,t}\) of user \(n\), in conjunction with other users' RCO strategies \(\text{V}_{n-}^{d,t}=\text{V}^{d,t}-\{v_{n}^{d,t}\}\), formed a multi-player static game problem [31]. Consequently, this game can be characterized as  
\[\mathcal{G}=\Big{\langle}\text{N}_{d},\{\text{ P}_{n,t}\}\,\Gamma_{n}(v_{n}^{d,t})\Big{\rangle}, \tag{25}\]  
where \(\text{N}_{d}\) represents the set of players, \(\{\text{ P}_{n,t}\}\) symbolizes the pure strategy set of player \(n\), and \(\Gamma_{n}(v_{n}^{d,t})\) denotes the offloading payoff compared to local computing. However, it is known that not all finite-strategy static games have pure-strategy Nash equilibrium.