(level_name, seed, is_test=False)
return environments.FlowEnvironment(p.proxy)
Creates an environment wrapped in a `FlowEnvironment`.
Creates an environment wrapped in a `FlowEnvironment`.
Creates an environment wrapped in a FlowEnvironment .
def create_environment(level_name, seed, is_test=False):
  """Creates an environment wrapped in a `FlowEnvironment`."""
  if level_name in dmlab30.ALL_LEVELS:
    level_name = 'contributed/dmlab30/' + level_name

  # Note, you may want to use a level cache to speed of compilation of
  # environment maps. See the documentation for the Python interface of DeepMind
  # Lab.
  config = {
      'width': FLAGS.width,
      'height': FLAGS.height,
      'datasetPath': FLAGS.dataset_path,
      'logLevel': 'WARN',
  }
  if is_test:
    config['allowHoldOutLevels'] = 'true'
    # Mixer seed for evalution, see
    # https://github.com/deepmind/lab/blob/master/docs/users/python_api.md
    config['mixerSeed'] = 0x600D5EED
  p = py_process.PyProcess(environments.PyProcessDmLab, level_name, config,
                           FLAGS.num_action_repeats, seed)
  return environments.FlowEnvironment(p.proxy)
def create_environment ( level_name , seed , is_test = False ) : if level_name in dmlab30 . ALL_LEVELS : level_name = 'contributed/dmlab30/' + level_name # Note, you may want to use a level cache to speed of compilation of # environment maps. See the documentation for the Python interface of DeepMind # Lab. config = { 'width' : FLAGS . width , 'height' : FLAGS . height , 'datasetPath' : FLAGS . dataset_path , 'logLevel' : 'WARN' , } if is_test : config [ 'allowHoldOutLevels' ] = 'true' # Mixer seed for evalution, see # https://github.com/deepmind/lab/blob/master/docs/users/python_api.md config [ 'mixerSeed' ] = 0x600D5EED p = py_process . PyProcess ( environments . PyProcessDmLab , level_name , config , FLAGS . num_action_repeats , seed ) return environments . FlowEnvironment ( p . proxy )