class_docstr: Actor-Critic Policy Gradient.
  
  See https://arxiv.org/pdf/1602.01783.pdf for a description of algorithm.
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.
      """
      self._trajectory_rewards.append(reward)
      self.step_count += 1
  
      # Update every self._parameters.update_frequency
      if self.step_count % self._parameters.update_frequency == 0:
          self._process_accumulated_trajectory(False)
          self._update_networks()
  
imports: import cntk
  import numpy
  import ast
  from .agent import AgentBaseClass
  from .shared.cntk_utils import negative_of_entropy_with_softmax
  from .shared.models import Models
  from .shared.policy_gradient_parameters import PolicyGradientParameters
label_desc: Use image node_id 4 for calling the ActorCritic obj's underlying member method code with example usage: obj.end(reward, next_state) without return types