Scientists are using machine learning to find new treatments among thousands of old medicines.