# A New Fuzzy Harmony Search Algorithm Using Fuzzy Logic for Dynamic Parameter Adaptation
## 2 Methodology for Parameter Adaptation  
Harmony search is relatively a new metaheuristic optimization algorithm inspired by music and was first proposed by [PERSON] et al. in 2001 [1; 21; 22]. The HS algorithm is defined by Equations (1)-(3), which are the equations to control the exploitation and exploration of the search domain, respectively [10]. \[HMR\in[0,1] \tag{1}\]  
\[x_{new}=x_{old}+b_{p}\left(2\;rand-\;1\right) \tag{2}\]  
\[P_{a}=\;P_{lower\;limit}+P_{range}\times rand \tag{3}\]  
The _HMR_ and _PArate_ parameters introduced in the improvisation process help the algorithm to find globally and locally improved solutions. The traditional HS algorithm uses fixed values for the _HMR_ and _PArate_ parameters whereas the improvement suggested in [23] varies the _PArate_ and bandwidth (bw) parameters throughout the iterations. Inspired by their modification, the paper presents a new fuzzy harmony search algorithm (FHS). Mathematical Description of the Fuzzy Harmony Search (FHS) Algorithm  
The mathematical description for FHS is defined as follows: Equation (1) shows the fundamental part of the traditional HS algorithm; where the harmony memory accepting (_HMR_) is represented by a constant value. Equation (2) shows the fundamental part of the traditional HS algorithm, where the pitch adjusting (_PArate_) is represented by a constant value. Equations (1) and (2) describe the different ways the basic equations of HS are modified for achieving the goal, and then, convert part of it into fuzzy parameters. The differences between both equations are that _HMR_ in Equation (1) and _PArate_ in Equation (2) are those that change, because an essential part of the proposed method lies in these two parameters. Traditionally, these two parameters are constant; in this case, due to the importance of these two parameters, they are converted into fuzzy parameters. Therefore, for designing the fuzzy systems, which dynamically adjust the _HMR_ and _PArate_ parameters, the measure of percentage of iterations is considered as the input. All the fuzzy systems are of Mamdani type because it is more common to use them in this type of fuzzy control and the defuzzification method is the centroid. In this case, this type of defuzzification was used because other researchers have achieved good results with this method. In this case, these values are considered fuzzy because they are changing dynamically when the FHS is running, and are defined by Equations (4) and (5), where _HMR_ and _PArate_ are changing values in the range [0,1]. \[HMR=\frac{\sum_{i=1}^{r_{hmr}}\mu_{i}^{hmr}\ (hmr_{1i})}{\sum_{i=1}^{r_{hmr}}\mu_{i}^{ hmrr}} \tag{4}\]  
where _HMR_ is the harmony memory accepting rate; _r\({}_{hmr}\)_ is the number of rules of the fuzzy system corresponding to _hmr_; _hmr_1i is the output result for rule \(i\) corresponding to _hmr_; _\(\mu_{i}^{hmr}\)_ is the membership function of rule \(i\) corresponding to _hmr_. \[PArate=\frac{\sum_{i=1}^{r_{plate}}\mu_{i}^{PArate}\ (PArate_{1i})}{\sum_{i=1}^{r_{ plate}}\mu_{i}^{PArate}} \tag{5}\]  
where _PArate_ is the pitch adjusting; _r\({}_{PArate}\)_ is the number of rules of the fuzzy system corresponding to _PArate_; _\(\mu_{i}^{PArate}\)_ is the membership function of rule \(i\) corresponding to _PArate_. Fuzzy logic is based on fuzzy set theory proposed by [PERSON] in 1965, which helps us in modeling knowledge, through the use of if-then fuzzy rules. The fuzzy set theory provides a systematic calculus to deal with linguistic information, and that improves the numerical computation by using linguistic labels stipulated by membership functions [19,20]. The parameters of _HMR_ and _PArate_ are selected to be modified using fuzzy logic, since these parameters account for controlling the exploitation and exploration of the search domain.