class_docstr: Q-learning agent.
  
  Including:
  - DQN https://storage.googleapis.com/deepmind-media/dqn/DQNNaturePaper.pdf
  - Prioritized Experience Replay https://arxiv.org/pdf/1511.05952.pdf
  - Dueling Network https://arxiv.org/pdf/1511.06581.pdf
  - Double Q Learning https://arxiv.org/pdf/1509.06461.pdf
class_docstr_tok: ["Q-learning","agent",".","Including",":","-","DQN","https",":","\/\/storage.googleapis.com\/deepmind-media\/dqn\/DQNNaturePaper.pdf","-","Prioritized","Experience","Replay","https",":","\/\/arxiv.org\/pdf\/1511.05952.pdf","-","Dueling","Network","https",":","\/\/arxiv.org\/pdf\/1511.06581.pdf","-","Double","Q","Learning","https",":","\/\/arxiv.org\/pdf\/1509.06461.pdf"]
docstr: Last observed reward/state of the episode (which then terminates).
  
  Args:
      reward (float) : amount of reward returned after previous action.
      next_state (object): observation provided by the environment.
docstr_tok: ["Last","observed","reward\/state","of","the","episode","(","which","then","terminates",")",".","Args",":","reward","(","float",")",":","amount","of","reward","returned","after","previous","action",".","next_state","(","object",")",":","observation","provided","by","the","environment","."]
code: def end(self, reward, next_state):
      """
      Last observed reward/state of the episode (which then terminates).
  
      Args:
          reward (float) : amount of reward returned after previous action.
          next_state (object): observation provided by the environment.
      """
      priority = self._compute_priority(
          self._last_state, self._last_action, reward, None
      )
      self._replay_memory.store(
          self._last_state, self._last_action, reward, None, priority
      )
      self.step_count += 1
  
      # Update Q every self._parameters.q_update_frequency
      self._update_q_periodically()
  
imports: import math
  import cntk
  import numpy
  import ast
  from .agent import AgentBaseClass
  from .shared.cntk_utils import huber_loss
  from .shared.models import Models
  from .shared.qlearning_parameters import QLearningParameters
  from .shared.replay_memory import ReplayMemory
label_desc: Use image node_id 4 for calling the QLearning obj's underlying member method code with example usage: obj.end(reward, next_state) without return types