31
ي ن و م هار وي ج ت س جHarmony Search By: Ali Hasheminejad

Harmony search presentation

Embed Size (px)

Citation preview

Slide 1

Harmony SearchBy: Ali Hasheminejad

ContentsIntroduction of Harmony ImprovisationAnalysis of Harmony ImprovisationAnalogy Music and OptimizationBasic Elements of HSA Three main procedures (every iteration)HSA behavior (movie)Publication Trend ( No. and fields)Steps of Harmony Search Algorithm Modifications to the original HS algorithmMATLAB code sample (Sphere Function)

IntroductionHarmony in nature is a special relationship between several sound waves that have different frequencies.

Even in ancient civilizations, the relation between music and mathematics was considered to be essential, but only recently scientists found an interesting connection between optimization techniques and music.

The music-inspired harmony based optimization algorithm; the algorithm is based on the observation that the aim of music creation is the quest of the perfect state of harmony

Introductionin the same way a music band improves rehearsal after rehearsal, HSA improves iteration after iteration.

The term Harmony in music refers to the sound result caused from two or more instruments that play at the same time. harmony evaluates the relation between two or more sound-waves and their interaction. This interaction is crucial for the final result and specifies if it is pleasant or not.

Analysis of Harmony ImprovisationSeeking Harmony in Music. The new algorithm was inspired by the improvisation process that a skilled musician follows when he is playing in a music band. the following choices: a. To play the famous Obviously, every member of the band knows the theme and can play it by heart. In other words all musicians have this melody in their mindsb. play something similar to the theme. Very often, musicians try to enrich a music piece slightly changing or adjusting pitches of the memorized theme. c. This choice, which is so common in Jazz music, gives the freedom to the musician to play random tunes. The performer uses his talent

www.hydroteq.com (Number of Visit)

Simple Analogy Music and Optimization(Regarding to Parameters )

Comparison Factor

Comparison Factor

Basic Elements of HSA Harmony: Harmony is similar to the gene in GA. It is the set of the values of all the variables of the objective function. Harmony Memory (HM): The places where harmonies are stored. Harmony Memory Size (HMS): The number of places that HM has. The best harmony is stored in the 1st place and the rest harmonies are classified according to their performance. Definition of HMS is an important part of the calibration of the model. Maximum number of Iterations (MaxIter): Defines the termination criterion. It is similar to the maximum number of generations in GA.

Basic Elements of HSA Harmony Memory Considering Rate(HMCR) pitch adjusting rate (PAR) fret width (FW) a fret is the metallic ridge on the neck of 5 a string instrument (such as guitar), which divides the neck into fixed segments

The Structure of Harmony Memory

Three main procedures (every iteration)HS is choosing any value from HS Memory. This process is defined as Memory Consideration and it is very important because it ensures that good harmonies will be considered through the solution. Harmony Memory Considering Rate (HMCR) :This index will specify the probability that new harmony will include a value from the historic values that are stored in the Harmony Memory. (Typical values of HMCR are typically from 70% to 95% )

HMCR Intensification HMCR Diversification

Three main procedures (every iteration)2. Every component of the new harmony chosen from HM, is likely to be pitch-adjusted. For example a Pitch Adjusting Rate (PAR) of 10%, indicates that algorithm will choose neighboring values for the 10% of the harmonies chosen from HM. The new harmony will include the value xi new which will be:

Pitch Adjustment is similar to Mutation procedure in GA and typically is between 0.1 to 0.5, FW normally ranges from 1% to 10% of total value range

Three main procedures (every iteration)The third choice is to select a totally random value from the possible value range. Randomization occurs with probability (100-HMCR)% and increases the diversity of the solutions. Although pitch adjustment has a similar role, it is limited in a local area. Randomization can drive the algorithm to explore the whole range and attain the global optimality.

Abstract of three Operators

Analogy betweenmusic and optimization

An example

Publication Trend200420052006200720082009201020112012201320141301114284391120211318

Steps of Harmony Search Algorithm

Flow chart of the Harmony Search Algorithm

Pseudocode for Harmony Search

HS VS Other Meta-HeuristicsIt preserves the history of past vectors (Harmony Memory) similar to TSable to vary the adaptation rate (Harmony Memory Considering Rate) from the beginning to the end of computation resembling SAmanages several vectors simultaneously in a manner similar to GA. However, the major difference between GA and HS is that HS makes a new vector from all the existing vectors (all harmonies in the Harmony Memory), while GA makes the new vector only from two of the existing vectors (the parents)

Modifications to the original HS algorithmAlternative initialization procedures for HM, or an extended HM structure

Originally fixed parameter values were used. However, some researchers have proposed changeable parameter values. Mahdavi et al. [4] suggested that PAR in-crease linearly and FW decrease exponentially with iterations:

Modifications to the original HS algorithmOptions for handling constraints during generation of new harmonies

Modifications to the algorithms structure, that is, adding or removing blocks and changing the processing sequence in the flowchart

Hybrid HS Methods

SAMPLE (Travel Salesman Problem)each musical instrument in HM is substituted with a variable assigned for each city. Linking each city to its next assigned city creates one of the possible tours.The length of the tour is compared with those of existing tours in HM. If the new length is shorter than any of existing tour lengths, the new tour is included in HM, and the worst tour (longest tour) is excluded from HM.30 runs, HMCR = 0.85 - 0.99, HM = 10 100, 20,000 iterations, Seven out of 30 runs have reached global optimum.

MATLAB code sample (Sphere Function)