Reinforcement learning of visual descriptors for object recognition