**1. Introduction**

As small surface vehicles with autonomous navigation capability, USVs are widely used in maritime patrolling, resource exploration and marine rescue [1]. Comprehensively considering conditions such as reefs, water depth and no-sail areas, planning safe and efficient routes for USVs in a complex marine environment has gradually become a hot topic for scholars [2]. To address USV path planning issues in real marine environments, Sing et al. [3] improved the Dijkstra method and planned a global navigation path in a workspace with dynamic and static obstacles. However, the algorithm has high computational complexity and slow path search efficiency. Rui et al. [4] presented an enhanced A-star algorithm for USV path planning. The algorithm has three path smoothers, which are capable of generating a smooth and continuous path in a marine environment, but are not capable of avoiding moving obstacles in real time. Recently, some nature-inspired meta-heuristic algorithms have gradually been adopted in USV path planning. Guo et al. [5] presented an enhanced particle swarm optimization (PSO) algorithm to plan a global USV path that could avoid collisions. Cui et al. [6] enhanced the ant colony algorithm (ACO) and implemented it in USV path planning. Ma Y. et al. [7] presented a dynamic enhanced PSO, which constrained USV path planning in terms of three aspects: collision avoidance, boundary movement and speed. Sahoo et al. [8] combined the advantages of the grey wolf algorithm (GWO) and the genetic algorithm (GA) and proposed a hybrid grey wolf algorithm (HGWO) for path planning and obstacle avoidance of autonomous underwater

**Citation:** Liang, J.; Liu, L. Optimal Path Planning Method for Unmanned Surface Vehicles Based on Improved Shark-Inspired Algorithm. *J. Mar. Sci. Eng.* **2023**, *11*, 1386. https://doi.org/10.3390/ jmse11071386

Academic Editor: Fausto Pedro García Márquez

Received: 11 June 2023 Revised: 24 June 2023 Accepted: 27 June 2023 Published: 7 July 2023

**Copyright:** © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

vehicles (AUVs). Gu et al. [9] proposed an improved RRT algorithm for ship path planning, which clustered the data from an automatic identification system (AIS) and then improved the sampling strategy to accelerate convergence. The improved Douglas–Peucker (DP) and RRT algorithms are combined to optimize paths. Ma D. et al. [10] presented an enhanced Gaussian pseudospectral method (RGPM) for continuous optimal control of USVs, which can obtain an optimal smooth path. Han et al. [11] introduced a mixed approach to path planning based on enhanced Theta\* and the DWA. Theta\* was utilized to globally plan an optimal path and then the improved DWA was used to enhance the vehicle's dynamic collision avoidance ability. Wang et al. [12] improved the velocity obstacle method (VO) and integrated it into the set-based guidance (SBG) framework to establish a dynamic collision avoidance (DCA) model known as USV-DCA. In order to respond to the dynamic ocean environment, Hu et al. [13] applied the A-Star algorithm and DWA method to safe USV navigation, and the real-time collision avoidance behavior of USVs conforms to COLREGs rules. Zhao et al. [14] put forward an adaptive elite GA with fuzzy inference (AEGAfi), which can control the USVs to optimize its global trajectory, and its dynamic behavior conforms to COLREGs. Li et al. [15] combined the artificial potential field (APF) with the ACO and proposed an improved APF-ACO algorithm, which overcame the local optimum shortcomings in the APF method, and achieved the path planning and collision avoidance of ships. Hao et al. [16] proposed a dynamic fast Q-learning algorithm (DFQL) to plan global USV paths in known marine environments. The algorithm initializes the Q table in combination with the APF method and provides static and dynamic rewards to motivate the USV to move toward the target point. Guo S. et al. [17] proposed a model based on deep reinforcement learning, which combined the Depth Deterministic Strategy Gradient (DDPG) algorithm with the APF method for autonomous path planning of USVs. Sang et al. [18] proposed an improved APF method and combined it with the A-Star algorithm for the formation control and path planning of the USVs.

These above researchers have carried out commendable work, however, there are still some existing problems such as falling into local optimum, time consumption and lack of smoothness in the planned path. White Shark Optimizer (WSO) is an innovative intelligent method that was developed in 2022 to imitate the foraging behavior of white sharks. Compared to other nature-inspired methods such as Butterfly Optimization Algorithm (BOA) [19], Grey Wolf Optimizer (GWO) [20], Manta Ray Foraging Optimizer (MRFO) [21], Whale Optimization Algorithm (WOA) [22] and Sparrow Search Algorithm (SSA) [23], the WSO algorithm offers the benefits of simplicity, high flexibility, strong robustness and rapid convergence [24]. However, since the population of WSO is not rich enough in its initial stage, it will decelerate the convergence in later iterations, and the risk of being caught in a local optimum should be considered. Therefore, the traditional WSO algorithm needs to be further improved. In line with the above research, this study focuses on innovative improvements and applications of WSO. When the previous literature is reviewed, the research on combining the improved WSO and DWA to solve the optimal USV path planning problem has not been found. To overcome the limitations of the traditional WSO algorithm, guide the USV to plan its global optimal path and avoid the obstacles in time, this paper proposes an enhanced WSO algorithm named IWSO-DWA, which combines the advanced techniques of circle chaotic mapping, adaptive weight factor, the simplex method and the DWA. First of all, the population of white sharks is initialized by using circle chaotic mapping to increase its diversity and speed up the algorithm's convergence. Secondly, the adaptive weight factor method is used to update the location of the best white shark, which maintains a balance between both exploration and exploitation to promote the algorithm's capacity. Then, the simplex method is adopted to refresh the location of white sharks as they move toward the best white shark, so as to enhance the ability of escaping the local optimal value. Finally, the enhanced DWA is utilized for avoiding obstacles dynamically. Furthermore, the azimuth evaluation function of the DWA is improved to incorporate the COLREGs rules for dynamic obstacle avoidance. By combining the improved WSO algorithm with the improved DWA method, the USV can not only sail along the optimal

path, but also avoid other obstacle ships regularly in real time, and its dynamic behavior conforms to the COLREGs rule.

The following are the primary contributions of this paper:


The rest of this paper is arranged as follows: Section 2 introduces the WSO algorithm and its improvement with multi-strategies innovatively. Then, in Section 3, both the standard DWA and its enhancement are presented. Section 4 introduces a novel global optimal path planning method called IWSO-DWA. The experimental simulation results of the IWSO-DWA are presented in Section 5, which also includes a comparison of its performance advantages with those of conventional algorithms. Section 6 concludes the research and outlines future work.

#### **2. White Shark Optimizer and Its Improvement**

#### *2.1. Traditional White Shark Optimizer (WSO)*

The White Shark Optimizer, a novel nature-inspired algorithm introduced in 2022, mimics the foraging behavior of white sharks. The WSO has the superiorities of simplicity, high flexibility and strong robustness. However, it also has certain drawbacks, including population diversity deficiency, limited search range and a tendency to slip into the regional optimum.

Assume that the set matrix of the white shark population is:

$$\mathcal{W} = [w\_1, w\_2, w\_3, \dots, w\_n]^T,\\ w\_i = [w\_{i,1}, w\_{i,2}, w\_{i,3}, \dots, w\_{i,d}] \tag{1}$$

Let *n* denote the number of white sharks, with *i* = (1,2, ... ,*n*). The dimension of the problem definition is represented by the variable *d*.

According to Equation (1), the fitness function of white sharks is expressed as follows:

$$F(w) = \begin{bmatrix} f(w\_1), f(w\_2), \dots, f(w\_n) \end{bmatrix}^T \tag{2}$$

where *f*(*wi*)=[ *f*(*wi*,1), *f*(*wi*,2), ... , *f*(*wi*,*d*)]. The *i-*th white shark's fitness value is represented by *f*(*wi*). The white shark population's fitness value is denoted by *F*(*w*).

In the traditional WSO algorithm, white sharks search for prey extensively through their sensitive hearing, smell and sight. While prey is moving in the sea, it will produce hesitation of the waves and special smells. Once a white shark perceives the prey's position, it approaches the prey in a wave motion. The white sharks' motion speed can be expressed as follows:

$$
\omega\_{k+1}^i = \mu[v\_k^i + p\_1(\omega\_{gbest\_k} - \omega\_k^i) \times c\_1 + p\_2(\omega\_{best}^{v\_k^i} - \omega\_k^i) \times c\_2] \tag{3}
$$

where *k* denotes the current iterations. *v<sup>i</sup> <sup>k</sup>*+<sup>1</sup> is the *i*-th white shark's new velocity vector in (*k* + 1)-th iteration. *v<sup>i</sup> <sup>k</sup>* is the *i*-th white shark's current velocity vector in *k*-th iteration.

*ωgbestk* denotes the white shark's global optimal position. In the *k*-th step, the *i*-th white shark's current position is denoted by *ω<sup>i</sup> <sup>k</sup>*. The *i*-th optimal known position in the white shark population is denoted by *<sup>ω</sup>v<sup>i</sup> k best*. *<sup>c</sup>*<sup>1</sup> and *<sup>c</sup>*<sup>2</sup> are selected from [0,1] randomly. *<sup>v</sup><sup>i</sup> <sup>k</sup>* denotes the white sharks' *i*-th index vector when they have reached their optimal location.

Great white sharks usually hunt for food in the ocean's depths randomly. What is more, great white sharks approach the optimal prey's location. The location of white sharks near the optimal prey is updated as follows:

$$
\omega\_{k+1}^i = \begin{cases}
\omega\_k^i \cdot \neg \ominus \omega\_0 + \boldsymbol{u} \cdot \boldsymbol{a} + \boldsymbol{l} \cdot \boldsymbol{b}; & \text{rand} < m\boldsymbol{v} \\
& \omega\_k^i + v\_k^i/f; \qquad \text{rand} \ge m\boldsymbol{v}
\end{cases} \tag{4}
$$

where *ω<sup>i</sup> <sup>k</sup>*+<sup>1</sup> represents the new position of *i*-th white shark. ¬ is a negation operator. The search space bound is indicated by *l* and *u*. *mv* represents the increasing movement force of the white shark as it approaches its prey. *a*,*b* and *ω*<sup>0</sup> represent the vector in one dimension.

The best white shark is closely situated to the optimal prey. By using fish school behavior, all white sharks will migrate towards the best white shark, and the position is updated as follows:

$$
\omega\_{k+1}^{\prime i} = \omega\_{\text{gbest}\_k} + r\_1 \stackrel{\rightarrow}{D}\_{\omega} \text{sgn}(r\_2 - 0.5), \quad r\_3 < s\_s \tag{5}
$$

where *ω<sup>i</sup> <sup>k</sup>*+<sup>1</sup> denotes the *i*-th white shark's position relative to the prey. sgn(*r*<sup>2</sup> − 0.5) stands for the search direction of the white shark. <sup>→</sup> *Dω* stands for the distance between the white shark and its prey. *ss* stands for the strength of white sharks' sense organs. *R*1, *r*<sup>2</sup> and *r*<sup>3</sup> are selected from [0,1] randomly.

The fish school behavior of the traditional WSO algorithm can be expressed as follows:

$$
\omega\_{k+1}^i = \frac{\omega\_k^i + \omega^{\prime \dot{i}}\_{k+1}}{2 \times rand} \tag{6}
$$

where the related variables have been explained in Equations (3) and (5), so they will not be described here again.

The flow chart of the traditional WSO algorithm is depicted in Figure 1.

To sum up, the traditional WSO algorithm exhibits the following limitations:


**Figure 1.** Flow chart of traditional WSO algorithm.
