# Game Algorithm for Resource Allocation Based on Intelligent Gradient in HetNet
## 3 Stackelberg Game Model and Problem Statement
### Intelligent Method Based on Gradient Algorithm  
In adopting game theory to solve the issue of HetNet resource allocation, the process of obtaining strategy is dynamic. Moreover, the Nash equilibrium [31] value scope of the Stackelberg model built in the above is continuous instead of disperse, so backward induction cannot be used for obtaining solutions. In actual situations, players cannot know strategy of current moment. Therefore, we need to further discuss the intelligent algorithm without the need to know the strategy of other simultaneous players. The gradient algorithm can approach the optimal solution gradually through iteration, which is also focused. Nash equilibrium with maximal system revenue can be realized iteratively with optimization algorithm [32; 33].  
In solving target spectrum strategy with linear iterative method, choosing a suitable adjustment factor has been the main research direction. For authorized users, system revenue and optimal frequency band distribution factor display a concave function relationship. Assuming that \(\beta_{j}^{k}\) is the strategy of femtocell \(j\) at the moment of \(k\), then \(U_{j}^{k}(\beta)\) is the revenue obtained by femtocell \(j\) using strategy \(\beta_{j}^{k}\) for sharing spectrum at the moment of \(k\). Before obtaining the maximum revenue function, the system revenue function increases with \(\beta\). At the moment, \(\partial U_{j}/\partial\beta\) is positive. Through iteration in Equation (20), strategy \(\beta_{j}^{k}\) can be increased until system revenue function reaches the maximum. When strategy is excessively big and because the coverage of femtocells is limited, revenue function decreases with the increase of strategy value, and \(\partial U_{j}/\partial\beta\) is negative. Iteration in Equation (20) makes strategy \(\beta_{j}^{k}\) gradually decrease until reaching equilibrium strategy.  
\[\beta_{i}^{k+1}=\beta_{i}^{k}+\lambda\frac{\partial\Big{(}U_{i}^{k}(\beta) \Big{)}}{\partial\beta_{i}^{l}} \tag{20}\]  
where, \(\lambda\) is a fixed non-negative adjustment factor.  
In addition, we also adopt a steepest descent approach in the optimization algorithm and choose iterations with the highest speed in making macro base station revenue function change to reach the minimum of target function as soon as possible. To solve the Nash equilibrium strategy, adjustment factors are self-adaptingly solved, so as to allow the shared spectrum price to approach Nash equilibrium price strategy along the gradient direction of authorized user system revenue function. Assuming that target function is \(f(\beta)=U_{j}(\beta)\), then the directional function \(\Delta^{k}\) of target function at strategy \(\beta^{k}\) is:  
\[\Delta_{i}^{k}=\partial f(\beta_{i})/\partial\beta_{i}^{k} \tag{21}\]  
Then conduct a one-dimensional search of strategy along the direction of \(\Delta^{k}\), and choose target function with the steepest changes to solve adjustment factor \(\lambda^{k}\).  
\[\lambda^{k}=\underset{\lambda}{\text{argmax}}f(\beta^{k}+\lambda\Delta^{k}) \tag{22}\]  
Finally, solve the femtocell strategy according to Formula (23), until the solved strategy meets the accuracy requirement.  
\[\beta_{i}^{k+1}=\beta_{i}^{k}+\lambda^{k}\Delta_{i}^{k} \tag{23}\]  
This method can solve and obtain Nash equilibrium strategy with shorter iteration cycle. Utilizing the steepest descent thought and choosing the fastest descending direction of target function value are helpful for target function to reach the minimum of target function as soon as possible. In other words, the system revenue function solves the Nash equilibrium strategy along the route with the fastest changes, and self-adaptively solves adjustment factors and enables strategy to approach the Nash equilibrium price strategy along a gradient direction of system revenue function.