Wireless sensor networks (WSN) are mostly utilized in many applications. Indeed, WSN is composed of sensors to evaluate some physical phenomena. However, the information brought by the sensor still missed if we don't know the exact location of the event. Several localization algorithms have been proposed in order to locate the nodes in WSN. The localization algorithms are categorized into range-based and range-free techniques. The range-based techniques use either distance or time to calculate the coordinates of unknown nodes. Nevertheless, those kinds of techniques need some additional material in computation purpose. Therefore, range-based techniques present an expensive solution for positioning in WSN. Alternatively, range-free techniques may do the same task without involving additional material. But they don’t offer a high precision of localization in comparison with range-based techniques. DVHOP is the most popular range-free technique that uses the hop count method in the localization process. In this work, we propose an improvement of DVHOP localization algorithm to create three improved versions of this algorithm and we have achieved that by adopting two meta-heuristic (simulated annealing, particle swarm optimization) and FMINCON solver dedicated to the optimization in the field of WSN nodes localization. The experimental results obtained in this work show clearly the gain and the good impact of our proposition.