An uneven clustering routing algorithm based on glowworm swarm optimization for wireless sensor networks (UCRA-GSO) is proposed to solve the Wireless sensor network (WSN) energy balance problem. We introduce factors such as cluster head density, cluster head proximity distance, cluster head energy, and compactness of the cluster into a glowworm swarm optimization (GSO) method to find the optimal clustering method. The test case involves a forwarding-tree of two level gradients (single and multi-hop transmission) such that the distance between t...