Algorithms for Markov Decision Processes