Let f be a continuous function on R n , and suppose f is continuously differentiable on an open dense subset. Such functions arise in many applications, and very often minimizers are points at which f is not differentiable. Of particular interest is the case where f is not convex, and perhaps not even locally Lipschitz, but whose gradient is easily computed where it is defined. We present a practical, robust algorithm to locally minimize such functions, based on gradient sampling. No subgradient information is required by the algorithm.When f is locally Lipschitz and has bounded level sets, and the sampling radius ǫ is fixed, we show that, with probability one, the algorithm generates a sequence with a cluster point that is Clarke ǫ-stationary. Furthermore, we show that if f has a unique Clarke stationary pointx, then the set of all cluster points generated by the algorithm converges tox as ǫ is reduced to zero.