A direct stochastic algorithm for global search