My Java implementation of MDP algorithm.