Harmony Search was inspired by the improvisation of Jazz musicians. Specifically, the process by which the musicians (who may have never played together before) rapidly refine their individual improvisation through variation resulting in an aesthetic harmony.
Each musician corresponds to an attribute in a candidate solution from a problem domain, and each instrument’s pitch and range corresponds to the bounds and constraints on the decision variable. The harmony between the musicians is taken as a complete candidate solution at a given time, and the audiences aesthetic appreciation of the harmony represent the problem specific cost function. The musicians seek harmony over time through small variations and improvisations, which results in an improvement against the cost function.
The information processing objective of the technique is to use good candidate solutions already discovered to influence the creation of new candidate solutions toward locating the problems optima. This is achieved by stochastically creating candidate solutions in a step-wise manner, where each component is either drawn randomly from a memory of high quality solutions, adjusted from the memory of high-quality solutions, or assigned randomly within the bounds of the problem. The memory of candidate solutions is initially random, and a greedy acceptance criteria is used to admit new candidate solutions only if they have an improved objective value, replacing an existing member.
The adjustment of a pitch selected from the harmony memory is typically linear, for example for continuous function optimization:
x = x + range*e
where range is a the user parameter (pitch bandwidth) to control the size of the changes, and e is a uniformly random number in [-1; 1].
Harmony Search was designed as a generalized optimization method for continuous, discrete, and constrained optimization and has been applied to numerous types of optimization problems.
The harmony memory considering rate (HMCR) in [0; 1] controls the use of information from the harmony memory or the generation of a random pitch. As such, it controls the rate of convergence of the algorithm and is typically configured in [0.7; 0.95]. The pitch adjustment rate (PAR) in [0; 1] controls the frequency of adjustment of pitches selected from harmony memory, typically configured in [0.1; 0.5]. High values can result in the premature convergence of the search. The pitch adjustment rate and the adjustment method (amount of adjustment or fret width) are typically fixed, having a linear effect through time.
When creating a new harmony, aggregations of pitches can be taken from across musicians in the harmony memory. The harmony memory update is typically a greedy process, although other considerations such as diversity may be used where the most similar harmony is replaced.