## 3 Results and Discussions
### WoA-BPNN Modeling  
BPNN is a multilayer feedforward neural network trained according to the error back-propagation algorithm [37]. [PERSON] proposed the whale optimization algorithm (WOA) in 2016 [31]. This algorithm draws inspiration from the humpback whales' unique feeding strategy, simulating their foraging behavior to enhance global search capabilities. It consists of three phases: encircling prey, the bubble-net attacking method, and searching for prey, as illustrated in the flowchart in Figure 4.  
(1) Encircling Prey. The mathematical model of a whale encircling prey is:  
\[\overrightarrow{X}(t+1)=\overrightarrow{X^{t}}(t)-\overrightarrow{A}\cdot \overrightarrow{D} \tag{4}\]  
\[\overrightarrow{D}=\left|\overrightarrow{C}\cdot\overrightarrow{X^{t}}(t)- \overrightarrow{X}(t)\right| \tag{5}\]  
where \(t\) indicates the current iteration number, \(\overrightarrow{X^{t}}(t)\) is the current position vector of the best solution, \(\overrightarrow{X}(t)\) is the current position vector, and \(\overrightarrow{A}\) and \(\overrightarrow{C}\) are coefficient vectors. The specific formula is as follows:  
\[\overrightarrow{A}=2\overrightarrow{a}\cdot\overrightarrow{r}-\overrightarrow {a} \tag{6}\]  
\[\overrightarrow{C}=2\cdot\overrightarrow{r} \tag{7}\]  
Figure 3: Interaction effect of process parameters on the hardness of the hardened layer. (**a**) Laser power and scanning speed (10 kHz); (**b**) laser power and induced power (10 kHz); (**c**) scanning speed and induced power (10 kHz); (**d**) laser power and scanning speed (15 kHz); (**e**) laser power and induced power (15 kHz); (**f**) scanning speed and induced power (15 kHz). where \(\overrightarrow{r}\) is the random vector in \([0,1]\), and \(\overrightarrow{a}\) is the distance control factor, which decreases linearly from 2 to 0 during the iteration process:  
\[\overrightarrow{a}=2\cdot\left(1-\frac{t}{MaxIter}\right) \tag{8}\]  
where _MaxIter_ is the maximum number of iterations. (2) Bubble-net Attacking Method. The mathematical model of the whale bubble-net attacking method is:  
\[\overrightarrow{X}(t+1)=\left\{ \begin{matrix}\overrightarrow{X^{k}}(t)- \overrightarrow{A}\times\overrightarrow{D}&ifp<0.5\\ \overrightarrow{D^{\prime}}\times e^{bl}\times\cos(2\pi l)+\overrightarrow {X^{k}}(t)&ifp>0.5\end{matrix} \right. \tag{9}\]  
where \(\overrightarrow{D^{\prime}}=\left|\overrightarrow{X^{k}}(t)-\overrightarrow {X}(t)\right|\) renders the distance from the first whale to the prey. \(l\) is a random value between \([-1,\,1]\), and b is a spiral constant. When \(p<0.5\), it is a narrowing encircling predation behavior. Conversely, it is a spiral bubble predation behavior. Figure 4: Flowchart of the whale optimization algorithm. (3) Search for Prey. The mathematical model for the random search hunt for whales is:  
\[\overset{\rightarrow}{D}=\left|\overset{\rightarrow}{\mathcal{C}}\cdot \overrightarrow{X_{rand}}-\overset{\rightarrow}{X}\right| \tag{10}\]  
\[\overset{\rightarrow}{X}(t+1)=\overrightarrow{X_{rand}}-\overset{ \rightarrow}{A}\cdot\overset{\rightarrow}{D} \tag{11}\]  
where \(\overrightarrow{X_{rand}}\) is the position vector of an individual whale randomly selected from the population. Optimization of BPNN using the WOA helps to find the optimal initial weights and thresholds and requires fewer adjustment parameters. This compensates for the shortcomings of BPNNs, which are prone to falling into local optimal solutions. Figure 5 shows the topology of the BPNN model structure optimized based on the whale algorithm. From the 34 samples prepared in the BBD experiment and the 20 randomly generated samples, 80% were selected as training samples and 20% as test samples. The WOA-BPNN model addresses the challenge of predicting the depth and hardness of the hardened layer under varying induction frequencies. This model features four input neurons representing induction frequency, laser power, scanning speed, and induction power.