class_docstr: Abstract base class for all implemented agents.
  
  Each agent interacts with the environment (as defined by the `Env` class) by first observing the
  state of the environment. Based on this observation the agent changes the environment by performing
  an action.
  
  Do not use this abstract base class directly but instead use one of the concrete agents implemented.
  Each agent realizes a reinforcement learning algorithm. Since all agents conform to the same
  interface, you can use them interchangeably.
  
  To implement your own agent, you have to implement the following methods:
  
  - `forward`
  - `backward`
  - `compile`
  - `load_weights`
  - `save_weights`
  - `layers`
  
  # Arguments
      processor (`Processor` instance): See [Processor](#processor) for details.
class_docstr_tok: ["Abstract","base","class","for","all","implemented","agents",".","Each","agent","interacts","with","the","environment","(","as","defined","by","the","`","Env","`","class",")","by","first","observing","the","state","of","the","environment",".","Based","on","this","observation","the","agent","changes","the","environment","by","performing","an","action",".","Do","not","use","this","abstract","base","class","directly","but","instead","use","one","of","the","concrete","agents","implemented",".","Each","agent","realizes","a","reinforcement","learning","algorithm",".","Since","all","agents","conform","to","the","same","interface",",","you","can","use","them","interchangeably",".","To","implement","your","own","agent",",","you","have","to","implement","the","following","methods",":","-","`","forward","`","-","`","backward","`","-","`","compile","`","-","`","load_weights","`","-","`","save_weights","`","-","`","layers","`","#","Arguments","processor","(","`","Processor","`","instance",")",":","See","[","Processor","]","(","#","processor",")","for","details","."]
docstr: Updates the agent after having executed the action returned by `forward`.
  If the policy is implemented by a neural network, this corresponds to a weight update using back-prop.
  
  # Argument
      reward (float): The observed reward after executing the action returned by `forward`.
      terminal (boolean): `True` if the new state of the environment is terminal.
  
  # Returns
      List of metrics values
docstr_tok: ["Updates","the","agent","after","having","executed","the","action","returned","by","`","forward","`",".","If","the","policy","is","implemented","by","a","neural","network",",","this","corresponds","to","a","weight","update","using","back-prop",".","#","Argument","reward","(","float",")",":","The","observed","reward","after","executing","the","action","returned","by","`","forward","`",".","terminal","(","boolean",")",":","`","True","`","if","the","new","state","of","the","environment","is","terminal",".","#","Returns","List","of","metrics","values"]
code: def backward(self, reward, terminal):
      """Updates the agent after having executed the action returned by `forward`.
      If the policy is implemented by a neural network, this corresponds to a weight update using back-prop.
  
      # Argument
          reward (float): The observed reward after executing the action returned by `forward`.
          terminal (boolean): `True` if the new state of the environment is terminal.
  
      # Returns
          List of metrics values
      """
      raise NotImplementedError()
  
imports: import warnings
  from copy import deepcopy
  import numpy
  from keras.callbacks import History
  from rl.callbacks import CallbackList, TestLogger, TrainEpisodeLogger, TrainIntervalLogger, Visualizer, WandbLogger
label_desc: Use image node_id 7 for calling the Agent obj's underlying member method code with example usage: obj.backward(reward, terminal) without return types