# An Efficient and Fast Hybrid GWO-JAYA Algorithm for Design Optimization
## 2 The FHGWJA Algorithm
Figure 1 shows the mutual positions of the cost function gradient \(\
abla\overset{\rightarrow}{W_{best}}\) evaluated at the current best record \(X_{best}^{\rightarrow}\) and the non-descent directions \(\overset{\rightarrow}{S_{i}}=\overset{\rightarrow}{X_{i}}-X_{best}^{ \rightarrow}\), \(\overset{\rightarrow}{S_{i,tr}}=X_{i,tr}^{\rightarrow}-X_{best}^{\rightarrow}\), and \((\overset{\rightarrow}{S_{i,tr}})^{\prime}=(\overset{\rightarrow}{X_{i,tr}} )^{\prime}-X_{best}^{\rightarrow}\); P\({}_{\text{best}}\) is the point of the search space corresponding to the current best record \(X_{best}^{\rightarrow}\) while the P\({}_{\text{i}}\), P\({}_{\text{i},\text{tr}}\), and \(\text{P}_{\text{i},\text{tr}}^{\prime}\) points, respectively, correspond to trial solutions \(\overset{\rightarrow}{X_{i}}\), \(\overset{\rightarrow}{X_{i,tr}}\), and \((X_{i,tr}^{\rightarrow})^{\prime}\). It can be seen from Figure 1 that non-descent directions make positive scalar products with the gradient \(\
abla\overset{\rightarrow}{W_{best}}\). Design may be improved with respect to \(X_{best}^{\rightarrow}\) by moving on the descent directions \(\overset{\rightarrow}{S_{i}}^{(mirr)}=-(\overset{\rightarrow}{X_{i}}-X_{best }^{\rightarrow})\), \(\overset{\rightarrow}{S_{i,tr}}^{(mirr)}=-(\overset{\rightarrow}{X_{i,tr}} -X_{best}^{\rightarrow})\), and \((\overset{\rightarrow}{S_{i,tr}})^{\prime\ (mirr)}=(\overset{\rightarrow}{X_{i,tr}} )^{\prime}-X_{best}^{\rightarrow}\) that are, respectively, opposite to the non-descent directions \(\overset{\rightarrow}{S_{i}}\), \(\overset{\rightarrow}{S_{i,tr}}\), and \((\overset{\rightarrow}{S_{i,tr}})^{\prime}\) and hence make negative scalar products with respect to \(\
abla\overset{\rightarrow}{W_{best}}\) (see Figure 1). Hence, FHGWJA uses a \"mirroring\" strategy to define the new trial solution \((X_{i,tr}^{\rightarrow})^{\prime\ (mirr)}\) as follows:  
\[(X_{i,tr}^{\rightarrow})^{\prime\prime,mirr}=X_{best}^{\rightarrow}+\eta_{mirr,i}\overset{\rightarrow}{S_{i}}^{(mirr)}+\eta_{mirr,i-tr}\overset{ \rightarrow}{S_{i,tr}}^{(mirr)}+\eta_{mirr,(i-tr)}(\overset{\rightarrow}{S_{ i,tr}})^{\prime\ (mirr)} \tag{15}\]  
where \(\eta_{\text{mirr},i}\), \(\eta_{\text{mirr},i-tr}\), and \(\eta_{\text{mirr},(i-tr)}\) are three random numbers in the [0,1] interval. Basically, FHGWJA takes the descent direction \(((X_{i,tr}^{\rightarrow})^{\prime\ (mirr)}-X_{best}^{\rightarrow})\) obtained by combining three other descent directions that may improve design. Hence, the \((X_{i,tr}^{\rightarrow})^{\prime\prime\ (mirr)}\) trial solution (corresponding to the point \(\text{P}_{\text{i},\text{tr}}^{\prime\prime(\text{mirr})}\) of search space shown in Figure 1) is very likely to improve design. The new solution \((X_{i,tr}^{\rightarrow})^{\prime\prime\ (mirr)}\) is evaluated as outlined above for the other trial solutions generated by FHGWJA. Step 5. Resort population, update \(\alpha\), \(\beta\), and \(\delta\) wolves, \(X_{best}^{\rightarrow}\), and \(X_{worst}^{\rightarrow}\)  
Once FHGWJA updated all candidate solutions \(\overset{\rightarrow}{X_{i}}\), the population is resorted and the \(N_{\text{POP}}\) individuals are ranked with\({}^{\prime}\) respect to their penalty function values. Should \(W_{p}(\overset{\rightarrow}{X_{i,tr}})\) or \(W_{p}((\overset{\rightarrow}{X_{i,tr}})^{\prime}\) be greater than \(W_{p}(\overset{\rightarrow}{X_{i}})\), all new trial solutions generated/refined for \(\overset{\rightarrow}{X_{i}}\) are rejected and the old design \(\overset{\rightarrow}{X_{i}}\) is retained in the population. However, the elitist strategies based on the \(1.1W(X_{best}^{\rightarrow})\) threshold, JAYA-based schemes of Equations (13) and (14), and the \"mirroring\" strategy of Equation (15) greatly increase the probability of updating the whole population with better designs than those stored in the previous population.