## 2 Harmony Search Algorithm and Selected Variants
### Improved Harmony Search (IHS)
```
1: Set \(HMS\), \(HMCR\) using (11), \(PAR\) using (12), \(BW\) using (14), and \(MaxImp\)
2:\(x_{i}^{j}=LB_{i}+U(0,1)\times(UB_{i}-LB_{i}),\forall i=1,2,...,n\) and \(\forall j=1,2,...,HMS\)
3: Compute \(f(x),\forall j=1,2,...,HMS\)
4:while\((t\leq MaxImp)\)do
5:for each \(i\in[1,n]\)do
6:if\(U(0,1)\leq HMCR_{t}\)
7:\(x_{i}^{\prime}=x_{i}^{\prime}\) where \(j\sim U(1,HMS)\)
8:if\(U(0,1)\leq PAR_{t}\)
9: compute \(coef\) using (15)
10:\(x_{i}^{\prime}=x_{i}^{\prime}+BW_{t}\timescoef_{t}\)
11:if\((x_{i}^{\prime}>UB_{i}\) or \(x_{i}^{\prime}<LB_{i})\)
12:\(x_{i}^{\prime}=x_{i}^{\prime}\mp BW_{t}\timescoef_{t}\)
13:endif
14:endif
15:else
16:\(UB_{i}^{HM}=x_{i}^{\prime worst}\) and \(LB_{i}^{HM}=x_{i}^{best}\)
17:\(UB_{i}^{j}=UB_{i}^{HM}+BWmax\) and \(LB_{i}^{\prime}=LB_{i}^{HM}-BWmax\)
18:\(x_{i}^{\prime}=LB_{i}^{\prime}+U(0,1)\times(UB_{i}^{j}-LB_{i}^{\prime})\)
19:endif
20:endfor
21:if\(f(x^{\prime})<f(x^{\prime worst})\)then
22: replace \(x^{\prime worst}\) in HM with \(x^{\prime}\)
23:endif
24:endwhile
```
**Algorithm 7********Global Dynamic Harmony Search

### Parameter Adaptive Harmony Search (PAHS)

The Parameter Adaptive Harmony Search (PAHS) [59] focused on the modification of the improvisation step of IHS [50]. The dynamic values of \(HMCR\), \(PAR\), and \(BW\) are generated during each iteration to ensure the global optima is achieved. The authors explored four different combinations of dynamic \(HMCR\) and \(PAR\) iterative values i.e., (i) linear \(HMCR\) and \(PAR\); (ii) exponential \(HMCR\) and linear \(PAR\); (iii) linear \(HMCR\) and exponential \(PAR\); and, (iv) exponential \(HMCR\) and \(PAR\). Through computational experiments,it was concluded that linear \(HMCR\) and exponential \(PAR\) yields the best performance. In this way, \(HMCR\) gradually increases, while \(PAR\) exponentially decreases with respect to the iterations. \(HMCR\) and \(PAR\) at each iteration are computed using:

\[HMCR_{t}=HMCRmin+(HMCRmax-HMCRmin)\times\frac{t}{MaxImp}, \tag{16}\]

\[PAR_{t}=PARmax\times(\frac{PARmin}{PARmax})^{\frac{t}{MaxImp}}, \tag{17}\]

whereas, \(BW\) is adapted from IHS as it is. PAHS further aggravates the difficulty of finding suitable values as there are six parameters to be set now, rather than only four in IHS. PAHS is detailed in Algorithm 8. ```
1: Set \(HMS\), \(HMCR\) using (16), \(PAR\) using (17), \(BW\) using (6), and \(MaxImp\)
2:\(x_{i}^{j}=LB_{i}+U(0,1)\times(UB_{i}-LB_{i}),\forall i=1,2,...,n\) and \(\forall j=1,2,...,HMS\)
3: Compute \(f(\mathbf{x}^{i}),\forall j=1,2,...,HMS\)
4:while\((t\leq MaxImp)\)do
5:for each \(i\in[1,n]\)do
6:if\(U(0,1)\leq HMCR_{t}\)then
7:\(x_{i}^{j}=x_{i}^{j}\), where \(j\sim U(1,HMS)\)
8:if\(U(0,1)\leq PAR_{t}\)then
9:\(x_{i}^{j}=x_{i}^{j}+(2\times U(0,1)-1)\times BW_{t}\)
10:endif
11:else
12:\(x_{i}^{j}=LB_{i}+U(0,1)\times(UB_{i}-LB_{i})\)
13:endif
14:endfor
15:if\(f(\mathbf{x}^{\prime})<f(\mathbf{x}^{worst})\)then
16: replace \(\mathbf{x}^{worst}\) in HM with \(\mathbf{x}^{\prime}\)
17:endif
18:endwhile
```
**Algorithm 8********Parameter Adaptive Harmony Search

### Enhanced Self-Adaptive Global Best Harmony Search (ESHS)

The Enhanced Self-Adaptive Global Best Harmony Search (ESHS) [60] is one of the recent HS variants that retains the simplicity and distinctive framework of SHS. In order to eliminate the troublesome parameter fine-tuning process in SHS, a new parameter setting-free strategy is proposed without requiring any extra statistic and external archive. \(HMCR\) is dynamically obtained at each iteration as a random normal number,

\[HMCR_{t}=N(\frac{n}{1+n},\frac{1}{1+n}), \tag{18}\]

while \(PAR\) is given by:

\[HMCR=1-\frac{1}{n+1}. \tag{10}\]0

and \(BW\) is defined by:

\[BW_{t}= \begin{cases}|x_{i}^{h}-x_{i}^{\prime}|&x_{i}^{h}\
eq x_{i}^{\prime}, \quad h\sim U(1,HMS)\\ (UB_{i}-LB_{i})\times e^{(LB_{i}-UB_{i})\frac{t}{MaxImp}}&\text{otherwise} \end{cases} . \tag{20}\]

ESHS employs the Gaussian mutation technique in contrary to the uniform randomization in SHS.