parameters: (self, config)
docstring: Creates an instance of the StreetLearn level.
  
      Args:
        config: config dict of various settings.
docstring_summary: Creates an instance of the StreetLearn level.
docstring_tokens: Creates an instance of the StreetLearn level .
function: def __init__(self, config):
      """Creates an instance of the StreetLearn level.
  
      Args:
        config: config dict of various settings.
      """
      super(InstructionsBase, self).__init__(config)
  
      self._colors.update({
          'goal': color.Color(*config['color_for_goal']),
          'waypoint': color.Color(*config['color_for_waypoint']),
          'shortest_path': color.Color(*config['color_for_shortest_path']),
      })
      self._reward_at_waypoint = config['reward_at_waypoint']
      self._reward_at_goal = config['reward_at_goal']
      self._instruction_file = config['instruction_file']
      self._num_instructions = config['num_instructions']
      self._max_instructions = config['max_instructions']
      self._thumbnail_helper = thumbnail_helper.ThumbnailHelper()
      self._thumbnails = np.zeros(
          [self._max_instructions + 1, config['height'], config['width'], 3],
          dtype=np.uint8)
      logging.info('Using %d instructions', self._num_instructions)
      logging.info('Padding to %d instructions', self._max_instructions)
      self._instructions = []
      self._step_counter = 1
      self._reward_pano_id_list = {}
      self._reward_pano_id_to_family = {}
      self._reward_family = {}
      self._pano_id_to_color = {}
      self._goal_pano_id = None
      self._trajectory = None
      self._show_shortest_path = config['show_shortest_path']
      self._calculate_ground_truth = config['calculate_ground_truth']
  
      # Ground truth direction (for imitation learning agents).
      self._gt_direction = 0
  
      # Trajectories
      self._num_trajectories = 0
      self._trajectory_data = []
      self._loaded_trajectories = False
function_tokens: def __init__ ( self , config ) : super ( InstructionsBase , self ) . __init__ ( config ) self . _colors . update ( { 'goal' : color . Color ( * config [ 'color_for_goal' ] ) , 'waypoint' : color . Color ( * config [ 'color_for_waypoint' ] ) , 'shortest_path' : color . Color ( * config [ 'color_for_shortest_path' ] ) , } ) self . _reward_at_waypoint = config [ 'reward_at_waypoint' ] self . _reward_at_goal = config [ 'reward_at_goal' ] self . _instruction_file = config [ 'instruction_file' ] self . _num_instructions = config [ 'num_instructions' ] self . _max_instructions = config [ 'max_instructions' ] self . _thumbnail_helper = thumbnail_helper . ThumbnailHelper ( ) self . _thumbnails = np . zeros ( [ self . _max_instructions + 1 , config [ 'height' ] , config [ 'width' ] , 3 ] , dtype = np . uint8 ) logging . info ( 'Using %d instructions' , self . _num_instructions ) logging . info ( 'Padding to %d instructions' , self . _max_instructions ) self . _instructions = [ ] self . _step_counter = 1 self . _reward_pano_id_list = { } self . _reward_pano_id_to_family = { } self . _reward_family = { } self . _pano_id_to_color = { } self . _goal_pano_id = None self . _trajectory = None self . _show_shortest_path = config [ 'show_shortest_path' ] self . _calculate_ground_truth = config [ 'calculate_ground_truth' ] # Ground truth direction (for imitation learning agents). self . _gt_direction = 0 # Trajectories self . _num_trajectories = 0 self . _trajectory_data = [ ] self . _loaded_trajectories = False