Using AI to unlock clues to the origins of the stars and planets