Environment/LASROMEnv.py
def _move_single_to_excitor_location(self, observation, isBody=True):
        """
        find the light with maximum intensity and move Visitor#1 to that location
        Testing target movement

        """
        light_color_start_index = self.prox_sensor_num

        target_light_index = -1
        max_intensity = 0

        for i in range(self.lights_num):
            light_intensity = observation[light_color_start_index + i * 3]
            if light_intensity > max_intensity:
                target_light_index = i

        if target_light_index >= 0:
            position = self.behaviour.single_light_position(target_light_index)
            position[2] = 0.9154 # fixed height of human model
        else:
            position = [0,0,0.9154] # if no light is turned on, then visitor is placed at origin.

        if isBody:
            # visitor body
            self._set_single_visitor_position("Body_Visitor#1", position)
        else:
            # visitor target
            position[2] = 0
            self._set_single_target_position("Target_Visitor#1",position)

        find the light with maximum intensity and move Visitor#1 to that location
        Testing target movement

        
find the light with maximum intensity and move Visitor#1 to that location
Testing target movement
find the light with maximum intensity and move Visitor#1 to that location Testing target movement
def _move_single_to_excitor_location(self, observation, isBody=True):
        light_color_start_index = self.prox_sensor_num
        target_light_index = -1
        max_intensity = 0
        for i in range(self.lights_num):
            light_intensity = observation[light_color_start_index + i * 3]
            if light_intensity > max_intensity:
                target_light_index = i
        if target_light_index >= 0:
            position = self.behaviour.single_light_position(target_light_index)
            position[2] = 0.9154 
        else:
            position = [0,0,0.9154] 
        if isBody:
            self._set_single_visitor_position("Body_Visitor#1", position)
        else:
            position[2] = 0
            self._set_single_target_position("Target_Visitor#1",position)
def _move_single_to_excitor_location ( self , observation , isBody = True ) : light_color_start_index = self . prox_sensor_num target_light_index = - 1 max_intensity = 0 for i in range ( self . lights_num ) : light_intensity = observation [ light_color_start_index + i * 3 ] if light_intensity > max_intensity : target_light_index = i if target_light_index >= 0 : position = self . behaviour . single_light_position ( target_light_index ) position [ 2 ] = 0.9154 else : position = [ 0 , 0 , 0.9154 ] if isBody : self . _set_single_visitor_position ( "Body_Visitor#1" , position ) else : position [ 2 ] = 0 self . _set_single_target_position ( "Target_Visitor#1" , position )
find the light with maximum intensity and move Visitor#1 to that location
Testing target movement
find the light with maximum intensity and move Visitor#1 to that location Testing target movement
"""
        find the light with maximum intensity and move Visitor#1 to that location
        Testing target movement

        """ # fixed height of human model # if no light is turned on, then visitor is placed at origin. # visitor body # visitor target
self
observation
isBody