A reinforcement learning approach to resource allocation in genomic selection