A Machine Learning Approach to Stochastic Optimal Control