Wireless sensor networks (WSNs) is one of the most important technologies in this century. As sensor nodes have limited energy resources, designing energy-efficient routing algorithms for WSNs has become the research focus. And because WSNs routing for maximizing the network lifetime is a NP-hard problem, many researchers try to optimize it with meta-heuristics. However, due to the uncertain variable number and strong constraints of WSNs routing problem, most meta-heuristics are inappropriate in designing routing algorithms for WSNs. This paper proposes an Improved Harmony Search Based Energy Efficient Routing Algorithm (IHSBEER) for WSNs, which is based on harmony search (HS) algorithm (a meta-heuristic). To address the WSNs routing problem with HS algorithm, several key improvements have been put forward: First of all, the encoding of harmony memory has been improved based on the characteristics of routing in WSNs. Secondly, the improvisation of a new harmony has also been improved. We have introduced dynamic adaptation for the parameter HMCR to avoid the prematurity in early generations and strengthen its local search ability in late generations. Meanwhile, the adjustment process of HS algorithm has been discarded to make the proposed routing algorithm containing less parameters. Thirdly, an effective local search strategy is proposed to enhance the local search ability, so as to improve the convergence speed and the accuracy of routing algorithm. In addition, an objective function model that considers both the energy consumption and the length of path is developed. The detailed descriptions and performance test results of the proposed approach are included. The experimental results clearly show the advantages of the proposed routing algorithm for WSNs. 
An improved harmony search based energy-efficient routing algorithm for wireless sensor networks