class_docstr: An agent with a random policy and no learning.
class_docstr_tok: ["An","agent","with","a","random","policy","and","no","learning","."]
docstr: Creates a random agent.
  
  Args:
    time_step_spec: A `TimeStep` spec of the expected time_steps.
    action_spec: A nest of BoundedTensorSpec representing the actions.
    debug_summaries: A bool to gather debug summaries.
    summarize_grads_and_vars: If true, gradient summaries will be written.
    train_step_counter: An optional counter to increment every time the train
      op is run.  Defaults to the global_step.
    num_outer_dims: same as base class.
    name: The name of this agent. All variables in this module will fall under
      that name. Defaults to the class name.
docstr_tok: ["Creates","a","random","agent",".","Args",":","time_step_spec",":","A","`","TimeStep","`","spec","of","the","expected","time_steps",".","action_spec",":","A","nest","of","BoundedTensorSpec","representing","the","actions",".","debug_summaries",":","A","bool","to","gather","debug","summaries",".","summarize_grads_and_vars",":","If","true",",","gradient","summaries","will","be","written",".","train_step_counter",":","An","optional","counter","to","increment","every","time","the","train","op","is","run",".","Defaults","to","the","global_step",".","num_outer_dims",":","same","as","base","class",".","name",":","The","name","of","this","agent",".","All","variables","in","this","module","will","fall","under","that","name",".","Defaults","to","the","class","name","."]
code: def __init__(
      self,
      time_step_spec: ts.TimeStep,
      action_spec: types.NestedTensorSpec,
      debug_summaries: bool = False,
      summarize_grads_and_vars: bool = False,
      train_step_counter: Optional[tf.Variable] = None,
      num_outer_dims: int = 1,
      name: Optional[Text] = None,
  ):
      """Creates a random agent.
  
      Args:
        time_step_spec: A `TimeStep` spec of the expected time_steps.
        action_spec: A nest of BoundedTensorSpec representing the actions.
        debug_summaries: A bool to gather debug summaries.
        summarize_grads_and_vars: If true, gradient summaries will be written.
        train_step_counter: An optional counter to increment every time the train
          op is run.  Defaults to the global_step.
        num_outer_dims: same as base class.
        name: The name of this agent. All variables in this module will fall under
          that name. Defaults to the class name.
      """
      tf.Module.__init__(self, name=name)
  
      policy_class = random_tf_policy.RandomTFPolicy
  
      super(RandomAgent, self).__init__(
          time_step_spec,
          action_spec,
          policy_class=policy_class,
          debug_summaries=debug_summaries,
          summarize_grads_and_vars=summarize_grads_and_vars,
          train_step_counter=train_step_counter,
          num_outer_dims=num_outer_dims,
      )
  
file_path: agents/tf_agents/agents/random/random_agent.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Optional, Text
  import gin
  import tensorflow.compat.v2
  from tf_agents.agents.random import fixed_policy_agent
  import tf_agents.policies.random_tf_policy
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
label_desc: Use image node_id 1 to create a new RandomAgent object from inherited base classes: fixed_policy_agent with example: obj = RandomAgent(time_step_spec, action_spec, debug_summaries, summarize_grads_and_vars, train_step_counter, num_outer_dims, name)