Program for computing distances, strategies for next move.