Similar Items: Reinforcement Learning for Infinite-Dimensional Systems