Algorithm for best places to settle