Finding the best solution to a hard problem is, at its core, a search through an enormous space of possibilities. Most brute-force methods just cannot afford to check every candidate. Harmony Search (HS), proposed by Zong Woo Geem in 2001, is a metaheuristic that borrows a different strategy: it listens to what already sounds good.
The algorithm keeps a small harmony memory — a collection of the best solutions found so far. At each step, like a jazz musician improvising, it constructs a new candidate by:
- Picking a value from memory with probability (harmony memory consideration rate),
- Nudging that value slightly — a pitch adjustment — with probability (pitch adjustment rate),
- Or trying a random new value with probability .
If the new "harmony" scores better than the worst member of the memory, it replaces it. Over many iterations the memory fills with progressively better solutions, and the best one recorded is the answer.
The metaphor is remarkably direct: each decision variable is an instrument, each value is a note, and the objective function is the audience's applause. Good music stays in the repertoire; bad experiments are forgotten.
Comments
Loading comments...