For WSN, the network node energy is limited, so how to save and even the consumption of the overall energy is an important problem. Clustering is one of the design methods used to manage the network energy consumption efficiently. In this paper, we use genetic simulated annealing algorithm(GSAA) to find an optimal cluster formation and prolong network lifetime. The proposed algorithm takes the nodes position and energy consumption of the network as objective function. Simulation results show that the system's performance have further improved by using GSAA over some existing cluster-based routing protocols.