## 4 Node Deployment Scheme for UASNs Based on the DHFOA
### Description of Artificial Fish Behaviors  
The artificial fish swarm optimization algorithm is a centralized, group intelligence search method. Inspired by the operation of the artificial fish swarm system, this paper proposes a distributed and achievable underwater sensor node deployment algorithm, the DHFSOA. The process in which nodes in the sensor network tend to increase network coverage is similar to the preying and following behaviors of artificial fish. Prior to introducing the two behaviors, the following definitions are provided:  
**Definition 5**. : _Congestion. The allowed congestion of node \(s_{i}\) in monitoring area \(A\) is_  
\[\sigma\left(s_{i}\right)=\psi\cdot N_{e}\left(s_{i}\right), \tag{9}\]  
_where the constant \(\psi\) represents the expected coverage of a single event and \(N_{e}\left(s_{i}\right)\) represents the number of events covered by node \(s_{i}\), expressed as_  
\[N_{e}\left(s_{i}\right)=\sum_{e_{i}\in E}p\left(e_{j},s_{i}\right). \tag{10}\]  
**Definition 6**. : _The number of nodes \(N_{ne}^{s}\left(s_{i}\right)\) within the communication range and the number of nodes \(N_{co}^{s}\left(s_{i}\right)\) within the perceived range of the node \(s_{i}\) can be expressed as_  
\[N_{ne}^{s}(s_{i})=\text{card}(\lambda(s_{j})), \tag{11}\]  
_where \(\text{card}(\lambda(s_{j}))\) indicates the number of nodes in the collection \(\lambda(s_{j})\), \(\lambda\left(s_{j}\right)=\left\{s_{j}\left|d\left(s_{i},s_{j}\right)\leq r,1 \leq i,j\leq n,i\
eq j\right.\right\}\) represents the set of nodes \(s_{j}\) within the communication radius of the node \(s_{i}\), and \(d\left(s_{i},s_{j}\right)\) represents the Euclidean distance between node \(s_{i}\) and \(s_{j}\):_  
\[N_{co}^{s}(s_{i})=\text{card}(\gamma(s_{j})), \tag{12}\]  
_where \(\gamma\left(s_{j}\right)=\left\{s_{j}\left|d\left(s_{i},s_{j}\right)\leq r^{s },1\leq i,j\leq n,i\
eq j\right.\right\}\) represents the set of nodes \(s_{j}\) within the perceived range of the node \(s_{i}\)_  
Next, the behavioral description of the artificial fish will be specifically described. \(n\) sensor nodes are randomly scattered in the underwater monitoring area \(A\). Node \(s_{i}\) may perform the following operations based on its own status as well as that of its neighbor nodes:  
1. Following behavior: Set the number of partners in the visible domain (radius of communication being \(r^{c}\)) of node \(s_{i}\) as \(N_{ne}^{s}\left(s_{i}\right)\), \(N_{ne}^{s}\left(s_{i}\right)>0\) and information pool built with the partners as \(C_{sum}\), and determine the optimal node \(s_{opt}\) in \(C_{sum}\)  
Figure 4: An example of information pool construction (no isolated nodes). \[s_{opt}=\underset{s_{k}\in C_{cam}}{\arg\max}\ \left\{N_{ne}^{s}\left(s_{k}\right) \right\}.\] (13) If node \(s_{i}\) finds more events covered at \(s_{opt}\) and \(s_{opt}\) is less crowded, i.e., \(N_{e}\left(s_{opt}\right)\geq N_{e}\left(s_{i}\right)\) and \(N_{co}^{s}\left(s_{opt}\right)<\sigma\left(s_{opt}\right)\), then move one step toward the position of partner \(s_{opt}\): \[X_{next}=X_{i}+rand\left(l\right)\times\frac{X_{opt}-X_{i}}{\left\|X_{opt}-X _{i}\right\|},\] (14) where \(X_{i}\) and \(X_{opt}\) represent position vectors of \(s_{i}\) and \(s_{opt}\) respectively, and \(l\) is the value of the moving step. 2. Preying behavior: Set the number of partners in the visible domain (radius of communication being \(r^{c}\)) of node \(s_{i}\) as \(N_{ne}^{s}\left(s_{i}\right)\), \(N_{ne}^{s}\left(s_{i}\right)=0\), which indicates that node \(s_{i}\) is in an isolated state. \(l\) is the maximum value of the moving step. Set the current position of node \(s_{i}\) as \(\vec{x}_{i}\), and randomly move to the new position \(\vec{x}_{j}\) within its maximum moving step \(l\): \[X_{next}=X_{i}+rand\left(l\right)\times\frac{X_{i}-X_{j}}{\left\|X_{i}-X_{j} \right\|},\] (15) where \(rand(l)\) represents the random value between 0 to \(l\).