Fixed bugs in mdp example
Added value iteration