Software fine-tunes a factory