(random_state=None)
return composer.Environment(
      time_limit=25,
      task=task,
      random_state=random_state,
      strip_singleton_obs_buffer_dim=True)
Requires a CMU humanoid to find all items of a particular type in a maze.
Requires a CMU humanoid to find all items of a particular type in a maze.
Requires a CMU humanoid to find all items of a particular type in a maze .
def cmu_humanoid_heterogeneous_forage(random_state=None):
  """Requires a CMU humanoid to find all items of a particular type in a maze."""
  level = ('*******\n'
           '*     *\n'
           '*  P  *\n'
           '*     *\n'
           '*  G  *\n'
           '*     *\n'
           '*******\n')

  # Build a position-controlled CMU humanoid walker.
  walker = cmu_humanoid.CMUHumanoidPositionControlled(
      observable_options={'egocentric_camera': dict(enabled=True)})

  skybox_texture = labmaze_textures.SkyBox(style='sky_03')
  wall_textures = labmaze_textures.WallTextures(style='style_01')
  floor_textures = labmaze_textures.FloorTextures(style='style_01')
  maze = fixed_maze.FixedMazeWithRandomGoals(
      entity_layer=level,
      variations_layer=None,
      num_spawns=1,
      num_objects=6,
  )
  arena = mazes.MazeWithTargets(
      maze=maze,
      xy_scale=3.0,
      z_height=2.0,
      skybox_texture=skybox_texture,
      wall_textures=wall_textures,
      floor_textures=floor_textures,
  )
  task = random_goal_maze.ManyHeterogeneousGoalsMaze(
      walker=walker,
      maze_arena=arena,
      target_builders=[
          functools.partial(
              target_sphere.TargetSphere,
              radius=0.4,
              rgb1=(0, 0.4, 0),
              rgb2=(0, 0.7, 0)),
          functools.partial(
              target_sphere.TargetSphere,
              radius=0.4,
              rgb1=(0.4, 0, 0),
              rgb2=(0.7, 0, 0)),
      ],
      randomize_spawn_rotation=False,
      target_type_rewards=[30., -10.],
      target_type_proportions=[1, 1],
      shuffle_target_builders=True,
      aliveness_reward=0.01,
      control_timestep=.03,
  )

  return composer.Environment(
      time_limit=25,
      task=task,
      random_state=random_state,
      strip_singleton_obs_buffer_dim=True)
def cmu_humanoid_heterogeneous_forage ( random_state = None ) : level = ( '*******\n' '*     *\n' '*  P  *\n' '*     *\n' '*  G  *\n' '*     *\n' '*******\n' ) # Build a position-controlled CMU humanoid walker. walker = cmu_humanoid . CMUHumanoidPositionControlled ( observable_options = { 'egocentric_camera' : dict ( enabled = True ) } ) skybox_texture = labmaze_textures . SkyBox ( style = 'sky_03' ) wall_textures = labmaze_textures . WallTextures ( style = 'style_01' ) floor_textures = labmaze_textures . FloorTextures ( style = 'style_01' ) maze = fixed_maze . FixedMazeWithRandomGoals ( entity_layer = level , variations_layer = None , num_spawns = 1 , num_objects = 6 , ) arena = mazes . MazeWithTargets ( maze = maze , xy_scale = 3.0 , z_height = 2.0 , skybox_texture = skybox_texture , wall_textures = wall_textures , floor_textures = floor_textures , ) task = random_goal_maze . ManyHeterogeneousGoalsMaze ( walker = walker , maze_arena = arena , target_builders = [ functools . partial ( target_sphere . TargetSphere , radius = 0.4 , rgb1 = ( 0 , 0.4 , 0 ) , rgb2 = ( 0 , 0.7 , 0 ) ) , functools . partial ( target_sphere . TargetSphere , radius = 0.4 , rgb1 = ( 0.4 , 0 , 0 ) , rgb2 = ( 0.7 , 0 , 0 ) ) , ] , randomize_spawn_rotation = False , target_type_rewards = [ 30. , - 10. ] , target_type_proportions = [ 1 , 1 ] , shuffle_target_builders = True , aliveness_reward = 0.01 , control_timestep = .03 , ) return composer . Environment ( time_limit = 25 , task = task , random_state = random_state , strip_singleton_obs_buffer_dim = True )