I am asked to design an algorithm to find the shortest path in a given map with obstacles. It is actually not hard with negative reward and using value iteration to solve this. My problem is, if consider the episodic MDP (5 minutes), each robot can only take in the map, and the robot can never reach the goal within 5 steps, what should we do now? Can we optimize getting the coffee in that time limit? Would the same reward (say -1 in each block) apply to the map?