A neural network to visually understand and autonomously navigate unknown environments