Decision making algorithm for a robot navigating a maze.