# Multi-Strategy Hybrid Whale Optimization Algorithm Improvement
## 3 Multi-Strategy Hybrid Improved Whale Optimization Algorithm
### Simulate Annealing Strategy  
Simulated annealing (SA) is a classical evolutionary algorithm. Its core lies in applying the idea of material annealing in metallurgy to the optimization problem. SA has good performance in solving numerous problems. It consists of three main parts. Firstly, the distribution position of molecules is initialized through the heating stage, and the thermal motion is used to make them appear irregular in distribution so as to enhance the randomness of the search. Then the molecule enters the isothermal phase, and through the exchange of heat with the external environment, its trajectory will gradually tend to the equilibrium state. Finally, there is the cooling stage where the molecular motion begins to weaken and gradually plateau due to the decrease in temperature. The overall principle of SA is to reflect the optimization results in the form of energy changes, and its ultimate purpose is to find the position with the lowest energy. In this process, the algorithm needs to be initialized by warming up, and then the Metropolis sampling process is simulated by the isothermal stage. This criterion is the key to the optimization of the algorithm, and the solution is jumped by a certain probability in order to escape from the local optimum. As shown in Figure 3, let us assume the initial state is at point A. With the iteration, the algorithm updates to the local optimum at point B. If it is observed that the energy at point B is lower than at point A, it indicates that we are approaching the optimal solution. Therefore, the transition to point B is accepted with a probability of 100%. However, after reaching point B, if the energy increases in the next step, unlike in gradient descent where further progression is not allowed, in SA, there is a probability of escaping from this local optimum. This probability depends on various factors, including the current state and energy. Consider a system with the previous state \(\overrightarrow{X(n)}\). Based on either gradient descent or the energy criterion discussed earlier, the system transitions to a new state \(X(n+1)\). Correspondingly, the system's energy changes from \(\overrightarrow{E(n)}\) to \(E(n+1)\). The acceptance probability \(P\), by which the system transitions from \(\overrightarrow{X(n)}\) to \(X(n+1)\), can be expressed using Equation (21). Figure 3: A diagram of the simulated annealing algorithm solution. It can be seen from Equation (21) that in the case of energy reduction, the system is still searching for the global optimum, and this new better solution can be accepted with 100% probability. On the contrary, the system does not immediately discard the worse solution when the energy increases but decides whether to adopt the worse solution by judging whether the random parameter \(\varepsilon\) is less than \(P\). If it is less than \(P\), it will be accepted; otherwise, it will be rejected. In this case, \(\varepsilon\) belongs to [0, 1]. The value of \(P\) is determined by the change in energy and the parameter \(T\). Therefore, it is a dynamic value, reflecting the current optimization phase of the algorithm and the temperature parameter. \[P=\left\{ \begin{array}{c}1,\;E(\overset{\rightarrow}{n+1})<\overset{ \rightarrow}{E(n)}\\ exp^{-\frac{E(n+1)-E(n)}{T}},E(\overset{\rightarrow}{n+1})\geq E(n)\end{array} \right. \tag{21}\]  
By reason of the foregoing, we insert the simulated annealing strategy into the iterative strategy of WOA to improve its optimization ability. After updating the position of each individual, the algorithm calculates the distance between solutions, as shown in Equation (22), and the decisions based on this value are intended for a minimization algorithm. If the difference is less than 0, it indicates that the new solution is better than the old one, so the new solution is directly adopted. If the difference is greater than or equal to 0, it means that the new solution is worse than the old one.