Elements of a reinforcement learning system