Stochastic Algorithms for Optimization and Application to Job-shop-scheduling