# An Improved Novel Global Harmony Search Algorithm Based on Selective Acceptance
## 2 HS, IHS, SGHS, and NGHS Algorithms  
### Harmony Search Algorithm  
The harmony search was proposed by [PERSON] in 2001 [6]. Unlike other metaheuristic algorithms used to simulate the reproductive or foraging processes in the biological world, such as PSO and GA, the harmony search algorithm is inspired by a jazz trio and simulates its improvisation process [6]. The HS algorithm introduces musical notes to represent decision variables in practical problems. The number of musical notes is determined by the number of decision variables. Each note is played by a musician. Harmony requires two or more notes to be played at the same time. Thereby, each harmony represents a set of decision values. The HS algorithm simulates this in an improvisation process; hence, if the new harmony is better than the worst harmony, the new harmony will be saved to the harmony memory, and the worst harmony will be discarded from the harmony memory. Conversely, the new harmony will not be committed, and the worst harmony will not be discarded. The HS algorithm is superior to other heuristic algorithms in terms of solving continuous variable problems and combinatorial problems; for example, it is deemed to be more applicable that GA [6]. The HS algorithm works as follows [16]. * Step 1: Initialize the algorithm and problem parameters  
The main parameters of the harmony search algorithm include the harmony memory size (HMS), the harmony memory considering rate (HMCR), the pitch adjusting rate (PAR), and the bandwidth (BW). HMS is the total number of harmonies, which can be stored in the harmony memory (HM). HMCR determines whether musicians create a new harmony based on a harmony in the HM or not. PAR determines whether musicians fine-tune the musical note of a harmony that was selected in the HM or not. The bandwidth BW is the range, in which musicians fine-tune the selected harmony. Another parameter is the maximum number of iterations (NI), which denotes how many improvisations musicians have made to define the best harmony. In this step, the above parameters in the HS algorithm are determined. In addition, the current iteration (k) is set to 1. The HS algorithm is usually used in the D-dimensional optimization problem defined as minimization of f(x) subject to \(x_{j}\in\left[x_{jL},x_{jU}\right]\) (\(j=1,2\ldots D\)). Here, \(x_{jL}\) and \(x_{jU}\) are the lower and upper bounds for the decision variable \(x_{j}\). * Step 2: Initialize the harmony memory (HM)  
The number of harmony vectors stored in the HM is equal to HMS. A harmony vector is a set of decision variables. The initial values of the decision variable \(x_{i,j}^{k=0}\) (\(i=1,2,\ldots,\ HMS\)) are generated by Equation (1). In Equation (1), \(r\) is a random number in the range [0,1]. Here, \(x_{i,j}^{k}\) represents the \(j\)th decision variable in the \(i\)th harmony vector, when the current iteration is \(k\). The harmony memory (HM) is shown in Equation (2):  
\[x_{i,j}^{0}=x_{jL}+r\times\left(x_{jU}-x_{jL}\right) \tag{1}\]  
\[\text{HM}=\left[ \begin{array}{cccc}x_{1,1}^{0}&x_{1,2}^{0}&\cdots&x_{1,D}^{ 0}\\ x_{2,1}^{0}&x_{2,2}^{0}&\cdots&x_{2,D}^{0}\\ \vdots&\vdots&\ddots&\vdots\\ x_{HMS,1}^{0}&x_{HMS,2}^{0}&\cdots&x_{HMS,D}^{0}\end{array} \right] \tag{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 three mechanisms: memory consideration, pitch adjustment, and random selections. It is defined as in Algorithm 1.