Rewrite the main exploration logic to use a much faster algorithm

The new algorithm is much better at determining when the candidate region
has been fully explored, so it needs to evaluate far fewer coordinates