Text this: Simulation Based Algorithms For Markov Decision Process And Stochastic Optimization