# An Advanced Crow Search Algorithm for Solving Global Optimization Problem
## 2 Related Work
### Conventional CS Algorithm  
The conventional CS algorithm proposed by [PERSON] describes the intelligent behavior of crows and performs optimization by repeating the following five steps [14]:  
_Step 1._ Define the problem and set the parameters  
The problem undergoing optimization is defined, and the initial value of the parameters used in the conventional CS algorithm are set. The parameters used in the conventional CS algorithms are \(AP\) (awareness probability), \(fl\) (flight length), \(N\) (flock size), \(pd\) (dimension of problem), and \(t_{max}\) (maximum number of generations).  
_Step 2._ Initialize the memory of crows and evaluate  
The size of the crow group, determined by \(pd\) and the size of \(N\), is expressed as Equation (1), and the initial position of each crow is randomly assigned within the range between \(lb\) (lower boundary) and \(ub\) (upper boundary). In this context, \(i\) is \(1,2,\ldots,N\), \(t\) are \(1,2,\ldots,t_{max}\), and \(d\) is \(pd\). The initial position of the randomly placed crow is remembered as Equation (2), and the initial position of the crow is evaluated by object function.  
\[Crows_{i,t}=\begin{bmatrix}x_{i}^{1}&\cdots&x_{i}^{d}\\ \vdots&\vdots&\vdots\\ x_{N}^{1}&\cdots&x_{N}^{d}\end{bmatrix} \tag{1}\]\[CrowsMemory_{i,t}=\begin{bmatrix}m_{i}^{1}&\cdots&m_{i}^{d}\\ \vdots&\vdots&\vdots\\ m_{N}^{1}&\cdots&m_{N}^{d}\end{bmatrix} \tag{2}\]  
_Step 3._ Generate and evaluate the new positions for crowds  
Step 3 is the most important step that the conventional CS algorithm uses to perform optimization. Crow \(i\) (\(x_{i,t}\)) follows crowd \(j\) (\(m_{j,t}\)), and two cases are proposed depending on whether crow \(j\) is aware of crow \(i\)'s following. The first case is that crow \(j\) (\(m_{j,t}\)) does not recognize crow \(i\) (\(x_{i,t}\))'s following. The position of crow \(i\) (\(x_{i,t}\)) is adjusted by Equation (3), where \(r_{i}\) is a random number between 0 and 1. In addition, a local (\(fl<1\)) or global (\(fl>1\)) area search is performed depending on the size of \(fl\), and it is known to have the best convergence performance when using \(fl=2.0\). Figure 2 is a diagram that expresses this characteristic.  
\[x_{i,t+1}=x_{i,t}+r_{i}\times fl\times(m_{j,t}-x_{i,t}) \tag{3}\]  
\[x_{i,t+1}=a\text{ }random\text{ }position \tag{4}\]  
The second case is that crow \(j\) (\(m_{j,t}\)) recognizes crow \(i\) (\(x_{i,t}\))'s following. In this instance, the position of crow \(i\) is adjusted by Equation (4), moving to a random position in the range between \(lb\) and \(ub\). Two cases are selected from each generation by the \(AP\), and the \(AP\) mainly uses 0.1. Relative to the size of \(AP\), the conventional CS algorithms perform exploitation and exploration in order to find the optimal solutions. The positions of the newly moved crows are again evaluated by the objective function.  
_Step 4._ Update the memory  
The results are compared by evaluating the crow position change using Equations (3) and (4) with the evaluation of crowds stored in memory. Comparing the evaluation results, the better crow position is updated in the crow's memory.  
_Step 5._ Termination of repetition  
The process of Steps 2-4 is repeated continuously, and when \(t\) reaches \(t_{max}\), the performance of the conventional CS algorithm is terminated in order to derive optimization results. The pseudo code of the above-mentioned process is provided in Algorithm 1.  
Figure 2: Comparison results of benchmark function: (a) \(fl<1\). (b) \(fl>1\).  
```
Initialize the parameters(\(AP\), \(fl\), \(N\), \(pd\), \(t_{max}\))  Initialize the position of crows in the search space and memorize  Evaluate the position of crows while\(t<t_{max}\)do  Randomly choose the position of crows for\(i=1:N\)do if\(r_{i}\geq AP\)then \(x_{i,t+1}=x_{i,t}+r_{i}\times fl\times(m_{j,t}-x_{i,t})\) else \(x_{i,t+1}=a\) random position endif endfor  Evaluate the new position of crows  Update the memory of crows endwhile  Show the results
```  
**Algorithm 1** Pseudo code of the conventional CS algorithm