Most of statistical procedures consist in estimating parameters by minimizing (or maximizing) some criterion, a minimizing parameter isalso called in the statistical literature M-estimator. So to compute an M-estimator consists in finding a global minimum. Depending on the statistical problem and the available information, the criterion to minimize may be more or less complicated: non convex, no gradient, non smooth etc... Moreover, generally only evaluations of the criterion are reachable. Thus, it can be difficult in practice to compute a M-estimator. We propose a new procedure to compute a global minimum, using a stochastic algorithm to take advantage of various smooth versions of the criterion