(random_state=None)
return composer.Environment(time_limit=30,
                              task=task,
                              random_state=random_state,
                              strip_singleton_obs_buffer_dim=True)
Requires a rodent to find all items in a maze.
Requires a rodent to find all items in a maze.
Requires a rodent to find all items in a maze .
def rodent_maze_forage(random_state=None):
  """Requires a rodent to find all items in a maze."""

  # Build a position-controlled rodent walker.
  walker = rodent.Rat(
      observable_options={'egocentric_camera': dict(enabled=True)})

  # Build a maze with rooms and targets.
  wall_textures = labmaze_textures.WallTextures(style='style_01')
  arena = mazes.RandomMazeWithTargets(
      x_cells=11,
      y_cells=11,
      xy_scale=.5,
      z_height=.3,
      max_rooms=4,
      room_min_size=4,
      room_max_size=5,
      spawns_per_room=1,
      targets_per_room=3,
      wall_textures=wall_textures,
      aesthetic='outdoor_natural')

  # Build a task that rewards the agent for obtaining targets.
  task = random_goal_maze.ManyGoalsMaze(
      walker=walker,
      maze_arena=arena,
      target_builder=functools.partial(
          target_sphere.TargetSphere,
          radius=0.05,
          height_above_ground=.125,
          rgb1=(0, 0, 0.4),
          rgb2=(0, 0, 0.7)),
      target_reward_scale=50.,
      contact_termination=False,
      physics_timestep=_PHYSICS_TIMESTEP,
      control_timestep=_CONTROL_TIMESTEP)

  return composer.Environment(time_limit=30,
                              task=task,
                              random_state=random_state,
                              strip_singleton_obs_buffer_dim=True)
def rodent_maze_forage ( random_state = None ) : # Build a position-controlled rodent walker. walker = rodent . Rat ( observable_options = { 'egocentric_camera' : dict ( enabled = True ) } ) # Build a maze with rooms and targets. wall_textures = labmaze_textures . WallTextures ( style = 'style_01' ) arena = mazes . RandomMazeWithTargets ( x_cells = 11 , y_cells = 11 , xy_scale = .5 , z_height = .3 , max_rooms = 4 , room_min_size = 4 , room_max_size = 5 , spawns_per_room = 1 , targets_per_room = 3 , wall_textures = wall_textures , aesthetic = 'outdoor_natural' ) # Build a task that rewards the agent for obtaining targets. task = random_goal_maze . ManyGoalsMaze ( walker = walker , maze_arena = arena , target_builder = functools . partial ( target_sphere . TargetSphere , radius = 0.05 , height_above_ground = .125 , rgb1 = ( 0 , 0 , 0.4 ) , rgb2 = ( 0 , 0 , 0.7 ) ) , target_reward_scale = 50. , contact_termination = False , physics_timestep = _PHYSICS_TIMESTEP , control_timestep = _CONTROL_TIMESTEP ) return composer . Environment ( time_limit = 30 , task = task , random_state = random_state , strip_singleton_obs_buffer_dim = True )