Planning the way into and out of forest