## 3 Optimization Algorithms
### Grasshopper Optimization Algorithm (GOA)  
Grasshoppers are kinds of insects that are observed individually in nature. They live in a huge swarm in both nymph and adulthood phases [80; 81]. In contrast to their nymph phase in which their swarm takes move in small steps, in adulthood phase they take long-range steps. The GOA algorithm is defined based on their behavior where the small steps are considered for exploitation phase and big steps are used for exploration phase. Like SSA, every grasshopper search agent has a position (\(X_{j}\)) made of n-dimension, which is defined as follows:  
\[X_{j}=c_{1}S_{j}+c_{2}Z_{j}+c_{3}W_{j} \tag{5}\]  
where \(S_{j},~{}Z_{j}\), and \(W_{j}\) are, respectively, social interaction, gravity force, and wind advection on the jth search agent, and \(c_{1}\), \(c_{2}\), and \(c_{3}\) are random number between zero and one to make random behavior. The following equation discuss the social interaction (\(S_{r}\)):\[S_{r}=\sum_{ \begin{subarray}{c}m=1\\ m\
eq r\end{subarray} }^{n}s\left(d_{rm}\right)\overline{d_{rm}} \tag{6}\]  
where \(d_{rm}\) is the distance between the \(r\)th and \(m\)th grasshopper, computed as \(d_{rm}=\left|x_{m}-x_{r}\right|\), \(\overline{d_{rm}}\) is a unit vector from the rth to mth grasshopper, computed as \(\overline{d_{rm}}=\frac{x_{m}-x_{r}}{d_{rm}}\), and s is a function to describe the social forces' strength represented as follows:  
\[s(r)=ia\times e^{\frac{-r}{lc}}-e^{-r} \tag{7}\]  
where \(lc\) and \(ia\) are the intensity of attractive and attraction length scale, respectively. Based on the distance between two grasshoppers, they apply force on each other. This force could be absorption for far grasshoppers and repulsion for close grasshoppers. However, there is an exact value of distance, in which grasshoppers apply no force on each other, which called comfort zone. Moreover, \(Z_{i}\) and \(W_{i}\) are calculated as follows:  
\[Z_{i}=-z\widehat{e_{x}} \tag{8}\]  
\[W_{i}=u\widehat{e_{w}} \tag{9}\]  
where \(z\) and \(\widehat{e_{x}}\) are the constant of gravity and a unity vector towards the earth's center, respectively, and \(u\) and \(\widehat{e_{w}}\) are the constant of gravity drift and a unity vector in the wind's direction, respectively. A modified version of the Equation (5) is represented as follows:  
\[X_{i}^{q}=h\left(\sum_{ \begin{subarray}{c}j=1\\ j=i\end{subarray} }^{N}h\frac{ub_{q}-lb_{q}}{2}s\left(\left|x_{j}^{q}-x_{i}^{q} \right|\right)\frac{x_{j}-x_{i}}{d_{ij}}\right)+\widehat{T_{q}} \tag{10}\]  
where \(ub_{q}\) and \(lb_{q}\) are the upper bound and the lower bound in the \(q\)th dimension, respectively, \(\widehat{T_{q}}\) is the \(q\)th dimension of the target position, \(h\) is a decreasing coefficient to shrink the comfort zone. In the first iteration the rate of exploration is higher than that in the final iterations. Therefore, \(h\) should decrease as the algorithm get close to its end. The h parameter is calculated as follows:  
\[h=h_{max}-IT\frac{h_{max}-h_{min}}{R} \tag{11}\]  
where \(IT\) is the number of maximum iterations and \(h_{max}\) and \(h_{min}\) are 1 and 0.00001, respectively. Algorithm 3 represents the different steps of the GOA. ```
1:Initiate random grasshopper population considering the upper and lower bounds
2:Calculate the fitness function for each grasshopper
3:Target = best grasshoppers
4:\(B\) = Maximum number of iterations
5:\(b\) = 1
6:while (\(b<B\))
7: Update \(h\) using Equation (11)
8:\(N\) = the number of grasshoppers
9:for each grasshopper
10: Normalize the distance between grasshoppers in [1,4]
11: Update the position of the current grasshopper using Equation (10)
#### Artificial Neural Network (ANN)

ANN is an AI based method that simulates human brain to learn machines. ANN can solve new problems using past experiences like human brain. The most popular type of ANN is multi-layer perceptron (MLP).