gym_warehouse/envs/warehouse_env.py
def _move(self, action):
        """
        Tries to move the agent in the direction indicated by action.

        Parameters
        ----------
        action : int
            A move action. Must be in [0, 3].

        Returns
        -------
        reward : int
            The reward the agent gets for this action.
        """
        row, col = self.agent.position
        delta_row, delta_col = MOVE_DELTAS[action]
        row, col = row + delta_row, col + delta_col

        if self._within_bounds(row, col) and (row, col) not in self.obstacles:
            self.agent.position = (row, col)

        # Rendering
        self.action = f'Move -> ({row}, {col})'
        return self.rewards['default']

        Tries to move the agent in the direction indicated by action.

        Parameters
        ----------
        action : int
            A move action. Must be in [0, 3].

        Returns
        -------
        reward : int
            The reward the agent gets for this action.
        
Tries to move the agent in the direction indicated by action.
Parameters

action : int
A move action.

Returns

reward : int
The reward the agent gets for this action.
Tries to move the agent in the direction indicated by action . Parameters action : int A move action . Returns reward : int The reward the agent gets for this action .
def _move(self, action):
        row, col = self.agent.position
        delta_row, delta_col = MOVE_DELTAS[action]
        row, col = row + delta_row, col + delta_col
        if self._within_bounds(row, col) and (row, col) not in self.obstacles:
            self.agent.position = (row, col)
        self.action = f'Move -> ({row}, {col})'
        return self.rewards['default']
def _move ( self , action ) : row , col = self . agent . position delta_row , delta_col = MOVE_DELTAS [ action ] row , col = row + delta_row , col + delta_col if self . _within_bounds ( row , col ) and ( row , col ) not in self . obstacles : self . agent . position = ( row , col ) self . action = f'Move -> ({row}, {col})' return self . rewards [ 'default' ]
Tries to move the agent in the direction indicated by action.
Tries to move the agent in the direction indicated by action .
"""
        Tries to move the agent in the direction indicated by action.

        Parameters
        ----------
        action : int
            A move action. Must be in [0, 3].

        Returns
        -------
        reward : int
            The reward the agent gets for this action.
        """ # Rendering
self
action