Reinforcement learning for the adaptive control of heat pumps