Preprint
Article

This version is not peer-reviewed.

Research on Mobile Robot Path Planning Based on Improved Crested Porcupine Optimizer

Submitted:

19 November 2026

Posted:

20 November 2026

You are already at the latest version

Abstract
The application of the Crested Porcupine Optimizer (CPO) to global path planning for mobile robots is hindered by several inherent deficiencies, such as non-uniform initialization, inadequate population diversity, susceptibility to local optima stagnation, an imbalance between global exploration and local exploitation, and limited local exploitation capability. To overcome these limitations, this study introduces a multi-mechanism collaborative improved Crested Porcupine Optimizer (ICPO). The proposed ICPO incorporates four strategic improvements: (1) initialization based on high-quality point sets to ensure uniform population distribution; (2) a failed-memory odor repulsion mechanism to avoid invalid repeated searches and sustain population diversity; (3) a quality-crowding multi-scale attack strategy to precisely regulate the exploration-exploitation balance; and (4) dynamic neighborhood-based local visual perception to effectively strengthen the algorithm’s ability to escape from local optima. Comparative experiments against the Conventional CPO, the Sparrow Search Algorithm (SSA), and the Grey Wolf Optimizer (GWO) validate the superiority of ICPO across varying environmental complexities. Results indicate that in 2D grid maze environments, ICPO reduces planning runtime by 75.81% and shortens path lengths by 15.95% relative to the baseline CPO, thereby enhancing both computational efficiency and path optimality. In 3D complex terrain scenarios, ICPO achieves reductions of 39.47% in computation time and 15.31% in path length compared to conventional CPO, demonstrating robust adaptability. Moreover, ICPO outperforms SSA and GWO in generating optimal paths with lower computational overhead, confirming its comprehensive advantages in robotic path planning.
Keywords: 
;  ;  ;  

1. Introduction

Path planning serves as a core enabling technology for mobile robots, unmanned aerial vehicles (UAVs), and multi-agent systems to realize autonomous navigation and safe operation, and has been widely deployed in industrial and civilian scenarios such as intelligent manufacturing, logistics transportation, and precision agriculture [1]. Graph search algorithms represented by A*[2] and Dijkstra [3] exhibit strong stability and favorable interpretability, which are suitable for navigation tasks in simple environments. Nevertheless, they suffer from high computational complexity, heavy memory overhead, and poor real-time performance in large-scale complex environments with numerous obstacles. The artificial potential field (APF) method [4] features low computational cost and fast response, making it applicable to local real-time obstacle avoidance. However, it is prone to falling into local minima, accompanied by drawbacks including unreachable target points and weak planning stability. To address this issue, Wu et al.[5] introduced reinforcement learning into multi-agent path planning, which effectively improves the navigation adaptability in complex environments.
Metaheuristic algorithms do not rely on gradient information and can well accommodate the nonlinear, multi-modal and highly constrained optimization characteristics of path planning, making them mainstream optimization approaches for the navigation of complex unmanned systems [6]. Swarm intelligence algorithms including genetic algorithm [7], ant colony algorithm [8], particle swarm optimization [9], grey wolf optimizer [10], and whale optimization algorithm [11] possess favorable global search capability, yet they generally suffer from inherent limitations. Most existing improvement strategies adopt single optimization schemes such as chaotic initialization and adaptive weighting. These methods fail to fully exploit information regarding population quality, crowding degree and historical invalid search, and are restricted to a single optimization dimension. Consequently, they struggle to tackle issues including redundant search, low path accuracy and poor stability in complex environments [12]. The majority of these algorithms lack a constraint mechanism for invalid regions, leading to severe iterative redundancy, which greatly degrades the real-time operational performance of unmanned systems [13].
Crested Porcupine Optimizer (CPO) [14] is a novel bio-inspired metaheuristic algorithm proposed in 2023. It realizes dynamic switching between global exploration and local exploitation by mimicking the multi-layered defensive behaviors of crested porcupines. With the merits of few control parameters, strong robustness and balanced optimization, CPO has been widely applied to path planning for unmanned systems [15]. Cui et al. [16] optimized the iterative convergence mechanism to improve the optimization efficiency and accuracy of CPO. Liu et al. [17] applied an improved CPO to UAV delivery planning and verified its engineering adaptability. Wang et al. [18] validated the applicability of CPO for underwater operations via trajectory tests of underwater robotic fish. Lei et al. [19] established a multi-objective optimization framework to strengthen the capability of solving multi-constrained UAV planning problems. Xu et al. [20] adopted good point set and adaptive spiral strategies to address the problems of uneven population distribution and search imbalance of CPO in mountainous scenarios. Liu et al. [21] integrated novel search operators to effectively boost population diversity. Gao et al. [22] proposed the Alpha Evolution algorithm, which enhances the efficiency of population update through adaptive evolutionary paths and matrix generation mechanisms, providing insights for improving the search performance of metaheuristic algorithms. Shen et al. [23] designed a multi-population co-evolution strategy for the whale optimization algorithm, which effectively balances global exploration and local exploitation and enhances the optimization performance for complex engineering optimization problems. Mohapatra et al. [24] embedded a fast random opposition-based learning mechanism into the golden jackal optimizer to increase population diversity and the capability to escape from local optima.
Although existing studies have carried out multi-dimensional improvements to the CPO algorithm, the conventional CPO still suffers from obvious drawbacks. Random initialization results in incomplete coverage of the solution space and creates search blind zones. Without a historical memory mechanism, the algorithm repeatedly traverses invalid regions and exhibits low iteration efficiency. Its fixed perturbation mechanism cannot be adaptively adjusted according to individual quality and local crowding status, which readily leads to search imbalance. Moreover, the neighborhood perception pattern is rigid; the population tends to converge homogenously in the later iterations, bringing about premature convergence and large fluctuations in planning results.
To solve the above problems, this paper proposes a multi-mechanism collaborative ICPO. The main contributions of the paper are as follows:
1) A high-quality point set initialization strategy is introduced to improve the uniformity of the initial population and search space coverage.
2) A failure memory odor repulsion mechanism is designed to suppress repeated invalid searches by using historical information of inefficient regions.
3) A quality-crowding multi-scale physical attack mechanism is constructed to adaptively adjust the perturbation intensity and search mode according to individual quality and local density.
4) A dynamic neighborhood local visual perception mechanism is proposed to implement differentiated guidance combined with iteration stages and neighborhood distribution.
The remainder of this paper is organized as follows. Section 2 introduces the Conventional crested porcupine optimizer and the improved strategies, including high-quality point set initialization, failure memory odor repulsion, quality-crowding multi-scale attack, and dynamic neighborhood local visual perception mechanism, and conducts performance tests of the ICPO algorithm. Section 3 establishes two-dimensional and three-dimensional environmental models and carries out corresponding path planning simulations. Section 4 verifies the effectiveness of the proposed algorithm through physical experiments on a real mobile robot platform. Section 5 concludes this paper and prospects future research directions.

2. ICPO for Global Path Planning

2.1. Conventional CPO

CPO is a novel metaheuristic optimization algorithm that constructs an optimization framework by simulating four progressive defensive behaviors of crested porcupines, including visual intimidation, acoustic intimidation, odor attack, and physical attack. Specifically, visual and acoustic intimidation correspond to the global exploration stage, while odor attack and physical attack are responsible for the local exploitation stage. The overall optimization architecture of the CPO is illustrated in Figure 1.
he visual exploration mechanism adopts normal random factors to simulate the movement trends of natural enemies. The random factor fluctuates within the range of (-1, 1), where a value in this interval indicates that the predator is moving away, while other values imply that the predator is approaching. This binary feedback strategy effectively enhances the global search capability of the algorithm in the early iteration stage. The mathematical expressions of visual exploration are presented in Eqs. (1) and (2).
  x i t + 1 = x i t + r 1 × 2 × r 2 × x best t − y i t
y i t = x i t + x j t 2
where x i t   is the position of the i-th individual at the t-th iteration; r1 denotes a random number obeying normal distribution; r2is a random number within [0,1]; x best t   represents the current optimal solution; and y i t is the position of the predator at the t-th iteration. The acoustic intimidation implements three-stage regulation according to deterrence intensity: low sound velocity for convergence, medium sound mode for fine search, and high sound mode for escape to prevent premature convergence. Its mathematical expression is given in Eq. (3):
x i t + 1 = ( 1 − D 1 ) × x i t + D 1 × y i + r × x r 1 t − x r 2 t
where x r 1 t and x r 2 t are the positions of two randomly selected crested porcupines, yidenotes the predator position, and D1∈ {0,1} is a binary random parameter.
The odor defense mechanism constructs a local odor gradient repulsion forbidden region to perturb the current solutions. It guides individuals to perform decentralized searches around high-quality solutions and prevents population aggregation, thereby avoiding trapping in local optima. The corresponding mathematical expressions are presented in Eqs. (4)–(6).
x i t + 1 = 1 − D 1 × x i t + D 1 × x r 1 t + S i t × x r 2 t − x r 3 t − r × δ × γ t × S i t
δ =   1 , rand ⩽ 0.5 − 1 , rand > 0.5
γ t = 2 × rand × 1 − t T t T
where δ denotes the parameter for controlling the search direction; γt represents the defense factor; S i t is the odor diffusion factor; rand is a random number uniformly distributed within [0,1] t indicates the current iteration number; and T stands for the maximum number of iterations.
The physical attack serves as a local fine exploitation operator, which simulates the counterattack behavior. It applies high-frequency perturbations in the neighborhood of the optimal solution to accelerate population convergence and improve the optimization accuracy in the later search stage. Its mathematical expression is given in Eq. (7):
x i t + 1 = x best t + α × ( 1 − r 1 ) + r 1 × δ × x best t − x i t − r 2 × δ × γ t × F i t
where α is the convergence factor; r1 and r2 are random numbers within [0,1]; F i t denotes the average force exerted by the crested porcupine attacking the i-th predator.

2.2. ICPO

2.2.1. High-Quality Point Set Population Initialization

The distribution characteristics of the initial population directly affect the search efficiency and optimization performance of swarm intelligence optimization algorithms. The conventional CPO adopts random initialization, which easily results in individual aggregation, uneven distribution and insufficient coverage of the search space, thereby weakening the global exploration capability of the algorithm. To improve the uniformity and diversity of the initial population, a high-quality point set initialization strategy is introduced in this paper. The population distributions under different initialization methods are shown in Figure 2.
To improve the uniformity of the initial population, a high-quality point set is adopted to generate the initial population of the CPO algorithm. Let N denote the population size and D represent the problem dimension. The value range of the decision variable in the j-th dimension is [Lj,Uj]. First, select the smallest prime number P that satisfies the following condition:
p = min p ∈ P ∣ p ≥ 2 D + 3
According to the high-quality point set theory, the initial position of the i-th individual in the j-th dimension is defined as:
x i , j = L j + 2 icos 2 π j p U j − L j
where i=1,2,3,...,N, j=1,2,...,D, P denotes the prime number set, and {z}=z-[z] represents the fractional part of z. Since{z}∈[0,1], the generated individuals always satisfy the variable constraints:
Lj ≤ xi,j < Uj
The D-dimensional individuals generated by Eq. (9) form the initial population of the CPO algorithm. Compared with the conventional random initialization, the high-quality point set enables the initial individuals to distribute more uniformly in the search space and reduces population aggregation, thereby enhancing the global search capability of the algorithm in the early iteration stage.

2.2.2. Failure-Memory Odor Repulsion Strategy

Aiming at the defects that the local search of the original CPO depends on random differences and easily and repeatedly enters inefficient regions, this paper proposes a failure region memory bank. This bank records regions with long-term no fitness improvement and high local density. On this basis, directional repulsion vectors are generated in the odor exploitation phase to guide individuals to stay away from historical inefficient regions, improve search directionality and population diversity, and reduce the risk of premature convergence, as shown in Figure 3.
  • 1 Failure Region Identification
For the minimization problem, the improvement amount of the i-th individual at the t-th iteration is defined as:
Δ f i t = f x i t − 1 − f x i t f x i t − 1 + ε
If an individual satisfies the following condition for L consecutive iterations:
Δ f i t < θ f
and its local crowding degree is greater than the given threshold θc, then the current position of this individual is identified as the center of a potential failure region. The local crowding degree of individual i is defined as:
C i t = 1 N − 1 ∑ j = 1 j ≠ i N exp − x i t − x j t 2 2 2 σ i 2 + ε
where N is the population size, δtdenotes the local neighborhood scale, and ε is a tiny constant to prevent the denominator from becoming zero.
When Eq. (12) is satisfied and C i t >θc, the current position x i t is added to the failure memory bank:
M t = m 1 t , m 2 t , … , m K t
where k denotes the memory capacity. If the memory bank is full, the earliest recorded or long-inactive failure regions are removed with priority.
  • 2 Update of Failure Region Memory
For each failure region center m k t , its failure intensity h k t is maintained. When the population enters this region again without generating effective improvement, the failure intensity is increased:
h k t + 1 =   min h k t + 1 , h max , x i t − m k t 2 < r m   max λ h h k t , h min , other                 
where rm denotes the radius of the failure region, and λh ∈(0,1) represents the forgetting factor.
This update strategy enables the algorithm to retain regions with continuous negative search feedback and gradually forget historical regions that no longer possess repulsion value.
  • 3 Directional Odor Repulsion Vector
For the current individual x i t , the repulsion vector is constructed from the failure region memory bank:
R i t = ∑ k = 1 K ω ik t x i t − m k t x i t − m k t 2 + ε
where the weight is defined as:
ω ik t = h k t exp − x i t − m k t 2 2 2 σ m 2 + ε ∑ q = 1 K h q t exp − x i t − m q t 2 2 2 σ m 2 + ε + ε
Eq. (15) enables individuals to be repelled by nearby failure regions. Regions with shorter distances and higher failure intensity exert a more significant repulsion effect.
4 Improved Odor Exploitation Formula
The odor exploitation update strategy of the original CPO is rewritten as:
x i t + 1 = 1 − D 1 x i t + D 1 x r 1 t + S i t x r 2 t − x r 3 t − r δ γ t S i t + λ R t R i t
where λ R t   denotes the repulsion coefficient of failure regions:
λ R t = λ min + λ max − λ min 1 − t T
The algorithm adopts a relatively large repulsion strength in the early stage to facilitate escaping from known inefficient regions. In the later stage, the repulsion effect is gradually reduced to avoid interfering with the fine exploitation within the neighborhood of the optimal solution.

2.2.3. Quality-Crowding Multi-Scale Attack

This paper proposes a quality-crowding multi-scale physical attack strategy. The attack demand index is calculated according to individual fitness quality and neighborhood crowding degree, and the perturbation step size and search mode are adaptively adjusted. High-quality and sparse individuals adopt small step sizes for precise local exploitation, while inferior or crowded individuals adopt large step sizes for long-distance perturbation, thereby balancing local exploitation accuracy and population diversity, as illustrated in Figure 4.
First, the quality factor is calculated based on the ranking of individual fitness, and the local crowding degree is computed using neighbor distances. These two metrics are integrated into the attack demand index of the individual:
S i t = 1 − Q i t + ρ Crow d i t
Where   Q i t   denotes the individual quality, Crow d i t   represents the local crowding degree, and ρ is the crowding adjustment coefficient. The attack demand index becomes larger when the individual quality is lower or the region where the individual resides is more crowded. Individuals are divided into different attack scales according to the attack demand index, and the adaptive attack step size is defined as:
A i t = A min + A max − A min norm S i t
where norm(∙) denotes the normalization operation within the population, and Amin and Amax represent the minimum and maximum attack scales, respectively.
This design enables high-quality individuals in low-crowding regions to adopt small step sizes for fine exploitation, while low-quality or high-crowding individuals use larger step sizes to strengthen the escape capability. As iterations proceed, the attack step size gradually decreases to improve the convergence precision in the later stage. Furthermore, local exploitation or long-range jump perturbation is adaptively selected according to the attack demand index:
x i t + 1 = x best t + A i t D i t ⊙ x best t − x i t − r 2 δ γ t F i t

2.2.4. Dynamic Neighborhood Local Visual Perception

Aiming at the problem that random or global optimal guidance in the visual defense stage easily leads to directional homogenization and premature convergence, this paper proposes a dynamic neighborhood local visual perception mechanism. The perception range is adaptively adjusted according to the iteration stage and neighborhood distribution, and high-quality neighborhood individuals are selected for differentiated guidance. This mechanism balances local exploitation and global exploration, and improves search stability and anti-premature capability, as shown in Figure 5.
First, the local crowding degree of individual i at the t-th iteration is defined as:
ρ i t = 1 N − 1 ∑ j = 1 j ≠ i N exp − x i t − x j t 2 2 2 σ ρ t 2 + ε
Where N is the population size, σ ρ t denotes the local density estimation scale, and εis an extremely small positive constant. The higher the aggregation degree around an individual, the larger ρ i t becomes. According to the iteration progress and the local crowding degree, the dynamic visual radius of the individual is constructed:
r i t = r min + r max − r min ω 1 1 − t T + ω 2 ρ i t ρ max t + ε
Where rmin and rmax are the lower and upper bounds of the visual radius, respectively, T denotes the maximum number of iterations, and ρ max t is the maximum crowding degree in the current population. In the early stage when the region around an individual is relatively crowded, a larger visual radius is adopted to facilitate expanding the search range. As iterations proceed, the visual radius gradually decreases to strengthen the capability of local exploitation. The local visual neighborhood and visual target of individual i can be uniformly expressed as:
  N i t = x j t x j t − x i t 2 ≤ r i t   j ≠ i ,
x v i t = arg min x j t ∈ N i t f x j t , N i t ≠ ∅ , x best t , N i t = ∅ .
Where x v i t is the local visual target of individual i, and x best t denotes the current global best individual. Finally, the local visual guidance is combined with random differential perturbation to obtain the update formula for the visual defense stage:
x i t + 1 = x i t + λ i t x v i t − x i t + δ v t ⊙ x r 1 t − x r 2 t
Where x r 1 t and x r 2 t are two different randomly selected individuals, δ v t denotes the random perturbation coefficient, and ⊙ represents element-wise multiplication. The visual guidance coefficient adopts a nonlinear decreasing form:
λ i t = λ v , min + λ v , max − λ v , min 1 − t T η 1 + κ ρ i t ρ max t + ε  
Where λv,min and λv,max are the lower and upper bounds of the visual guidance coefficient, respectively, η denotes the nonlinear attenuation factor, and κ is the crowding adjustment coefficient.

2.3. Improved Algorithm for Path Planning

To evaluate the path planning performance of the improved Crested Porcupine Optimizer (ICPO), the candidate paths are encoded as continuous variables, and a fitness function is constructed by integrating path length, collision risk and path smoothness. The algorithm initializes the population through the high-quality point set strategy. During iterations, the failure memory odor repulsion, quality-crowding multi-scale attack, and dynamic neighborhood local visual perception strategies are sequentially introduced to realize inefficient region avoidance, adaptive perturbation scale adjustment, and differentiated local guidance. Boundary processing and fitness updating are subsequently performed until the maximum number of iterations is reached, and the optimal path is finally output. The overall procedure is illustrated in Algorithm 1.
Algorithm 1. Path Planning Pseudocode of Improved Crested Porcupine Optimizer.
Input: Start point sstart, Goal point sgoal, Map, N, T, D
Output: Planning path
1: Determine the search bounds L and U according to map,
sstart, and sgoal
2: p ← min {p ∈ 𝒫 | p ≥ 2D + 3};
xi,j←Lj+ {2i cos(2πj/p)}(Uj − Lj)
3: xi← min(max(xi, L), U);
Pi← Decode(xi,sstart, sgoal);
Fi← Fitness(Pi, map)
4: Xbest← arg min Fi;
Fbest← min Fi;
M ← ∅; t ← 1
5: while t ≤ T do
6:  Calculate △ f i t and   ρ i t   using Eqs. (11) and (23)
7:  M ← Update(M, △ f i t , ρ i t ) using Eqs. (12), (14)-(15)
8:  for i = 1 : N do
9:    R i t ← Eqs. (16)-(17);
x i scent , t ← Eqs. (18)-(19)
10:       x i attack , t ← Eqs. (20)-(22);
x i visual , t ← Eqs. (24)-(28)
11:   x i new , t ← min(max(Select{ x i scent , t , x i attack , t , x i visual , t } L), U)
12:     P i new ← Decode( x i new ,sstart, sgoal)
F i new ← Fitness( P i new , map)
13:     ( X i t + 1 , F i t + 1 ) ←arg min{( x i t , F i t ), ( x i new , F i new )}
14:  end for
15:  Update M,Xbest, andFbest;
t ← t + 1
16: end while
17: Pbest←Smooth(Remove Redundant Nodes( Decode(Xbest,sstart,sgoal)))
18: if ¬Feasible(Pbest, map) then
Pbest← Repair Path(Pbest, map)
end if
19: return Pbest

2.4. ICPO Algorithm Tests

To verify the optimization performance of ICPO, six typical benchmark functions from CEC2022 are selected for comparative experiments, and the detailed function types are listed in Table 1. The test set covers diverse characteristics including unimodal, multimodal, ill-conditioned gradient, high-dimensional coupling, and optimal solution offset, which are adopted to comprehensively investigate the algorithm’s capabilities in local exploitation, global exploration, local optimum escape, numerical stability, and optimal solution capture. The population size is uniformly set to 30 and the maximum number of iterations is set to 500. All algorithms run independently for 30 times. The optimal value, average value and standard deviation are adopted for comprehensive performance evaluation, and the optimal results of standard deviation are bolded.
Table 1. This Six Test Functions.
Table 1. This Six Test Functions.
Algorithm F1 F2 F3 F4 F5 F6
Best Mean Std Best Mean Std Best Mean Std Best Mean Std Best Mean Std Best Mean Std
SSA 644 667 10.60 2100 2280 143.0 2510 2580 57.1 2240 2370 117 2500 5050 1010 3090 3300 158
GWO 605 609 4.11 2060 2090 30.3 2490 2510 21.3 2230 2240 37.4 2500 3930 1340 2960 2980 18.6
CPO 644 640 21.1 2100 2180 79.5 2480 2490 4.09 2230 2330 76.80 2650 4450 1110 2960 3010 63.50
ICPO 600 602 0.88 2050 2070 20.90 2480 2480 0.57 2230 2240 6.84 2500 2800 341 2940 2950 12.1
Table 2. presents the test results.
Table 2. presents the test results.
function formula dimensionality internal
F1 f 1 x     = ∑ i = 1 D x i 2 + ∑ i = 1 D 0.5 x i 2 + ∑ i = 1 D 0.5 x i 4           30 [-100,100]
F2 f 2 x = ∑ i = 1 D x i 2 − 10 cos 2 π x i + 10 30 [-100,100]
F3 f 3 x = sin 2 π w 1 + ∑ i = 1 D − 1 w i 1 2 1 + 10 sin 2 π w i + 1 + w D 1 2 1 + sin 2 2 π w D 30 [-100,100]
F4 f 4 x = x 1 2 + 10 6 ∑ i = 2 D x i 2 30 [-100,100]
F5 f 5 x = ∑ i = 1 D   10 6 i − 1 D − 1 x i 2 30 [-100,100]
F6 f 6 ( x )     =     418.9829   ×   D − ∑ i = 1 D g ( z i )    
30
[-100,100]
It can be seen from Figure 6 that the convergence curves of the ICPO algorithm on the six benchmark functions F1− F6 all show a rapid declining trend, and its final fitness values are generally lower than those of other comparative algorithms. Especially for multimodal and complex nonlinear test functions, ICPO can quickly reduce the objective function value and maintain stable convergence in the later stage, which demonstrates its strong global exploration and local exploitation capabilities. Compared with other comparative algorithms, ICPO has certain advantages in convergence speed, final optimization accuracy and escaping from local optima. Therefore, ICPO exhibits favorable comprehensive optimization performance and robustness, and can provide algorithmic support for shortest path search, obstacle avoidance and complex environment adaptation in subsequent path planning tasks.

3. Modeling and Simulation Experiments

3.1. Two-Dimensional Environment Modeling

To verify the performance of the path planning algorithm, a 5 m × 5 m two-dimensional discrete grid maze simulation environment is constructed in this paper, as shown in Figure 7. The topological structure of the maze is converted into an undirected and unweighted graph model, in which passable grids are taken as nodes and valid adjacent movements as connecting edges. Based on this model, the path quality, search efficiency and adaptability to complex obstacle scenarios of the proposed algorithm are quantitatively tested.

3.2. Three-Dimensional Environment Modeling

The core task of 3D robot path planning is to generate motion trajectories that satisfy the requirements of safety, feasibility and efficiency. In this paper, Gaussian functions are adopted to simulate the terrain of the robot operating environment in complex scenarios, and a three-dimensional feasible space model is constructed, as shown in Figure 8.
Red and black cuboids represent buildings, green spheres denote trees, and white regions stand for lakes. The formulas (28), (29) and (30) of the environmental data model are given as follows:
z ( x , y ) = 10 ⋅ z smax − z min z max − z min + 5
zsmooth = Gσ ∗ I
z(x,y) = [6sinxcosy + 4sin(0.5x)cos(0.7y)]
In the formula, Gσ denotes the Gaussian kernel with σ=1.2, ∗ represents the convolution operation, and zmin and zmax are the maximum and minimum values of the smoothed height field, respectively.

3.3. Two-Dimensional Path Planning Simulation

To comprehensively evaluate the overall performance of the proposed algorithm in terms of trajectory feasibility, obstacle avoidance capability and convergence efficiency, a series of two-dimensional path planning simulation experiments are carried out in this section. The planning space of the experiment is represented as a 5 m × 5 m map, where black regions denote impassable obstacles and white regions represent passable free space. The start point and target point are set as S(0.4,0.4) and G(4.6,4.7), respectively, to construct a navigation challenge with complex topological structure and long-span characteristics. To quantitatively verify the superiority of the proposed strategy, three representative swarm intelligence optimization algorithms are introduced as benchmarks for comparison under identical parameter boundaries and environmental configurations: Sparrow Search Algorithm (SSA) [25], Grey Wolf Optimizer (GWO) [26], and Crested Porcupine Optimizer (CPO) [27]. The simulated trajectories of each algorithm are shown in Figure 9. In addition, to eliminate accidental deviations caused by random initialization and guarantee the statistical significance of experimental conclusions, 50 independent repeated trials are conducted for each algorithm, and the detailed data are listed in Table 3.
It can be seen from the table that all four algorithms can successfully reach the target position and possess basic path planning capability. The planning results of SSA and GWO are generally stable, yet there remains room for improvement in computational efficiency and path quality. Although CPO achieves relatively high computational efficiency, its path optimization capability is limited. In contrast, ICPO significantly improves planning efficiency and path quality while guaranteeing trajectory feasibility. Compared with CPO, ICPO reduces the running time and path length by 75.81% and 15.95%, respectively, demonstrating superior overall performance.

3.4. Three-Dimensional Path Planning Simulation

To further verify the effectiveness of the ICPO algorithm for three-dimensional path planning, the simulation experiments in this paper are conducted on a computer equipped with an Intel Core i7-10710 CPU, a main frequency of 1.61 GHz, 16 GB RAM, and the Windows 10 64-bit operating system. MATLAB R2023b is used to construct the 3D simulation environment and carry out the simulations. The terrain space has a size of 200 × 200 X 30, with a predefined start point and target point. The environmental parameters are listed in Table 4. The population size is set to 30, and the maximum number of iterations is 400.
As shown in Figure 10, Figure 11, Figure 12 and Figure 13, the three-dimensional path diagrams of the four different optimization algorithms are presented. To improve the reliability and authenticity of experimental results and reduce the random error caused by a single trial, 50 independent repeated experiments are performed in this work. Key performance indicators are recorded, including whether the target position is reached, running time and path length. The detailed results are shown in Table 5.
As can be seen from the table, all four algorithms can successfully reach the target position, which demonstrates their satisfactory feasibility for path planning. Taking the conventional CPO as the benchmark, the CPO achieves a runtime of 1.14 s and a path length of 281.93 m. In contrast, the corresponding results of the ICPO are 0.69 s and 238.78 m, with the runtime and path length improved by 39.47% and 15.31%, respectively. By comparison, SSA and GWO generate longer paths. Although CPO exhibits relatively high computational efficiency, its path optimization performance remains limited. Overall, ICPO achieves simultaneous improvements in computational efficiency and path quality while guaranteeing planning feasibility.

4. Experimental Verification

A mobile robot platform as shown in Figure 14 is built. In Figure 15, cartons are used to simulate shelves and display stands, and enclosures simulate walls according to a supermarket layout. The entrance is defined as the start point and the checkout counter as the target point. The ICPO algorithm is employed to plan obstacle avoidance paths for the robot to autonomously arrive at the target. Prior to the experiment, Gmapping is used to construct the grid map presented in Figure 16, so as to verify the feasibility, real-time performance, obstacle avoidance capability and motion control performance of ICPO in real indoor environments.
Five different shelf layout scenarios are designed for verification. The results show that ICPO can plan smooth, short and collision-free paths to complete navigation successfully. The algorithm adapts to narrow passages and complex obstacle environments, which verifies its feasibility, stability and autonomous obstacle avoidance capability in real supermarket environments. The details are illustrated in Figure 17.

5. Conclusion

Aiming at the shortcomings of the conventional CPO algorithm, such as susceptibility to local optima, uneven initial population distribution, and inadequate local exploitation, this paper develops an improved Crested Porcupine Optimizer (ICPO) that incorporates high-quality point set initialization, failure memory repulsion, multi-scale attack, and dynamic neighborhood perception mechanisms. The ICPO is applied to mobile robot path planning in two-dimensional, three-dimensional, and real indoor scenarios. The results demonstrate that the proposed ICPO exhibits enhanced performance in path quality, planning efficiency, environmental adaptability, and convergence stability, enabling safe and autonomous navigation of mobile robots in complex environments.

Author Contributions

Conceptualization, M.W. and J.Z.; methodology, M.W.; software, M.W.; validation, X.S., M.W. and H.W.; formal analysis, M.W.; data curation, L.A.; writing—original draft preparation, M.W.; writing—review and editing, J.T.; visualization, M.W.; resources, J.T. All authors have read and agreed to the published version of the manuscript.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

All relevant data are presented within the paper.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Jiang, L.; Li, J.; Hu, Y.; et al. A Voronoi path planning extracted from improved skeleton for dynamic environments. J. Mech. Sci. Technol. 2023, 37, 2019–2032. [CrossRef]
  2. Li, C.; Huang, X.; Ding, J.; Song, K.; Lu, S. Global path planning based on a bidirectional alternating search A* algorithm for mobile robots. Comput. Ind. Eng. 2022, 168, 108123. [CrossRef]
  3. Gu, C.; Feng, A.; Wang, G.; Liu, X. Robot path planning of improved adaptive ant colony system algorithm based on Dijkstra. J. Robot. 2022, 2022, 1–11. [CrossRef]
  4. Lv, Q. Localized path planning for mobile robots based on subarea artificial potential field model. Sensors 2024, 24(11), 3604. [CrossRef]
  5. Wu, Q.; Liu, K.; Chen, L.; Lü, J. Hierarchical Reinforcement Learning for Swarm Confrontation with High Uncertainty. IEEE Trans. Autom. Sci. Eng. 2025, 22, 8630–8644. [CrossRef]
  6. Hooshyar, M.; Huang, Y.M. Metaheuristic algorithms in UAV path-planning optimization: A systematic review. Drones 2023, 7(8), 516. [CrossRef]
  7. Wahab, M.N.A. Improved genetic algorithm for mobile robot path planning in static environments. Expert Syst. Appl. 2024, 2024, 123762.
  8. Liu, C.; Wu, L.; Xiao, W.; Li, G.; Xu, D.; Guo, J.; Li, W. An improved heuristic mechanism ant colony optimization algorithm for solving path planning. Knowl. Based Syst. 2023, 271, 110540. [CrossRef]
  9. Jara Ten Kathen, M.; Peralta, F.; Johnson, P.; Jurado Flores, I.; Gutiérrez Reina, D. AquaFeL-PSO: an informative path planning for water resources monitoring using autonomous surface vehicles based on multi-modal PSO and federated learning. Ocean Eng. 2024, 311, 118787. [CrossRef]
  10. Rao, C.; Shao, P.; Wang, Y.; et al. A multi-strategy collaborative grey wolf optimization algorithm for UAV path planning. Electronics 2024, 13(13), 2532. [CrossRef]
  11. Wang, H.; Hao, Z.; Zhang, Y.; et al. Research on three-dimensional path planning of unmanned aerial vehicle based on improved whale optimization algorithm. PLoS ONE 2025, 20(6), e0316836. [CrossRef]
  12. Wu, J.; Wang, H.; Li, N.; et al. An Improved PSO-GWO Algorithm With Chaos and Adaptive Inertial Weight for Robot Path Planning. Front. Neurorobot. 2021, 15, 770361.
  13. Bouchekara, H.R.H.; Sha’aban, Y.A.; Shahriar, M.S.; et al. UAV Path Planning in Obstacle-Rich Environments Using Intelligent Cooperative Differential Evolution Approach. Actuators 2026, 15(7), 386. [CrossRef]
  14. Abdel-Basset, M.; Mohamed, R.; Abouhawwash, M. Crested porcupine optimizer: a new nature-inspired metaheuristic. Knowl.-Based Syst. 2024, 284, 110928. [CrossRef]
  15. Zhang, H.; et al. Application of Improved Crown Porcupine Optimizer in UAV Path Planning Based on Dynamic Weighted JAYA-CPO Attack Strategy. Prot. Control Mod. Power Syst. 2025, 10(6), 101–127. [CrossRef]
  16. Cui, S.; Li, H.; Qiu, J.; Xu, Z. An Improved CPO Algorithm Based on Elite Preservation Strategy. In Proceedings of the 2024 10th International Conference on Systems and Informatics (ICSAI), Shanghai, China, 2–4 November 2024.
  17. Liu, S.; Jin, Z.; Lin, H.; et al. An improved crested porcupine algorithm for UAV delivery path planning in challenging environments. Sci. Rep. 2024, 14, 20445. [CrossRef]
  18. Wang, B.; Li, Z.; Luo, R.; et al. An Improved Crested Porcupine Algorithm for Path Planning of Underwater Robot Fish. Int. J. Comput. Intell. Syst. 2026, 19, 11. [CrossRef]
  19. Lei, W.; Gu, Y.; Huang, J. An Enhanced Crowned Porcupine Optimization Algorithm Based on Multiple Improvement Strategies. Appl. Sci. 2024, 14(23), 11414. [CrossRef]
  20. Xu, Y.; Huang, D.; Zhang, L.; Zhang, F. Improved Multi-Objective Crested Porcupine Optimizer for UAV Forest Fire Cruising Strategy. Int. J. Autom. Comput. 2026, 9(1), 40. [CrossRef]
  21. Liu, J.; He, Y.; Shen, B.; Wang, J.; Wang, P.; Zhang, G.; Zhuang, X.; Chen, R.; Luo, W. A Q-Learning Crested Porcupine Optimizer for Adaptive UAV Path Planning. Intell. Autom. Soft Comput. 2025, 13(7), 566. [CrossRef]
  22. Gao, H.; Zhang, Q. Alpha evolution: An efficient evolutionary algorithm with evolution path adaptation and matrix generation. Eng. Appl. Artif. Intell. 2024, 137, 109202. [CrossRef]
  23. Shen, Y.; Zhang, C.; Gharehchopogh, F.S.; Mir Jalili, S. An improved whale optimization algorithm based on multi-population evolution for global optimization and engineering design problems. Expert Syst. Appl. 2023, 215, 119269. [CrossRef]
  24. Mohapatra, S.; Mohapatra, P. Fast random opposition-based learning Golden Jackal Optimization algorithm. Knowl.-Based Syst. 2023, 275, 110679. [CrossRef]
  25. Zhang, Y.; Li, G.; Chen, X. Dynamic path planning for mobile robots by integrating improved sparrow search algorithm and dynamic window approach. Actuators 2024, 13(1), 24.
  26. Ou, Y.; Yin, P.; Mo, L. An improved grey wolf optimizer and its application in robot path planning. Biomimetics 2023, 8(1), 84. [CrossRef]
  27. Zhai, Y.; Hang, X.; Xi, M.; et al. An improved crested porcupine optimizer with applications to UAV swarm path planning in complex environments. J. Supercomput. 2026, 82, 372. [CrossRef]
Figure 1. Schematic diagram of porcupine defensive behaviors.
Figure 1. Schematic diagram of porcupine defensive behaviors.
Preprints 245117 g001
Figure 2. High-quality point set population initialization.
Figure 2. High-quality point set population initialization.
Preprints 245117 g002
Figure 3. Failure-memory odor repulsion strategy.
Figure 3. Failure-memory odor repulsion strategy.
Preprints 245117 g003
Figure 4. Quality-Crowding Multi-scale Attack.
Figure 4. Quality-Crowding Multi-scale Attack.
Preprints 245117 g004
Figure 5. Dynamic Neighborhood Local Visual Perception.
Figure 5. Dynamic Neighborhood Local Visual Perception.
Preprints 245117 g005
Figure 6. Convergence Curves of Six Benchmark Functions.
Figure 6. Convergence Curves of Six Benchmark Functions.
Preprints 245117 g006aPreprints 245117 g006b
Figure 7. Two-Dimensional Simulation Environment s.
Figure 7. Two-Dimensional Simulation Environment s.
Preprints 245117 g007
Figure 8. Three-Dimensional Simulation Environment.
Figure 8. Three-Dimensional Simulation Environment.
Preprints 245117 g008
Figure 9. Simulated Trajectories of Algorithms.
Figure 9. Simulated Trajectories of Algorithms.
Preprints 245117 g009
Figure 10. Trajectory of SSA Algorithm.
Figure 10. Trajectory of SSA Algorithm.
Preprints 245117 g010
Figure 11. Trajectory of GWO Algorithm.
Figure 11. Trajectory of GWO Algorithm.
Preprints 245117 g011
Figure 12. Trajectory of CPO Algorithm.
Figure 12. Trajectory of CPO Algorithm.
Preprints 245117 g012
Figure 13. Trajectory of ICPO Algorithm.
Figure 13. Trajectory of ICPO Algorithm.
Preprints 245117 g013
Figure 14. Mobile Robot Test Platform.
Figure 14. Mobile Robot Test Platform.
Preprints 245117 g014
Figure 15. Physical Environment.
Figure 15. Physical Environment.
Preprints 245117 g015
Figure 16. Map Modeling.
Figure 16. Map Modeling.
Preprints 245117 g016
Figure 17. Experimental Results.
Figure 17. Experimental Results.
Preprints 245117 g017aPreprints 245117 g017b
Table 3. Simulation Data of Four Algorithms.
Table 3. Simulation Data of Four Algorithms.
Algorithm Target Reachability Runtime (s) Total Path Length (m)
SSA Yes 0.324 6.31
GWO Yes 2.99 6.39
CPO Yes 0.62 6.54
ICPO Yes 0.15 6.17
Improvement/% 75.81 15.95
Table 4. Environmental configuration parameters.
Table 4. Environmental configuration parameters.
Type of Obstacle Coordinate information/m Safetyradius(m)
build (40,50,7) (100,14,5)(160,70,6)(100,140,7)
(160,70,5)(144,120,4)(76,18,7)
5
rock (140,40,5)(70,110,6)(70,110,5)(95,80,3)
(50,170,5)(160,170,4)(43,10,3)
3
tree (10,15,3)(110,13,4)(12,100,15)(120,120,27)(170,130,30)(140,140,26)(180,140,36)(82,48,38) 1
lake (120,60,-2)(120,60,-2)(110,90,-2) 10
Table 5. Simulation data of the four algorithms.
Table 5. Simulation data of the four algorithms.
Algorithm Target Reachability Runtime (s) Path Length (m)
SSA Yes 1.72 307.29
GWO Yes 1.55 317.47
CPO Yes 1.14 281.93
ICPO Yes 0.69 238.78
Improvement/% 39.47 15.31
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.