From what I recall, they used knowledge of the caves coupled with predictions of where they might reasonably have gone to escape the rising flood waters. It wasn't so much a stab in the dark, but it was still a very difficult and dangerous search, in the dark.