(domain_name, task_name, task_kwargs=None,
                      environment_kwargs=None, visualize_reward=False)
return env
Returns an environment from the suite given a domain name and a task name.

  Args:
    domain_name: A string containing the name of a domain.
    task_name: A string containing the name of a task.
    task_kwargs: Optional `dict` specifying keyword arguments for the task.
    environment_kwargs: Optional `dict` specifying keyword arguments for the
      environment.
    visualize_reward: Optional `bool`. If `True`, object colours in rendered
      frames are set to indicate the reward at each step. Default `False`.

  Raises:
    ValueError: If the domain or task doesn't exist.

  Returns:
    An instance of the requested environment.
Returns an environment from the suite given a domain name and a task name.
Returns an environment from the suite given a domain name and a task name .
def build_environment(domain_name, task_name, task_kwargs=None,
                      environment_kwargs=None, visualize_reward=False):
  """Returns an environment from the suite given a domain name and a task name.

  Args:
    domain_name: A string containing the name of a domain.
    task_name: A string containing the name of a task.
    task_kwargs: Optional `dict` specifying keyword arguments for the task.
    environment_kwargs: Optional `dict` specifying keyword arguments for the
      environment.
    visualize_reward: Optional `bool`. If `True`, object colours in rendered
      frames are set to indicate the reward at each step. Default `False`.

  Raises:
    ValueError: If the domain or task doesn't exist.

  Returns:
    An instance of the requested environment.
  """
  if domain_name not in _DOMAINS:
    raise ValueError('Domain {!r} does not exist.'.format(domain_name))

  domain = _DOMAINS[domain_name]

  if task_name not in domain.SUITE:
    raise ValueError('Level {!r} does not exist in domain {!r}.'.format(
        task_name, domain_name))

  task_kwargs = task_kwargs or {}
  if environment_kwargs is not None:
    task_kwargs = dict(task_kwargs, environment_kwargs=environment_kwargs)
  env = domain.SUITE[task_name](**task_kwargs)
  env.task.visualize_reward = visualize_reward
  return env
def build_environment ( domain_name , task_name , task_kwargs = None , environment_kwargs = None , visualize_reward = False ) : if domain_name not in _DOMAINS : raise ValueError ( 'Domain {!r} does not exist.' . format ( domain_name ) ) domain = _DOMAINS [ domain_name ] if task_name not in domain . SUITE : raise ValueError ( 'Level {!r} does not exist in domain {!r}.' . format ( task_name , domain_name ) ) task_kwargs = task_kwargs or { } if environment_kwargs is not None : task_kwargs = dict ( task_kwargs , environment_kwargs = environment_kwargs ) env = domain . SUITE [ task_name ] ( * * task_kwargs ) env . task . visualize_reward = visualize_reward return env