# An Improved Novel Global Harmony Search Algorithm Based on Selective Acceptance
## 2 HS, IHS, SGHS, and NGHS Algorithms
### Noval Global Harmony Search Algorithm  
In 2010, the NGHS algorithm was proposed by [PERSON] et al. [13; 17; 18]. The algorithm proposed in their study combines the HS algorithm, GA, and the particle swarm optimization (PSO) algorithm. GA imitates a process of the biological evolution [4]. The genetic mutation probability (\(p_{m}\)) in GA was introduced to escape from the local optimum. Particle swarm optimization (PSO) imitates the foraging process of bird flocking [5]. The position update in the NGHS algorithm was inspired by the main characteristic of PSO implying that the position of the particles is affected by the best position of all particles [13]. Figure 1 illustrates the principle of the position update. \(step_{j}^{k}=|x_{best,j}^{k}-x_{worse,j}^{k}|\) is an adaptive step of the \(j\)th decision variable in the current iteration \(k\). The range between P and R is referred to as a truth region, which is centered at the global best harmony. In other words, the \(j\)th decision variable is generated randomly in a range of the truth region. In the early iteration, all solution vectors in the harmony memory are sporadic, and the truth region is wide, which means that the new harmony is generated randomly in a large range. It is beneficial to enhance the global search ability. In the late iteration, all solution vectors in the HM are inclined to move to the global optimum. Therefore, all solution vectors are concentrated within a small solution space, and the truth region is narrow, which enhances the local search ability of NGHS [13; 17; 18]. The NGHS algorithm works as follows. Figure 1: Schematic diagram of position update. * Step 1: Initialize the algorithm and problem parameters The genetic mutation probability (\(p_{m}\)), the current iteration \(k\), and the maximum number of iterations (NI) are set in this step. However, the harmony memory considering rate (HMCR), pitch adjusting rate (PAR), and the bandwidth (BW) are excluded from the NGHS algorithm. * Step 2: Initialize the harmony memory (HM) The initial values of the decision variable \(x_{i,j}^{k=0}\) (\(i=1,,\dots,\)\(HMS\)) are generated by Equation (1). The harmony memory (HM) is shown in Equation (2). * Step 3: Improvise a new harmony A new harmony vector \(x_{new,j}^{k}=(x_{new,1}^{k},x_{new,2}^{k},\cdots,x_{new,D}^{k})\) is improvised by Algorithm 3. ```
1:For\(j=1\) to \(D\)do
2:\(x_{R}=2\times x_{best,j}^{k}-x_{worse,j}^{k}\)
3:If\(x_{R}>x_{j|l}\)then
4:\(x_{R}=x_{j|l}\)
5:Else if\(x_{R}<x_{j|l}\)then
6:\(x_{R}=x_{j|L}\)
7:End
8:\(x_{new,j}^{k}=x_{worse,j}^{k}+r_{1}\times\left(x_{R}-x_{worse,j}^{k}\right)\%\)position update
9:If\(r_{2}\leq p_{m}\)then
10:\(x_{new,j}^{k}=x_{j|L}+r_{3}\times\left(x_{j|L}-x_{j|L}\right)\%\)genetic mutation
11:End
12:End
```  
**Algorithm 3** The Improvisation of New Harmony in NGHS  
Here, \(x_{best,j}^{k}\) and \(x_{worse,j}^{k}\) are the best harmony and the worse harmony in the harmony memory, when the current iteration is \(k\), respectively. \(r_{1}\), \(r_{2}\), and [PERSON]r_{3}\) are random numbers in the range of [0,1]:  
* Step 4: Update the harmony memory The new harmony replaces the worse harmony in the [PERSON], even if the worse harmony in the [PERSON] has better fitness than the new harmony. * Step 5: Check the stopping iteration If the current iteration \(k\) is equal to the stopping iteration (the maximum number of iterations is NI), the algorithm is terminated. Otherwise, set \(k=k+1\) and go back to step 3. **3. Selective Acceptance Novel Global Harmony Search Algorithm**  
[PERSON] et al. [19] pointed that the effectiveness of evolutionary algorithms relies on the extent of balance between diversification, which implies the ability of an algorithm to explore the high performance regions of the search space, and intensification, which is the ability of an algorithm to search for better solution in the high performance regions during the optimizing process.