Online learning of navigation