parameters: (self, pano_id, streetlearn)
return_statement: return reward
docstring: Check what reward the current pano yields, based on instructions.
  
      Args:
        pano_id: centroid pano id.
        streetlearn: streetlearn graph for establishing neighbours.
      Returns:
        The reward for the current step.
docstring_summary: Check what reward the current pano yields, based on instructions.
docstring_tokens: Check what reward the current pano yields based on instructions .
function: def _check_reward(self, pano_id, streetlearn):
      """Check what reward the current pano yields, based on instructions.
  
      Args:
        pano_id: centroid pano id.
        streetlearn: streetlearn graph for establishing neighbours.
      Returns:
        The reward for the current step.
      """
      reward = 0
  
      previous_step = self._current_step
      reward = super(StepByStepInstructionGame, self)._check_reward(
          pano_id, streetlearn)
  
      if previous_step != self._current_step and not self._reached_goal:
        # If we changed the step, but haven't terminated the game, update instrs.
        self._thumbnails[0, :] = self._all_thumbs[self._current_step]
        self._thumbnails[1, :] = (
            self._all_thumbs[self._current_step + 1])
        self._instructions = [self._all_instrs[self._current_step]]
  
        # Remove epsilon from reward to avoid triggering the waypoint switchers.
        epsilon = 0.01
        reward -= epsilon
        logging.info('Switched from step %d to step %d.',
                     previous_step, self._current_step)
        logging.info(self._instructions)
  
      return reward
function_tokens: def _check_reward ( self , pano_id , streetlearn ) : reward = 0 previous_step = self . _current_step reward = super ( StepByStepInstructionGame , self ) . _check_reward ( pano_id , streetlearn ) if previous_step != self . _current_step and not self . _reached_goal : # If we changed the step, but haven't terminated the game, update instrs. self . _thumbnails [ 0 , : ] = self . _all_thumbs [ self . _current_step ] self . _thumbnails [ 1 , : ] = ( self . _all_thumbs [ self . _current_step + 1 ] ) self . _instructions = [ self . _all_instrs [ self . _current_step ] ] # Remove epsilon from reward to avoid triggering the waypoint switchers. epsilon = 0.01 reward -= epsilon logging . info ( 'Switched from step %d to step %d.' , previous_step , self . _current_step ) logging . info ( self . _instructions ) return reward