Page 6 - Fister jr., Iztok, and Andrej Brodnik (eds.). StuCoSReC. Proceedings of the 2017 4th Student Computer Science Research Conference. Koper: University of Primorska Press, 2017
P. 6
orithm 1 Harmony Search. Table 1: Parameters’ Setting

1: Set the parameters HMS, HMCR, PAR, BW and Alg. NI HMCR PAR BW HM
2: NI or MAX FE, which are discussed in sections 2.1 and 3.
3: Initialize the HM and calculate the objective function value HS 5000 0.75 0.5 0.5 100
4: of each harmony vector.
PLHS 5000 0.8 0.5 0.55 [10, 1280]

5: Improvise a New Harmony Xnewas follows:

6: for j = 1 to n do than HMCR, the decision variable xnew(j) is generated from
memory consideration, otherwise, it is generated from ran-
7: if r1 < HMCR then dom initialization between [l(j), u(j)] (i.e. line no 20), which
8: xnew = xa(j) where a ∈ (1, 2, . . . , HMS) are the search boundaries. Therefore, HMCR controls the
9: if r2 < PAR then global search or exploration capability of the HS. Equation
10: xnew = xnew(j) ± r3 × BW no. (2) represents the action of HMCR. Every component
11: where r1, r2, r3 ∈ rand(0, 1) which is obtained by memory consideration is checked fur-
12: end if ther to determine whether it should be pitch adjusted or not.
The Pitch Adjustment Rate (PAR) is defined as assignment
13: if xnew(j) < l(j) then of the frequency adjustment and the bandwidth factor (BW)
14: xnew(j) = l(j) to control the local search of the HM. The pitch-adjustment
15: end if decision is calculated by equation no. (3).

16: if xnew(j) > u(j) then
17: xnew(j) = u(j)
18: end if

19: else xi(j) ∈ {x1(j), x2(j), . . . , xHMS(j)} (2)
20: xnew(j) = l(j) + r × (u(j) − l(j), where 
21: r ∈ rand(0, 1) with probability HMCR,
22: end if xnew(j) = l(j) + (u(j) − l(j) × rand(0, 1)
23: end for 
24: Update the HM as Xw = Xnew if f (Xnew) < f (Xw), with probability 1-HMCR.

25: where f (·) represents objective function value.

26: If stopping criterion is completed, the best harmony

27: vector Xb in the HM is returned; Otherwise go back to line 6. xnew(j) = xnew(j) = xnew(j) ± rand(0, 1) × BW



with - probability PAR,
xnew(j) = xnew(j)
parameters depends crucially on the type of problems. HS 

is guided by five parameters which are as follows: with probability (1-PAR).

(3)

a. Population size or Harmony Memory size (HM) Finding the Stopping Criterion is very crucial for different
optimization algorithms. In the experiments, two Stopping
b. Harmony-Memory Consideration Rate (HMCR) Criteria (SC) have been considered, which are as follows:

c. Pitch Adjusting Rate (PAR) 1st Stopping Criterion (SC1): First is the number of
times in which the best fitness values remain unchanged.
d. Distance Bandwidth (BW) Therefore, if the fitness value for the best harmony remains
the same in 10% of the total Number of Iterations (NI), then
e. Number of iterations (NI) the HS is stopped.
2nd Stopping Criterion (SC2): The other Stopping Cri-
In order to evade the tuning process, a parameterless variant terion is the number of Fitness Evaluations (FEs), and the
of the HS has been proposed which will be introduced in the maximum number of FEs (i.e. M AX F E) has been taken
next section. as 10,000.

3. DESIGN OF A PARAMETERLESS HAR- The values of the parameters of the traditional HS are same
MONY SEARCH ALGORITHM as [8], but the parameters’ values of the proposed PLHS are
set from the experience that is given as Table 1.
The performance of HS is influenced strongly by the values
assigned to parameters, i.e. HM, HMCR, PAR, BW and NI. The population size is also a crucial parameter in HS. It
In order to develop a new parameterless HS (PLHS), the in- is also reported that an appropriate population size (i.e.
fluence of these algorithm dependent parameters was stud- HM) is significant to both run-time efficiency and effective-
ied, which demonstrates that some algorithm parameters ness [10, 1]. A lower population size may suffer from lack of
such as, in this case, Number of Iterations (NI) could be set diversity, whereas the higher population size may affect the
wisely, while the optimal setting of other parameters are not convergence speed. In traditional HS, it is set as 100, but,
so easy. In the memory consideration step (i.e. line no. 7), in PLHS, it is varied in the interval HM ∈ [10, 1280] such
depending on the HMCR new solution, (xnew(j)) is gener- that each population size is multiplied by two in each run
ated by selecting randomly from a value in the current exist- starting with HM=10. Therefore, eight instances of PLHS
ing HM i.e. from the set of {x1(j), x2(j), . . . , xHMS(j)}. For have been executed (i.e. PL-1, . . ., PL-8) and the best one
this operation, one random number r1 is generated within is considered by the user.
the range of [0,1] from uniform distribution. If r1 is less

StuCoSReC Proceedings of the 2017 4th Student Computer Science Research Conference 6
Maribor, Slovenia, 11 October
   1   2   3   4   5   6   7   8   9   10   11