class_docstr: Defines a configuration class from which a RandomAgent Algorithm can be built.
  
  Example:
      >>> from ray.rllib.algorithms.random_agent import RandomAgentConfig
      >>> config = RandomAgentConfig().rollouts(rollouts_per_iteration=20)
      >>> print(config.to_dict()) # doctest: +SKIP
      >>> # Build an Algorithm object from the config and run 1 training iteration.
      >>> algo = config.build(env="CartPole-v1")
      >>> algo.train() # doctest: +SKIP
class_docstr_tok: ["Defines","a","configuration","class","from","which","a","RandomAgent","Algorithm","can","be","built",".","Example",":",">",">",">","from","ray.rllib.algorithms.random_agent","import","RandomAgentConfig",">",">",">","config","=","RandomAgentConfig","(",")",".rollouts","(","rollouts_per_iteration=20",")",">",">",">","print","(","config.to_dict","(",")",")","#","doctest",":","+SKIP",">",">",">","#","Build","an","Algorithm","object","from","the","config","and","run","1","training","iteration",".",">",">",">","algo","=","config.build","(","env=","''","CartPole-v1","''",")",">",">",">","algo.train","(",")","#","doctest",":","+SKIP"]
docstr: Sets the rollout configuration.
  
  Args:
      rollouts_per_iteration: How many episodes to run per training iteration.
  
  Returns:
      This updated AlgorithmConfig object.
docstr_tok: ["Sets","the","rollout","configuration",".","Args",":","rollouts_per_iteration",":","How","many","episodes","to","run","per","training","iteration",".","Returns",":","This","updated","AlgorithmConfig","object","."]
code: def rollouts(
      self,
      *,
      rollouts_per_iteration: Optional[int] = NotProvided,
      **kwargs,
  ) -> "RandomAgentConfig":
      """Sets the rollout configuration.
  
      Args:
          rollouts_per_iteration: How many episodes to run per training iteration.
  
      Returns:
          This updated AlgorithmConfig object.
      """
      super().rollouts(**kwargs)
  
      if rollouts_per_iteration is not NotProvided:
          self.rollouts_per_iteration = rollouts_per_iteration
  
      return self
  
file_path: ray/rllib/algorithms/random_agent/random_agent.py
imports: import numpy
  from typing import Optional
  from ray.rllib.algorithms.algorithm import Algorithm
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig, NotProvided
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.deprecation import Deprecated, ALGO_DEPRECATION_WARNING
label_desc: Use image node_id 2 for calling the RandomAgentConfig obj's underlying member method code with example usage: obj.rollouts() and returns: self