There'll be stars for tonight. Something like A* algorithm.