In STEM domains, students are expected to acquire domainknowledge from visual representations that they may not yetbe able to interpret. Such learning requires perceptual flu-ency, or the ability to intuitively and rapidly see the underlyingconcepts in visuals and to translate between them. Perceptualfluency is acquired via nonverbal, implicit learning processes.Thus far, we have lacked a principled approach for identify-ing a sequence of perceptual fluency problems that promoterobust learning. Here, we describe how a novel machine learn-ing technique can generate an optimal sequence of perceptualfluency problems. In a human experiment, we show that amachine-generated sequence outperforms both a random se-quence and a sequence generated by a human domain expert.Interestingly, the machine-generated sequence resulted in sig-nificantly lower accuracy during training, but higher posttestaccuracy. This suggests that the machine-generated sequenceinduced desirable difficulties. To our knowledge, our study isthe first to show that machine learning can yield desirable dif-ficulties for perceptual learning