In order to obtain the geographic positions of random nodes in wireless sensor networks (WSN) more accurately, a new localization algorithm is proposed based on evolutionary programming resampling. After the initial position estimation is achieved based on the sampling, a small-scale evolutionary programming based position resampling is carried out, and then iterative refinement is done. In the evolution stage, two schemes, i.e., standard evolutionary programming and meta-evolutionary programming, can be employed respectively to acquire the resample positions. Simulation results show that, compared with the similar method, the proposed algorithm can reduce the mean error of location by about 20%; moreover, compared with the standard evolutionary programming method, the resamping by Meta evolutionary programming improves the localization accuracy more effectively, because of its better adaptability.