# A Learning Game-Based Approach to Task-Dependent Edge Resource Allocation
## 7 Simulation Results
### Performance Analysis of the Incentive Mechanism Algorithm Based on Learning Games  
This section presents the convergence analysis of the reinforcement learning algorithm based on learning games using two edge servers as an example. Additionally, a comparison is made between the proposed algorithm and the A2C algorithm proposed in reference [41]. A2C estimates the goodness of agent actions using an advantage function, and it updates network parameters using policy gradients to learn strategies that result in higher rewards. Furthermore, we introduce the greedy algorithm and random method as baselines through which to evaluate the performance of the proposed algorithm.  
The convergence plots of the user and edge server utilities are shown in Figure 5a-c. From the graphs, it can be observed that the proposed algorithm in this paper achieves a complete convergence at approximately 600 rounds, whereas the A2C algorithm converges at around 800 rounds, thus indicating a performance improvement of approximately 22.4 percent by the proposed algorithm. In terms of stability, when the proposed algorithm converges, the utilities of the participants are particularly close to the theoretical maximum social welfare (SE), whereas the A2C algorithm still exhibits a significant gap from the theoretical SE at convergence. On the other hand, the greedy and random methods oscillate without converging during the solving process. These results highlight the significant advantages of the proposed algorithm in terms of utility convergence and stability.  
Based on the analysis in Figure 5, it can be concluded that the greedy algorithm and random method are unable to solve for the maximum social welfare (SE). Therefore, in order to enhance the readability of the result graphs, the subsequent strategy and convergence plots do not include the results of these two methods. Figure 6a-c are the convergence graphs of the user price strategy, ES computing resource strategy, and the ES communication resource strategy, respectively. For the user, their price strategy is a reward offered to incentivize ESs to participate in task computation, and this corresponds to both computing resources and communication resources. In the algorithm designed in this paper, as the number of iterations increases, the participants' strategy gradually approaches the theoretical Nash equilibrium, which finally converges to a position that is exceedingly close to equilibrium. Although the A2C algorithm can also converge, its policy after convergence still has a certain distance from the theoretical Nash equilibrium strategy. Therefore, in terms of convergence speed or convergence accuracy, the method designed in this paper is generally superior to the traditional A2C method.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline User device computational power \(f_{1}\) & 1 GHz \\ Effective switching capacitance \(\kappa_{m}\) & \(10^{-27}\) \\ Transmit/receive task size \(d_{i}/r_{i}\) & 5\(\sim\)50 Kb \\ CPU cycles per bit of data processed \(\eta\) & 500\(\sim\)1500 cycles/bit \\ Unit cost of calculating energy consumption \(\alpha\) & \(10^{-6}\)\(\sim\)\(10^{-5}\) \\ Incentive mechanism penalty factor \(\mu\) & 20 \\ Task assignment penalty factor \(\phi\) & 5 \\ Unit cost of communication rate \(\beta\) & \(10^{-4}\)\(\sim\)\(10^{-3}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Main Simulation Parameters.  
Figure 5: Utility convergence graph. (**a**) User unity convergence graph; (**b**) ES1 unity convergence graph; and (**c**) ES2 unity convergence graph.  
Figure 6: Strategy convergence graph. (**a**) Convergence graph of user reward strategy; (**b**) convergence graph of ES computing resource strategy; and (**c**) convergence graph of the user communication resource strategy.