(random_state=None)
return composer.Environment(time_limit=30,
                              task=task,
                              random_state=random_state,
                              strip_singleton_obs_buffer_dim=True)
Requires a CMU humanoid to run down a corridor with gaps.
Requires a CMU humanoid to run down a corridor with gaps.
Requires a CMU humanoid to run down a corridor with gaps .
def cmu_humanoid_run_gaps(random_state=None):
  """Requires a CMU humanoid to run down a corridor with gaps."""

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

  # Build a corridor-shaped arena with gaps, where the sizes of the gaps and
  # platforms are uniformly randomized.
  arena = corr_arenas.GapsCorridor(
      platform_length=distributions.Uniform(.3, 2.5),
      gap_length=distributions.Uniform(.5, 1.25),
      corridor_width=10,
      corridor_length=100)

  # Build a task that rewards the agent for running down the corridor at a
  # specific velocity.
  task = corr_tasks.RunThroughCorridor(
      walker=walker,
      arena=arena,
      walker_spawn_position=(0.5, 0, 0),
      target_velocity=3.0,
      physics_timestep=0.005,
      control_timestep=0.03)

  return composer.Environment(time_limit=30,
                              task=task,
                              random_state=random_state,
                              strip_singleton_obs_buffer_dim=True)
def cmu_humanoid_run_gaps ( random_state = None ) : # Build a position-controlled CMU humanoid walker. walker = cmu_humanoid . CMUHumanoidPositionControlled ( observable_options = { 'egocentric_camera' : dict ( enabled = True ) } ) # Build a corridor-shaped arena with gaps, where the sizes of the gaps and # platforms are uniformly randomized. arena = corr_arenas . GapsCorridor ( platform_length = distributions . Uniform ( .3 , 2.5 ) , gap_length = distributions . Uniform ( .5 , 1.25 ) , corridor_width = 10 , corridor_length = 100 ) # Build a task that rewards the agent for running down the corridor at a # specific velocity. task = corr_tasks . RunThroughCorridor ( walker = walker , arena = arena , walker_spawn_position = ( 0.5 , 0 , 0 ) , target_velocity = 3.0 , physics_timestep = 0.005 , control_timestep = 0.03 ) return composer . Environment ( time_limit = 30 , task = task , random_state = random_state , strip_singleton_obs_buffer_dim = True )