class_docstr: A recurrent actor.
  
  An actor based on a recurrent policy which takes non-batched observations and
  outputs non-batched actions, and keeps track of the recurrent state inside. It
  also allows adding experiences to replay and updating the weights from the
  policy on the learner.
class_docstr_tok: ["A","recurrent","actor",".","An","actor","based","on","a","recurrent","policy","which","takes","non-batched","observations","and","outputs","non-batched","actions",",","and","keeps","track","of","the","recurrent","state","inside",".","It","also","allows","adding","experiences","to","replay","and","updating","the","weights","from","the","policy","on","the","learner","."]
docstr: Initializes the actor.
  
  Args:
    policy_network: the (recurrent) policy to run.
    adder: the adder object to which allows to add experiences to a
      dataset/replay buffer.
    variable_client: object which allows to copy weights from the learner copy
      of the policy to the actor copy (in case they are separate).
    store_recurrent_state: Whether to pass the recurrent state to the adder.
docstr_tok: ["Initializes","the","actor",".","Args",":","policy_network",":","the","(","recurrent",")","policy","to","run",".","adder",":","the","adder","object","to","which","allows","to","add","experiences","to","a","dataset\/replay","buffer",".","variable_client",":","object","which","allows","to","copy","weights","from","the","learner","copy","of","the","policy","to","the","actor","copy","(","in","case","they","are","separate",")",".","store_recurrent_state",":","Whether","to","pass","the","recurrent","state","to","the","adder","."]
code: def __init__(
      self,
      policy_network: snt.RNNCore,
      adder: Optional[adders.Adder] = None,
      variable_client: Optional[
          tf2_variable_utils.VariableClient
      ] = None,
      store_recurrent_state: bool = True,
  ):
      """Initializes the actor.
  
      Args:
        policy_network: the (recurrent) policy to run.
        adder: the adder object to which allows to add experiences to a
          dataset/replay buffer.
        variable_client: object which allows to copy weights from the learner copy
          of the policy to the actor copy (in case they are separate).
        store_recurrent_state: Whether to pass the recurrent state to the adder.
      """
      # Store these for later use.
      self._adder = adder
      self._variable_client = variable_client
      self._network = policy_network
      self._state = None
      self._prev_state = None
      self._store_recurrent_state = store_recurrent_state
  
imports: from typing import Optional, Tuple
  from acme import adders
  from acme import core
  from acme import types
  from acme.tf import utils
  from acme.tf import variable_utils
  import dm_env
  import sonnet
  import tensorflow
  import tensorflow_probability
label_desc: Use image node_id 1 to create a new RecurrentActor object from inherited base classes: core with example: obj = RecurrentActor(policy_network, adder, variable_client, store_recurrent_state)