If you are in a real-life maze you might want to try the ‘right hand rule’. In most mazes, all the walls are connected to the outermost one, so trailing your right hand along it will avoid dead ends. This will not work for a labyrinth though!