Could you give me an algorithm to get a robot around a maze knowing what the maze consists of, such as the path and its walls?