Reinforcement Learning and Stochastic Optimization