qlearning update environment interaction