## 4 Node Deployment Scheme for UASNs Based on the DHFOA  
The artificial fish swarm algorithm (AFSA) is a heuristic intelligent search algorithm for global optimization. By simulating the preying and survival activities of fish, the AFSA can solve combination optimization problems such as optimal ordering, grouping, or screening of discrete events with a faster convergence speed than previous methods. The fish swarm algorithm and the underwater mobilesensor network are intrinsically related. The sensor node in the sensor network is equivalent to the artificial fish in the AFSA, events are equivalent to food, and the process of the node sensing the event is equivalent to the process of artificial fish searching for food. Therefore, the AFSA has been widely used in underwater mobile sensor networks.  
In this study, we propose a DHFSOA and apply it to UASNs. Inspired by the operation of the fish swarm system, the DHFSOA gives the sensor nodes an autonomous tendency to cover events by simulating fish foraging and adjusts the distribution of nodes based on the degree of congestion. Additionally, the concept of an \"information pool\" is proposed, which expands the node's visual range and accelerates the algorithm's global search capability. Figure 1 is the flow chart of the artificial fish swarm algorithm. Behaviors such as preying, following, and swarming, which occur when fish forage, are the basis for the overall optimization.  
1. Preying behavior: preying behavior consists of fish randomly swimming in search of food; let the current state of the artificial fish be \(X_{i}\), randomly select a state \(X_{j}\) within its visual range. When the  
Figure 1: Flow chart of the artificial fish swarm algorithm.  
maximal value problem is obtained, if \(Y_{i}<Y_{j}\), then go further in the direction, that is \(X_{next}\), otherwise, re-randomly select the state \(X_{j}\), judging whether the forward condition is satisfied; after repeatedly trying \(N_{max}\) times, if the forward condition is still not satisfied, the step is randomly moved.
2. Following behavior: following behavior occurs when a fish finds a location with abundant food and other fish quickly follow; suppose the current state of the artificial fish is \(X_{i}\), the number of partners in the current neighborhood (\(d_{ij}<Visual\)) is \(n_{f}\), and the partner with the highest food concentration among the (\(n_{f}\)) partners is \(X_{j}\) (food concentration is \(Y_{j}\)), if \(\frac{Y_{j}}{n_{f}}>\delta Y_{i}\), indicating that the state of partner \(X_{j}\) has a higher food concentration and it is not too crowded around, then goes further in the direction of \(X_{j}\); otherwise, the preying behavior is performed.
3. Swarming behavior: swarming behavior is the tendency for fish to naturally gather in groups while swimming. Set the number of partners in the current neighborhood (\(d_{ij}<Visual\)) to be \(n_{f}\), and the central position status to be \(X_{c}\). if \(\frac{Y_{c}}{n_{f}}>\delta Y_{i}\), indicating that the partner center has more food and the surrounding area is less crowded, moving further toward the partner center position \(X_{c}\); otherwise, the preying behavior is performed.  
Of course, the proposed DSFSOA mainly includes two kinds of behaviors: preying and following. In the following sections, the DHFSOA will be described in detail.