Basic dynamic programming algorithms for MDPs