Source code and pretrained models for a recurrent neural network that is trained to piecewise adapt contiguous sparse scan paths to specimens by deep reinforcement learning. The sparse scans are completed by a feedforward convolutional neural network that is trained by supervised learning.