# An Enhanced Crowned Porcupine Optimization Algorithm Based on Multiple Improvement Strategies
## 3 Improved Crowned Porcupine Optimization Algorithm
### Adaptive Step Size Strategy  
ICPO introduces an adaptive step size strategy to dynamically adjust the magnitude of position updates based on the current state of the optimization process. The adaptive step size is calculated by combining the following three key factors:  
1. Time-dependent Factor: The time-dependent factor, \(Y_{t}\) is calculated using Equation (13): \[Y_{t}=2r_{1}\left(1-\frac{t}{T_{max}}\right)^{\frac{t}{T_{max}}}\] (13)  
In the equation, \(t\) represents the current iteration number, \(T_{max}\) is the maximum number of iterations, and \(r_{1}\) is a random number between 0 and 1. As the algorithm progresses, \(Y_{t}\) gradually decreases, facilitating a smooth transition from broad exploration in the early stages to fine-tuned exploitation in the later stages.
2. Fitness-based Factor: The fitness-based factor is computed in two different ways, depending on the defense mechanism used:  
For the third defense mechanism, the fitness-based factor is calculated as shown in Equation (14):  
\[S_{t}=\exp\left(\frac{f_{i}}{\sum_{j=1}^{N}f_{j}+\varepsilon}\right) \tag{14}\]  
For the fourth defense mechanism, the fitness-based factor is computed as shown in Equation (15):  
\[M_{t}=\exp\left(\frac{f_{i}}{\sum_{j=1}^{N}f_{j}+\varepsilon}\right) \tag{15}\]  
In these equations, \(f_{i}\) represents the fitness value of the current solution, \(N\) is the population size, and \(\varepsilon\) is a small constant to prevent division by zero. The fitness factor adjusts the step size based on the relative fitness of the current solution, giving greater influence to solutions with better fitness values.
3. Chaotic Factor: The chaotic factor \(S\) is calculated using Equation (16):  
\[S=r_{2}U_{2} \tag{16}\]  
In this equation, \(r_{2}\) is a random number within the interval \([0,1]\), and \(U_{2}\) is a binary vector with elements randomly set to 0 or 1. The chaotic factor introduces randomness into the step size calculation, helping to maintain population diversity and potentially escape local optima.  
The adaptive step size is then integrated into the position update equations for the third and fourth defense mechanisms.  
For the third defense mechanism, the position update is expressed as shown in Equation (17):  
\[X_{i}=(1-U_{1})X_{i}+U_{1}\big{(}X_{r}+Y_{t}S_{t}\big{(}X_{p}-X_{q}\big{)}-S \big{)} \tag{17}\]  
For the fourth defense mechanism, the position update is expressed as shown in Equation (18):  
\[X_{i}=\big{(}X_{g}+Y_{t}(\alpha(1-r_{3})+r_{3})\big{(}U_{2}\odot X_{g}-X_{i} \big{)}\big{)}-M_{t}S \tag{18}\]In these equations, \(X_{i}\) represents the current solution's position, \(X_{r}\), \(X_{p}\) and \(X_{q}\) are randomly selected solutions, \(X_{g}\) is the global best solution, \(U_{1}\) is a random vector with values between 0 and 1, \(\alpha\) is the convergence rate parameter, and \(r_{3}\) is a random number between 0 and 1. The symbol \(\odot\) represents the Hadamard product (element-wise multiplication).  
The adaptive step size strategy proposed in ICPO provides the algorithm with dynamic search behavior. The time-dependent factor ensures a smooth transition from exploration in the early stages to exploitation in the later stages. The fitness-based factor guides the search by adjusting the step size based on the relative fitness of the solutions, allowing the algorithm to focus more intensely on promising regions of the search space. The chaotic factor introduces randomness into the search, helping to prevent premature convergence. This combination of factors enables ICPO to adjust its search behavior based on the global optimization state and local fitness landscape, achieving faster and more reliable convergence to high-quality solutions.