class_docstr: Q-learning agent with tabular representation.
class_docstr_tok: ["Q-learning","agent","with","tabular","representation","."]
docstr: Observe one transition and choose an action.
docstr_tok: ["Observe","one","transition","and","choose","an","action","."]
code: def step(self, reward, next_state):
      """Observe one transition and choose an action."""
      self._adjust_learning_rate()
      self.step_count += 1
  
      next_encoded_state = self._preprocess_state(next_state)
      td_err = (
          reward
          + self._parameters.gamma * np.max(self._q[next_encoded_state])
          - self._q[self._last_state, self._last_action]
      )
      self._q[self._last_state, self._last_action] += self._eta * td_err
  
      self._adjust_exploration_rate()
      self._last_state = next_encoded_state
      self._last_action, action_behavior = self._choose_action(
          self._last_state
      )
      return self._last_action, {
          "action_behavior": action_behavior,
          "epsilon": self._epsilon,
      }
  
file_path: CNTK/bindings/python/cntk/contrib/deeprl/agent/tabular_qlearning.py
imports: import copy
  import numpy
  from .agent import AgentBaseClass
  from .shared.qlearning_parameters import QLearningParameters
label_desc: Use image node_id 3 for calling the TabularQLearning obj's underlying member method code with example usage: obj.step(reward, next_state) and returns: self,  dict