Researchers trained machine-learning algorithms to pinpoint the location of a cargo ship simply by eavesdropping on the sound of its passing. Christopher Intagliata reports.