Efficient reinforcement learning with agent states