## 4 Proposed ms-SDRGN Solution For SAG-MCS
### Heuristic Reward Function  
In this section, we design a heuristic reward function to evaluate the result when the UAV swarm conducted action \(\mathbf{a}_{t}\) based on respective observation \(\mathbf{o}_{t}\). Since each UAV agent in SAG-MCS is only exposed to local information and acts in a decentralized manner, we expect the reward function can help agents to achieve a better CFE score, while not directly aiming at optimizing the global metrics mentioned in Section 3.4. Therefore, the reward function considers the impact of data collection, battery charging, energy consumption and collision with boundaries.  
Firstly, we encourage the UAV swarm to collect data as much as possible. Note that Pols that within UAV's coverage range \(R_{cov}\) are referred as 'covered'. For UAV \(u\), we design an individual coverage term \(r_{u}^{self}\) and a swarm coverage term \(r_{u}^{smarm}\):  
\[r_{u}^{self}=\left\{\begin{array}{ll}\eta_{1}\cdot\Sigma_{p}d(p),&\text{if PoI $p$ is covered only by UAV $u$}\\ -1,&\text{if none PoI is covered by UAV $u$}\end{array}\right. \tag{18}\]  
\[r_{u}^{swarm}=\left\{\begin{array}{ll}\frac{\eta_{2}}{u_{u}}\cdot\Sigma_{q} d(q),&\text{if PoI $q$ is covered by other UAVs in $G_{u}$}\\ 0,&\text{if UAV $u$ is not networking with others}\end{array}\right. \tag{19}\]  
where \(r_{u}^{self}\) counts the data amounts collected individually by UAV \(u\), and \(r_{u}^{smarm}\) counts the data amounts covered by agents that network with UAV \(u\) in one-hop connection. They are expected to improve the data coverage index through both individual exploration and swarm cooperation. Let \(n_{u}\) denote the number of UAV \(u\)'s one-hop neighboring nodes. In addition, we set balance coefficients \(\eta_{1}=0.4\), \(\eta_{2}=0.04\).  
Secondly, in order to guide UAVs to charging stations when their batteries are low, we propose a charge term \(r_{u}^{charge}\) as:  
\[r_{u}^{charge}=-\min\theta_{c}^{u},\quad\forall c\in\mathcal{C}, \tag{20}\]  
where \(\theta_{c}^{u}\in[0,1]\) is normalized euclidean distance between UAV \(u\) and charging station \(c\). The charge term \(r_{u}^{charge}\) will increase as UAV moving closer to its nearby charging station. We deem the UAV is in charging state when the relative distance meets \(\theta_{c}^{u}\leq 2.0\), then an extra reward of 2.0 points will be added to \(r_{u}^{charge}\).  
Other factors such as energy consumption and collisions are considered as well. According to Equation (6), we simply define an energy term as \(r_{u}^{energy}=1/e_{t}^{tr}\). UAVs that consume less energy are expected to gain higher rewards. Then, we define a penalty term \(p_{u}=1\) when UAV \(u\) collides with the fixed boundary in our scenario, otherwise put \(p_{u}=0\)We integrate local evaluation terms and define the heuristic reward function as:  
\[r_{u}=\frac{\left(r_{u}^{self}+r_{u}^{swarm}\right)\times\epsilon+r_{u}^{charge} \times(1-\epsilon)}{r_{u}^{energy}}+p_{u},\quad\text{if}\,\phi(u)>0, \tag{21}\]  
where the weight parameter \(\epsilon\) refers to the remaining battery percentage, denoted as \(\epsilon=\phi(u)/100\%\). Equation (21) only functions when battery is not empty, otherwise the reward function is defined as:  
\[r_{u}=r_{u}^{energy},\quad\text{if}\,\phi(u)\leq 0. \tag{22}\]  
For training simplicity, UAV can still operate when its battery has drained, but it cannot get reward from data collection and will get an extra punishment.