Information Technology Reference
In-Depth Information
quantitative optimization process in 2001, and the three corresponding components be-
come: usage of harmony memory, pitch adjusting, and randomization [1].
The usage of harmony memory (HM) is important because it ensures that good har-
monies are considered as elements of new solution vectors. In order to use this memory
effectively, the HS algorithm adopts a parameter r accept
[0,1], called harmony memory
considering (or accepting) rate. If this rate is too low, only few elite harmonies are se-
lected and it may converge too slowly. If this rate is extremely high (near 1), the pitches
in the harmony memory are mostly used, and other ones are not explored well, leading
not into good solutions. Therefore, typically, we use r accept =0.7 ~ 0.95.
The second component is the pitch adjustment which has parameters such as
pitch bandwidth b range and pitch adjusting rate r pa . As the pitch adjustment in music
means changing the frequency, it means generating a slightly different value in the
HS algorithm [1]. In theory, the pitch can be adjusted linearly or nonlinearly, but in
practice, linear adjustment is used. So we have
xx (3)
where x old is the existing pitch stored in the harmony memory, and x new is the new
pitch after the pitch adjusting action. This action produces a new pitch by adding
small random amount to the existing pitch [2]. Here
=
+
b
×
ε
new
old
range
is a random number from uni-
form distribution with the range of [-1, 1]. Pitch adjustment is similar to the mutation
operator in genetic algorithms. We can assign a pitch-adjusting rate ( r pa ) to control the
degree of the adjustment. A low pitch adjusting rate with a narrow bandwidth can
slow down the convergence of HS because of the limitation in the exploration of only
a small subspace of the whole search space. On the other hand, a very high pitch-adjusting
rate with a wide bandwidth may cause the solution to scatter around some potential optima
as in a random search. Thus, we usually use r pa =0.1~0.5 in most applications.
ε
Harmony Search
begin
Define objective function f( x ), x =(x 1 ,x 2 , …,x d ) T
Define harmony memory accepting rate (r accept )
Define pitch adjusting rate (r pa ) and other parameters
Generate Harmony Memory with random harmonies
while ( t<max number of iterations )
while ( i<=number of variables)
if (rand<r accept ), Choose a value from HM for the variable i
if (rand<r pa ), Adjust the value by adding certain amount
end if
else Choose a random value
end if
end while
Accept the new harmony (solution) if better
end while
Find the current best solution
end
Fig. 1. Pseudo code of the Harmony Search algorithm
Search WWH ::




Custom Search